Why doesn't this work? invoke SendMessage, hMainTB, TB_ENABLEBUTTON, IDM_DEBUG_START, 00010000h I was able to disable it, but I can't enable it...
invoke SendMessage, hMainTB, TB_ENABLEBUTTON, IDM_DEBUG_START, 1 Rule No.1: Don't ever believe wholeheartedly what M$ told you
M$ is correct this time TB_ENABLEBUTTON wParam = (WPARAM) idButton; lParam = (LPARAM) MAKELONG(fEnable, 0); Parameters idButton Command identifier of the button to enable or disable. fEnable Enable flag. If this parameter is TRUE, the button is enabled. If it is FALSE, the button is disabled. MAKELONG The MAKELONG macro creates a LONG value by concatenating the specified values. DWORD MAKELONG( WORD wLow, WORD wHigh ); Parameters wLow Specifies the low-order word of the new value. wHigh Specifies the high-order word of the new value. Return Values The return value is a LONG value.
It works the way Iczelion said it works: with 00000001h as the enable flag, not 00010000h the way M$ says.
I see what you are saying. But why is the first parameter the low word?? For me, it makes no sense.
The only sense it makes is that it imitates the "little-endian" storage of data on x86 machines. It's also a legacy of 16-bit Windows, which was implemented only on x86 machines.
huh? i thought all intel and compatibels were little endian? noticed that when i was working on BlowFish wich is big endian
NT was ported to Alpha and MIPS. Alpha being a Digital creation, uses little-endian. Don't know about MIPS, does it even use byte addressing?
The dividing line in the Hardware sense is: Motorola Chip Sets (ex: 68HCxx processor series/ MACS)--> BigEndian Intel ( x86 ) -- > Little Endian (( The terminology actualy stems from Gulliver's Travels, a part of the story gets into how an egg should be opened: form the little end or the big end. ~~ True story, read it in one of my hardware texts once..)) NaN