Monday, August 20, 2012 7:06 PM
I have an MFC project running on WinCE 6.0 R3. In general, the UI is constructed with WS_POPUP CDialogs with no title bars.
Because remote spy has been broken for some time on WinCE, I implemented a simple spy mechanism using OnWndMsg handlers. Recently, I noticed that all dialogs in the system, whether hidden or visible, are constantly receiving WM_GETTEXT messages (0x0d).
I see no traffic or updates elsewhere in the application (our system is not doing work, the application is "idle"). I put breakpoints on every call to GetWindowText and SetWindowText throughout the GUI, none were hit. I see no traffic in the thread's PreTranslate or in any dialog's PreTranslate. No timers are running under any CWnd objects. From what I can tell, none of my code is running besides the OnWndMsg hook; the messages just show up then disappear back into the CDialog handler.
I don't see any messages for any of the various widgets in the system; only for CDialogs, and then only for those with the WS_POPUP style...I have some child dialogs which are not receiving the messages.
I tried intercepting these messages in OnWndMsg and returning TRUE (to say they were handled), which didn't stop them. FALSE also did not work.
I tried handling these messages using ON_MESSAGE. In the handler, I tried returning zero. I also tried copying a static string ("dialog") into the buffer and returning the requisite number of characters. Neither stopped the messages.
Any ideas on where these messages are coming from?
Tuesday, August 21, 2012 4:39 AM
Because remote spy has been broken for some time on WinCE
Why would you say that? I just connected remote spy and it seemed to work fine on my WinCE 6R3 system.
The only reason I can think that remote spy doesn't work is if you are building explorer.exe and activesync into the image but are launching your own application instead of explorer - in that case we had to create a dummy taskbar to handle the window api registration stuff and then all the remote tools work correctly.
Sorry can't help with the rest!
Wednesday, August 22, 2012 3:45 PM
Thanks for the reply.
Perhaps there was some registration item I missed with Spy. From what I remember, it would show my application but couldn't look at the windows inside it. Did some Googling and found people complaining that it was broken, so that was my assumption and I moved on.
Either way, I don't think the Spy issue is related to the WM_GETTEXT messages, just wanted to explain the purpose of the OnWndMsg override.