Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

move outside application window to x y coords

Status
Not open for further replies.

ahoodin

Programmer
Jul 25, 2001
48
US
I would like to launch & or switch to application at x, y coordinates from my application.
I dont necessarily need the application to show up in a child form or anything but
I just need it to show up where we expect it to be. How can I accomplish this?


CWnd* CWndScrnDisplay;
CWndScrnDisplay= FindWindow( NULL, svScreen );
SetWindowPos (CWndScrnDisplay,0,0,0,0,SWP_NOSIZE|SWP_SHOWWINDOW);


Here are my recent attempts to do this. The CWnd comes back unititialized.
Any Ideas?

Asher

Shift to the left! Shift to the right! Pop up, push down! Byte! Byte! Byte!"
 
Try this API call ->

BOOL MoveWindow(

HWND hWnd, // handle to window
int X, // horizontal position
int Y, // vertical position
int nWidth, // width
int nHeight, // height
BOOL bRepaint // repaint option

);
mlg400@blazemail.com
 
CWndScrnDisplay= FindWindow( NULL, svScreen );
is failing to return the CWnd. I still have to get the CWnd to get at m_hwnd the handle to do that particular API call. Even If I did


void MoveWindow( int x, int y, int nWidth, int nHeight, BOOL bRepaint = TRUE );


I would still need the CWnd.

Asher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top