|
VC++ 6.0 Win32 GetWindowName() function does now exist but you
could write one for your own
char* GetWindowName(HWND hWnd)
{
char *retval = new char(1000);
GetWindowText(hWnd,retval,100);
return retval;
}
// Here is how you call it
MsgBox(GetWindowName(hTemp));
void MsgBox(char* msg)
{
MessageBox(hWid,msg,msg,0); // hWid is the handle to the main window
}
Now how the code works.
GetWindowText Function
The GetWindowText function copies the text of the specified window's title bar
(if it has one) into a buffer. If the specified window is a control, the text of the
control is copied. However, GetWindowText cannot retrieve the text of a
control in another application.
|
|