sr243 Posted November 26, 2009 Share Posted November 26, 2009 The description for this Opt is Sets the way coords are used in the pixel functions, either absolute coords or coords relative to the window defined by hwnd (default active window): 0 = relative coords to the defined window 1 = absolute screen coordinates (default) 2 = relative coords to the client area of the defined window But what is the difference between mode 0 and 2? Thanks! Link to comment Share on other sites More sharing options...
AndyG Posted November 26, 2009 Share Posted November 26, 2009 Hi, 0 includes the borders and the top area with the title 2 incudes only the inner rectangle Link to comment Share on other sites More sharing options...
sr243 Posted November 26, 2009 Author Share Posted November 26, 2009 (edited) Thanks Andy! That makes sense now. Do you happen to know whether controlgetpos is relative to the borders like mode 0 or to the inner rectangle like mode 2? It says to the client window, so I'm assuming like mode 2, right? Edited November 26, 2009 by sr243 Link to comment Share on other sites More sharing options...
AndyG Posted November 26, 2009 Share Posted November 26, 2009 #include <GUIConstants.au3> While 1 For $i = 0 To 2 Opt("GUICoordMode", $i);try the different modes 0,1,2 and look at the position of the buttons! GUICreate('GuiCoordMode ' & $i) $button0 = GUICtrlCreateButton("Button0", 5, 5, 50, 30) $button1 = GUICtrlCreateButton("Button1", 70, 5, 50, 30) $button2 = GUICtrlCreateButton("Button2", 130, 5, 50, 30) guictrlcreatelabel("close the window pls...",5,100,100,30) GUISetState() Sleep(1000) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect $a = ControlGetPos("GuiCoordMode " & $i, "", $button0) ToolTip($a[0] & " " & $a[1]) WEnd Next WEnd Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now