wparam and lparam with WaitWindowEvent()

Just starting out? Need help? Post your questions and find answers here.
Kazmirzak
User
User
Posts: 92
Joined: Fri Jun 18, 2004 5:44 pm
Location: Germany

wparam and lparam with WaitWindowEvent()

Post 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     ?
....       ....                                                                          ....
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post 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
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post 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()
deadmoap
User
User
Posts: 79
Joined: Sun Feb 22, 2004 11:45 pm
Location: Riverdale, Utah
Contact:

Post 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.
Post Reply