EnumWindows Problem

This is a discussion on EnumWindows Problem within the Windows Programming forums, part of the Platform Specific Boards category; Ok so i found a example on EnumWindows here and used it but it's getting a lot more stuff than ...

  1. #1
    Registered User Cha0sBG's Avatar
    Join Date
    May 2009
    Posts
    7

    EnumWindows Problem

    Ok so i found a example on EnumWindows here and used it but it's getting a lot more stuff than the windows i have on the taskbar. I want to get only windows on the taskbar.

    Here is the code:

    EnumWndProc function:
    Code:
    BOOL CALLBACK EnumWinProc(HWND hWnd,LPARAM lParam)
    {
    	HWND hList1= (HWND)lParam;
    	CHAR lpWinName[MAX_PATH];
    
    	GetWindowText(hWnd,lpWinName,MAX_PATH);
    	if(strlen(lpWinName))
    		SendMessage(hList1,LB_ADDSTRING,
    		0,(LPARAM)lpWinName);
    
    	return TRUE;
    
    }
    And the way i call it:
    Code:
    EnumWindows(EnumWinProc,(LPARAM)hList1);
    Hope that someone can help.

    ~Cha0sBG

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,450
    I'm not 100% sure of the criterias that make a window appear on the taskbar, but for one thing, it must be visible, so check if the window is visible.
    I don't think that modal windows are visible either. But perhaps someone else can tell you more or you could try to find out the conditions yourself.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    'Allo, 'Allo, Allo
    Join Date
    Apr 2008
    Posts
    611

  4. #4
    Registered User Cha0sBG's Avatar
    Join Date
    May 2009
    Posts
    7
    can u give the direct example cuz i'm a little drunk right now

  5. #5
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,450
    Then sober up, stop drinking and come back tomorrow!
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    Registered User Cha0sBG's Avatar
    Join Date
    May 2009
    Posts
    7
    ye thanks for .....

  7. #7
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,450
    Yeah, thanks for making a useless reply.
    Do yourself a favor and stay sober when programming.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    Registered User Cha0sBG's Avatar
    Join Date
    May 2009
    Posts
    7
    oh just go f**** yourself if u can't help someone .... i bet you don't even have 1% knowage that i have.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 10:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM

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