GetTopWindow() and WM_GETTEXT - Exp. of results?
I''m currenly playing around with windows coding, and trying to familiarize myself with the terrain. I''ve written a tiny little app that uses GetTopWindow to grab a handle to the top window, and then (via a while loop and GetNextWindow) to spit the caption of each succesive window (by sending a WM_GETTEXT message) to a file.
The program works just like it should, but the results confused me a bit. I had expected the resulting output to be the captions of all visible windows on the taskbar, but such is not the case. Here''s a sample peice of output (with blank window captions filtered out)
Handle: 468 Caption: ZoneAlarm
Handle: 340 Caption: Task Scheduler is ready.
Handle: 464 Caption: ZoneAlarm
Handle: 2904 Caption: TEST02
Handle: 2932 Caption: HbBubble
Handle: 1460 Caption: Test02
Handle: 2912 Caption: OLEChannelWnd
Handle: 1156 Caption: HbBubble
Handle: 3148 Caption: AIMLogger
Handle: 984 Caption: OLEChannelWnd
Handle: 3096 Caption: OLEChannelWnd
Handle: 3656 Caption: MSDN Library Visual Studio 6.0
Handle: 2480 Caption: lutrosis34''s Buddy List Window
Handle: 2656 Caption: Sign On
Handle: 2680 Caption: Xprt Message Window
Handle: 2236 Caption: Xprt Message Window
Handle: 1376 Caption: AOL PPP VxD interface
Handle: 1984 Caption: DDE Server Window
Handle: 1972 Caption: OleMainThreadWndName
Handle: 1576 Caption: OLEChannelWnd
Handle: 3516 Caption: DDE Server Window
Handle: 3512 Caption: OleMainThreadWndName
Handle: 232 Caption: SYSTEM AGENT COM WINDOW
Handle: 2828 Caption: DDHelpWndClass
Handle: 2996 Caption: Spooler Process
Handle: 976 Caption: OleMainThreadWndName
Handle: 944 Caption: Norton AntiVirus
Handle: 448 Caption: Magellan MSWHEEL
Handle: 444 Caption: Pointer.exe Invisible Window
Handle: 424 Caption: Power Meter
Handle: 316 Caption: DDE Server Window
Handle: 312 Caption: OleMainThreadWndName
Handle: 244 Caption: OleMainThreadWndName
Handle: 228 Caption: DDE Server Window
Handle: 224 Caption: OleMainThreadWndName
Handle: 152 Caption: Winmodem NVRAM
Handle: 456 Caption: MS_WebcheckMonitor
Handle: 3752 Caption: Source File Properties
Handle: 1968 Caption: America Online
Handle: 1768 Caption: Lutrosis - Instant Message
Handle: 3088 Caption: HbBubble
Handle: 1580 Caption: Matt
Handle: 384 Caption: Program Manager
I included code to filter blank captions, but before doing so I noticed there were quite a few of them.
So basically, what I''m wondering is what exactly are these? All running processes? Or mabye all running threads? I hate not knowing exactly what I''m seeing, so any help would be appreciated
-Lutrosis
-Lutrosis#define WHOOPS 0class DogClass {public: CDog() { printf("Ruff!"); } Run() { printf("Run!"); } Crash() { printf("%d",100/WOOPS); }};DogClass CDog;CDog.Run();CDog.Crash();
A little help here, guys (and gals)? I''m sure this isn''t that tough a question.
And no, I won''t be bringing this to the top again, I''ll bet you hate that as much as I do But perhaps someone who would normally respond just missed the post the first time around?. Hopefully not wishful thinking...
-Lutrosis
And no, I won''t be bringing this to the top again, I''ll bet you hate that as much as I do But perhaps someone who would normally respond just missed the post the first time around?. Hopefully not wishful thinking...
-Lutrosis
-Lutrosis#define WHOOPS 0class DogClass {public: CDog() { printf("Ruff!"); } Run() { printf("Run!"); } Crash() { printf("%d",100/WOOPS); }};DogClass CDog;CDog.Run();CDog.Crash();
A lot of programs create hidden windows and use them solely for message processing (one window name implies this, "Pointer.exe Invisible Window").
Also, each icon on the task bar must have a window associated with it. If you don''t want this window to be shown on the taskbar, you''d make it hidden.
Also, each icon on the task bar must have a window associated with it. If you don''t want this window to be shown on the taskbar, you''d make it hidden.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement