Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / DLL Message loop not receiving WM_COMMAND message?

Author
Message
Skywriter
15
Years of Service
User Offline
Joined: 27th Aug 2008
Playing:
Posted: 23rd Jan 2010 09:56 Edited at: 23rd Jan 2010 10:11
I created a message loop function but for some reason GetMessage() function is receiving all WM_ messages except WM_COMMAND. But WndProc -is- receiving the WM_COMMAND. Please advice. Thereis the code of the dll:



and i use it in the DBPRO as follows:



Sky
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Jan 2010 15:45
What's happening is DBPro's own message loop is eating all the messages you are expecting to see.

Instead of implementing your own message loop, you need to subclass DBPro's main window, dealing with any messages specifically for your window and passing on all other messages to DBPro.

I did play around with subclassing once - I'll see if I can locate the source code.

Skywriter
15
Years of Service
User Offline
Joined: 27th Aug 2008
Playing:
Posted: 23rd Jan 2010 16:08 Edited at: 24th Jan 2010 10:33
Well i tried subclassing, but there was still the same result, or my subclassing was not right. To be honest i dont really understand subclassing yet... Thereis the example of subclassing i used:



The basic idea why i want my own message loop is to be able to control it from DBpro script. I can easily access WM_COMMAND from WinProc which is passed by window class parameter. Maybe you(or someone) have a good sample of how to make such subclassing? And another question is why db window did not eat other WM from the window? GetMessage() can receive all messages:window sizing, mouse, keyboard input, minimize, maximize buttons, etc.. except WM_COMMAND. Well that is weird for me...

Sky

Login to post a reply

Server time is: 2024-04-19 15:14:49
Your offset time is: 2024-04-19 15:14:49