CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 1999
    Posts
    7

    EnumWindows,EnumWindowsProc and MFC



    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

  2. #2
    Join Date
    Apr 1999
    Posts
    383

    Re: EnumWindows,EnumWindowsProc and MFC



    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

  3. #3
    Join Date
    Apr 1999
    Posts
    7

    Re: EnumWindows,EnumWindowsProc and MFC



    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

  4. #4
    Join Date
    Apr 1999
    Posts
    383

    Re: EnumWindows,EnumWindowsProc and MFC



    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured