Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. xDougx

    Function BitBlt

    As a general rule, whatever you select into a device context must eventally be selected out. SelectObject returns the old object of the type you selected in. See GetObjectType for a list of object types: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/devcons_9pt1.asp...
  2. xDougx

    Function BitBlt

    You are cleaning up by selecting the bitmap OUT of the device context. When you select something INTO a device context, you can imagine the device context clamps onto and "owns" the bitmap. Selecting the "old" object back into the device context releases control of the...
  3. xDougx

    Socket programming , whicch language you suggest?

    The speed difference between C and C++ in this case would be so small that it wouldn't matter. If you are sending 5 megs per second, then I would worry. If you are taking about dialup, the modem is thousands of times slower than the CPU. Even high speed internet is super slow as far as CPU...
  4. xDougx

    Microsoft Visual C++ compiler, cast problem ( I think)?

    If you want help on a warning, click the warning in the build tab and then hit F1. The meaning of the warning is that you are returning a different type than the declared type. For example, this function would produce that warning: int myfunc() { char v; v = 123; return v; } In...
  5. xDougx

    getting data

    You have to pass a *string* to atof(). You can't pass one character. This would work: char myHardcodedString[] = "12345.67"; double d; int main() { d = atof(myHardcodedString); return 0; } This would NOT work: int main() // Doesn't work { char c; // Doesn't work...
  6. xDougx

    Win32Asm question

    The reason that a compiler might put that structure in the code section is to make it read-only. Most win32 linkers make the code (.text) section read-only. Some compilers put C strings in the code section for that reason. Also, in a DLL, the code section is shared by all processes (with some...
  7. xDougx

    Segments with Nasm

    The best way to make a COM file with Nasm is to use the 'bin' format, and put ORG 0x100 near the top of your source file. If you make the output file have a .COM extension, it will be directly usable without linking. Doug Gale
  8. xDougx

    Segments with Nasm

    Be careful when making a .COM program (as opposed to .EXE). The CS, DS, and SS segment registers all point to the same area of memory, so if you use too much stack space, it will eventually start to trample your code. The stack pointer is initially at the top of the code segment (64KB). For...

Part and Inventory Search

Back
Top