0

Okay i need help understanding this function. I need to know the HWND of a window. but i dont know how to get that. Also is it different for every computer? or what?

So say i execute my console program and paint is open or some other program. So when in the console program i press say... p and it switches to paint.

how would i do that? Thanks in advance!

sorry if this doesnt make very much sense...

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by __avd
0

meb111>I need to know the HWND of a window.

It's a Window data type.
CreateWindow or CreateWindowEx() function returns a window handle that uniquely identifies the window. A program uses this handle to direct their actions to that window.

>but i dont know how to get that.
Through FindWindow or FindWindowEx.

>Also is it different for every computer? or what?
Yes

>So say i execute my console program and paint is open or some other program. So when in the console program i press say... p and it switches to paint. how would i do that?

Find the HWND of Paint and use SwitchToThisWindow function.
you may also uses SetActiveWindow, and SetWindowPos.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.