Log in

View Full Version : Window handles


Quell
December 26th, 2004, 02:38
Hey.
i tried to get a window handle of a button in a win32 application under windows xp. I used the Spy++ to try to get the name of the button, however i could not select the button, i could only select the area around it. I also used Winspector Spy(free imitation of spy++)
same problem.
I am positive i can't find any info about this. I looked on msdn on documentation to spy++
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcug98/html/_asug_opening_window_properties.asp

any ideas on why i can't select the button, i can only select the dialog box itself?
thx

TQN
December 26th, 2004, 04:33
This can be a windowless control, such as TBitBtn in Delphi, some button in VB as I know. They do not have a window handle, instead of they will be drawed directly on the area of parent control.

Quell
December 26th, 2004, 12:17
is there a way to be sure if it is windowless?
when i move my find window tool over the window i get that is is of "Surface" class. So i figure it is a custom class.
I found some of the .res file:
Code:

"LoginButton"
{
"ControlName" "Button"
"fieldName" "LoginButton"
"xpos" "120"
"ypos" "117"
"wide" "80"
"tall" "24"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "3"
"labelText" "#Login_Btn"
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
"wrap" "0"
"Command" "Login"
"Default" "1"
}


Any ideas if this button resource is suaully used as a window or not. just by assosiation, have anyone seen a resource declaation like this an was it used as a window or not?