I was just printing out some of the bits set in the various window styles we use such as %WS_OVERLAPPEDWINDOW, %WS_VISIBLE, etc. These all appear to be in the upper WORD of the 32 bit DWORD. It was my understanding that the low 16 bit word was fair game for custom control writers. However, in outputting some of the extended window styles, I saw that MS had ventured into the high order byte of the low order word (now, that is confusing!), ie., bits 8 through 15. For example, here is my little program to check out the bits in %WS_EX_OVERLAPPEDWINDOW...
So, would it be safe to assume we could use bits 0 through 7 for our own use in styles we may create for our own custom controls. At this point I really only need one bit for the control (a grid) I'm working on.
Code:
#Compile Exe #Dim All #Include "Win32Api.inc" Function PBMain() As Long Local dwVar As Dword Register i As Dword dwVar=%WS_EX_OVERLAPPEDWINDOW 'dwVar=%WS_EX_CLIENTEDGE Print "dwVar="dwVar Print For i=0 To 31 Print "Bit #"Trim$(Str$(i)), Abs(IsTrue(dwVar And 2^i)) Next i Waitkey$ PBMain=0 End Function
Code:
'Output '=============== 'dwVar= 768 ' 'Bit #0 0 'Bit #1 0 'Bit #2 0 'Bit #3 0 'Bit #4 0 'Bit #5 0 'Bit #6 0 'Bit #7 0 'Bit #8 1 set 'Bit #9 1 set 'Bit #10 0 'Bit #11 0 'Bit #12 0 'Bit #13 0 'Bit #14 0 'Bit #15 0 'Bit #16 0 'Bit #17 0 'Bit #18 0 'Bit #19 0 'Bit #20 0 'Bit #21 0 'Bit #22 0 'Bit #23 0 'Bit #24 0 'Bit #25 0 'Bit #26 0 'Bit #27 0 'Bit #28 0 'Bit #29 0 'Bit #30 0 'Bit #31 0
Comment