Thread: GetWindowPlacement() trouble

  1. #1
    Android geek@02's Avatar
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    470

    GetWindowPlacement() trouble

    Hi!
    This code is not working properly:

    Code:
    VOID CALLBACK TimerProcSTMenuItAddRem(HWND hwnd,UINT uMsg,UINT_PTR idEvent,DWORD dwTime)
    {
    	WINDOWPLACEMENT wp;
    	wp.length = sizeof(WINDOWPLACEMENT);
    	GetWindowPlacement(hwndGL, &wp);
    	if(wp.showCmd==SW_HIDE)
      	  MessageBox(NULL,"SW_HIDE",NULL,MB_OK);
    }
    No matter what the window state, wp.showCmd always returns 1.
    Please Help.

    Thanx.
    GameJolt: https://gamejolt.com/@KasunL
    Game Development Youtube:
    https://is.gd/XyhYoP
    Amateur IT Blog: http://everything-geeky.blogspot.com/



    (and, sorry for my amateur English)

  2. #2
    Tropical Coder Darryl's Avatar
    Join Date
    Mar 2005
    Location
    Cayman Islands
    Posts
    503
    FROM MSDN:

    If the window identified by the hWnd parameter is maximized, the showCmd member is SW_SHOWMAXIMIZED. If the window is minimized, showCmd is SW_SHOWMINIMIZED. Otherwise, it is SW_SHOWNORMAL.
    So I am guess it doesn't report SW_HIDE

  3. #3
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    There's IsWindowVisible().

    Let us know what you're trying to accomplish if you still need assistance.

    gg

  4. #4
    Android geek@02's Avatar
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    470
    Thanx guys, it went ok with IsWindowVisible().
    GameJolt: https://gamejolt.com/@KasunL
    Game Development Youtube:
    https://is.gd/XyhYoP
    Amateur IT Blog: http://everything-geeky.blogspot.com/



    (and, sorry for my amateur English)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Trouble with assignment in C
    By mohanlon in forum C Programming
    Replies: 17
    Last Post: 06-23-2009, 10:44 AM
  2. Replies: 6
    Last Post: 01-03-2007, 03:02 PM
  3. Is it so trouble?
    By Yumin in forum Tech Board
    Replies: 4
    Last Post: 01-30-2006, 04:10 PM
  4. trouble scanning in... and link listing
    By panfilero in forum C Programming
    Replies: 14
    Last Post: 11-21-2005, 12:58 PM
  5. C++ program trouble
    By senrab in forum C++ Programming
    Replies: 7
    Last Post: 04-29-2003, 11:55 PM