PDA

View Full Version : Where can I find those callback %WM_s names?



ReneMiner
12-02-2013, 17:54
I'm stuck again after typing a few lines and searching help + forum for some overview about callbacks with no success. :(

I want to know: what %WM_...s I need to setup for example to recognize if my Main-Window minimizes or restores to normal size so I can hide and show the other dialogs as well or if the mouse just moves over a control/dialog etc.

Is there some list?

Petr Schreiber
13-02-2013, 00:15
Hi Rene,

these are Win32 messages, documented by Microsoft on MSDN (http://msdn.microsoft.com/en-us/library/ms644927%28v=VS.85%29.aspx#system_defined). Good book on this is Charles Petzold's "Programming Windows".

ThinBASIC preincludes some of the most useful ones, but you can use any - just by defining the constant.

In the referenced link, you can see all system messages. The windows messages are prefixed WM, so you have a look at that part of the table (hint - the last row).
The right column then groups the messages logically. You want to check if windows is maximized, minimized... then what you need to check is Windows Notifications (http://msdn.microsoft.com/en-us/library/ff468922%28v=vs.85%29.aspx).
Maximizing, minimizing ... that has something to do with resizing, right, so you check out the WM_SIZE (http://msdn.microsoft.com/en-us/library/ms632646%28v=vs.85%29.aspx) message.

You can see, that you can retreive the cause of size change (maximize, minimize, restore,...) based on wParam value. In ThinBASIC it is called Callback_wParam or cbWParam.


Petr

ReneMiner
13-02-2013, 01:29
Thanks for the link, Petr.
At least I have a table of them constants now but the content of those pages doesn't tell me anything :(

But I'm currently really unmotivated because it's always hours and hours of frustrated searching docs to get that ugly UI-stuff not even together. There were too many days when I sat in front of the same 3 lines of not working script after 4 to 5 hours. I guess I'll dump the multiple dialogs, forget about understanding UI and just use some good old TBGL-window and resurrect/re-invent my old Sprite-UI since the fonts get measured correctly on my new system now...

It might take longer in the first place to create my own controls, but at a certain point I'll overtake UI and make bigger steps forward.

I didn't learn the callback-stuff in the past three months and any further trying seems a waste of time for now. In that time I could have created a complete Sprite-UI already and probably have gotten my 3d-designer-tool (including Entity-, Terrain- and Scene-Editor) to alpha-stage.
Maybe I'm gonna try using dialogs again if VisualDesigner developed so far that even someone like me - who just knows how to deal with the simple trigonometic stuff like how to rotate matrices and how to calculate points in 3d - is able to create some working windows-ui using thinBasic in less than 3 months.



Uses "TBGL"
Uses "Console"
Uses "File"
Uses "Math"

for the meantime...

Edit:
Sorry John, was still typing while you posted, so saw your post later. I have no idea what "iup" nor "Sbx" means and I don't even know how to differ headers from wrappers. I'm a basic-user but not a basic-developer. I'm one of those guys that use the stuff that guys like you create.