Page 1 of 1

wparam and lparam with WaitWindowEvent()

Posted: Mon Aug 09, 2004 5:54 pm
by Kazmirzak
I'm trying to decide between the window-callback-solution and the PureBasic WaitWindowEvent()-solution. The WaitWindowEvent()-solution is my favourite one but has one little problem: Is it possible to get wparam and lparam for the last event of WaitWindowEvent?

Another question: Is there somewhere a quick listing of all possible Event-nrs and the PB-Constants? I know there are 4 or 5 Events listed in the PureBasic Help, but WaitWindowEvent captures lots more... A start would be:

Code: Select all

Event    Description                                       Constant
512       mouse has moved in the app window                     ?
513       left mouse button has been pressed in the window      ? 
514       left mouse button has been released in the window     ?
....       ....                                                                          ....

Posted: Mon Aug 09, 2004 6:15 pm
by freedimension
There are commands for that: EventwParam() and EventlParam()
but they are deprecated and should not be used.

I'm always using both technologies at the same time, no problems so far.

Bis dann
Mirko

Posted: Mon Aug 09, 2004 7:41 pm
by GPI
One note: I found out, that some commands can change EventwParam() and EventlParam(), so it is always a good idea to store this in variables.

Code: Select all

EventId=WaitWindowEvent():wParam=EventwParam():lParam=EventlParam():EventType=EventType():WindowId=EventWindowID():GadgetId=EventGadgetId():MenuId=EventMenuId()

Posted: Tue Aug 10, 2004 5:51 am
by deadmoap
Play with Windows like the big boys do and use SetWindowCallback().

And for your second question, I'm too tired to find the link that has a full list of all the constants used in PureBasic, but the Win32 API has TONS OF CONSTANTS. I mean TONS AND TONS. Search google for something like "win32 constants" or something among those lines.