RE: Window Notification Messages
- Posted by Brian Broker <bkb at cnw.com> Aug 08, 2001
- 431 views
Bernie, Run this program and explain to me the difference... I don't understand what the problem is. include machine.e atom a1, a2 a1 = allocate(4) a2 = allocate(4) poke4(a1,-520) poke4(a2,#FFFFFDF8) ? peek4s(a1) ? peek4u(a1) ? peek4s(a2) ? peek4u(a2) while get_key() = -1 do -- press any key to exit program (in case you saved as exw) end while -- Brian Bernie Ryan wrote: > > I have mentioned this before and I am still not satified with > using negative decimal numbers in in place of the constants > in the WM_NOTIFY codes ( NMHDR.code ) > > A Notification code is an UNSIGNED value. > > In the windows COMMCTRL.H header > TTN_FIRST is defined as (0U-520U) -- for tooltips > > In the win32lib > TTN_FIRST is defined as -520 > > I think it should be #FFFFFDF8 > > Also I think that all of the notification codes in COMMCTRL.H header > that are in this (0U-520U) form should NOT be defined with a minus > value but in their long HEX form. > > The reason for this is that if you are peeking at a NOTIFICATION > message and you use peek4u ( the logical assumption when checking > notification messages ) you will never see the CORRECT message > to respond to; you have to use peek4s instead. > > I think this can cause errors and confuse someone trying to write > new code for the library > > I searched through the window examples and win32lib but no one > seems to be using these notification codes. > > PS: Coming soon WIN32ERU.EX > > Bernie > Bernie > > >