+ Reply to Thread
Results 1 to 2 of 2

Thread: Restoring a specified window to its position?

  1. #1
    Junior Member
    Join Date
    Feb 2012

    Restoring a specified window to its position?

    I have an application that monitors other GUI application.

    User has control to restore the application.

    I need to control application operation like, Minimize, Restoring the application.

    How can I do this using WIN 32 API and Send/Post Message?

  2. #2
    You can use SendMessage and WM_SYSCOMMAND message identifier.

    void SendSysCommand(int nOperation)
    	HWND hTargetWnd = ::FindWindow(NULL, "TestMFC") ;
    	if (NULL != hTargetWnd)
    		::SendMessage(hTargetWnd, WM_SYSCOMMAND, nOperation, 0) ;
    void UseSysCommand()
    	SendSysCommand(SC_MINIMIZE) ;
    	SendSysCommand(SC_RESTORE) ;

+ Reply to Thread


Posting Permissions

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