Click to See Complete Forum and Search --> : EnumWindows,EnumWindowsProc and MFC


ye jing cheng yap keem siah
March 30th, 1999, 10:36 PM
Hi;

I know how to use EnumWindows and EnumWindowsProc in cpp,

but i don;t know how to define the prototype of th EnumWindowsProc

in MFC dialog base application,

anyone can give me a sample code?

Thanks

Dave Lorde
March 31st, 1999, 09:15 AM
I don't see the problem, AFAIAA the prototype for EnumWindowsProc is no different using MFC than in plain Windows SDK.


What problems do you get?


Dave

ye jing cheng yap keem siah
March 31st, 1999, 08:49 PM
thanks for you reply,

but i still wonder how shall i do..

1. Where shall i put the EnumWindowsProc function? A new class? View class?

or as a global?

2. How shall i define the EnumWindowsProc? as BOOL CALLBACK?


Thanks

Dave Lorde
April 1st, 1999, 04:32 AM
You can put it wherever you like. If you make it a class member, you must make it static.


It is declared as:


BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam);


Of course, you don't have to call it EnumWindowsProc!


Dave