Events in hidden dialogs (and services)
-
I have written a sample application to catch the WM_DEVICECHANGE message and it works well. Now I tried to move the same functionality into a service so I create the service and the service creates an instance of a class which I defined that extends CDialog (called CMessageHandler). CMessageHandler m_MessageHandler; m_MessageHandler.Create(HIDDEN_DIALOG, NULL); {This returns TRUE, I checked} CMessageHandler is supposed to handle WM_DEVICECHANGE event but it doesn't. I have declared it in the message map and I have created the necessary OnDEviceChange function but the messages never seem to be caught. I'm sure I'm doing something really stupid here. Any help would be greatly appreciated.
-
I have written a sample application to catch the WM_DEVICECHANGE message and it works well. Now I tried to move the same functionality into a service so I create the service and the service creates an instance of a class which I defined that extends CDialog (called CMessageHandler). CMessageHandler m_MessageHandler; m_MessageHandler.Create(HIDDEN_DIALOG, NULL); {This returns TRUE, I checked} CMessageHandler is supposed to handle WM_DEVICECHANGE event but it doesn't. I have declared it in the message map and I have created the necessary OnDEviceChange function but the messages never seem to be caught. I'm sure I'm doing something really stupid here. Any help would be greatly appreciated.
-
I had posted a question in this forum earlier and was told that a service could receive messages indirectly if I created a window to handle the messages. Would a window normally start receiving messages after the Create() method is called or should it be visible in order for it to receive messages? Am I creating it right? Thanks for your help :-)
-
I have written a sample application to catch the WM_DEVICECHANGE message and it works well. Now I tried to move the same functionality into a service so I create the service and the service creates an instance of a class which I defined that extends CDialog (called CMessageHandler). CMessageHandler m_MessageHandler; m_MessageHandler.Create(HIDDEN_DIALOG, NULL); {This returns TRUE, I checked} CMessageHandler is supposed to handle WM_DEVICECHANGE event but it doesn't. I have declared it in the message map and I have created the necessary OnDEviceChange function but the messages never seem to be caught. I'm sure I'm doing something really stupid here. Any help would be greatly appreciated.
Hello there. I have read a message that you posted in this forum that u have written a sample application to catch the WM_DEVICECHANGE message and it works well. I was wondering if you could e-mail to me a sample of the above application as I am interested in implementing that same function. Also, would you happen to know of any working samples/examples that have implemented the OnDeviceChange() function? If you do, it would be great if you could lead me to/send me those sources. I hope u can help. RaYDyO