KEN Please answer Q about EnumWindows!

This is a discussion on KEN Please answer Q about EnumWindows! within the Windows Programming forums, part of the Platform Specific Boards category; I got the code working. How would I list JUST the parent windows?, because the code I have(u gave me) ...

  1. #1
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Question KEN Please answer Q about EnumWindows!

    I got the code working. How would I list JUST the parent windows?, because the code I have(u gave me) lists child windows, too. How would I get the tasbar programs(etc. in the system tary with the small icon) and the parent windows only. I mean like the CTRL+ALT+DEL. What would I do?
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: trifaze_mattu@lycos.com

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

  2. #2
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    hmmm.....I really don't know. It just gets all open windows (with a title) but it gets threads too sometimes, I think.

  3. #3
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Lightbulb I figured it out..

    I just meant the windows that are visible. Here's what I got:

    BOOL CALLBACK EnumWinProc(HWND hwnd,LPARAM lParam)
    {
    lBox = (HWND)lParam;
    CHAR lpWinName[MAX_PATH];

    GetWindowText(hwnd,lpWinName,MAX_PATH);
    if(strlen(lpWinName) && IsWindowVisible(hwnd))
    SendMessage(lBox,LB_ADDSTRING,0,(LPARAM)lpWinName) ;

    return TRUE;

    }

    I had to use IsWindowVisible(hwnd)!
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: trifaze_mattu@lycos.com

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Looking for constructive criticism
    By wd_kendrick in forum C Programming
    Replies: 16
    Last Post: 05-28-2008, 09:42 AM
  2. One quick question...
    By Kross7 in forum C++ Programming
    Replies: 10
    Last Post: 04-13-2007, 09:50 PM
  3. Tic Tac Toe program...
    By Kross7 in forum C++ Programming
    Replies: 12
    Last Post: 04-12-2007, 03:25 PM
  4. code help :)
    By Unregistered in forum C Programming
    Replies: 4
    Last Post: 02-28-2002, 12:12 PM
  5. Word of the day, ken
    By gamegod3001 in forum A Brief History of Cprogramming.com
    Replies: 20
    Last Post: 10-09-2001, 10:54 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21