= getDialogPos =
== Syntax == int getDialogPos(int w, int t) == Arguments == :w ::A switch to choose which value to return: 0 for the left / x co-ordinate, 1 for the top / y co-ordinate, 2 for the window width and 3 for the window height. :t ::A Boolean flag indicating whether x and y are absolute screen coordinates (t == true), or whether they are relative to the client area (t == false). == Return == The requested window dimension as an integer. == Description == Gets the position and size of the filter dialog window. If t is true, x and y are absolute screen coordinates; otherwise, x and y are relative to the upper-left corner of the client area in the host application's main window. All measurements are in dialog box units (DBUs). == Example == <code> ctl[0]: PUSHBUTTON, "Where are we now?", Size=(90,*) ctl[8]: STATICTEXT, "", Size=(140, *) OnCtl(n): { if (n==0) { int leftx, topy, width, height; leftx = getDialogPos(0, 0); topy = getDialogPos(1, 0); width = getDialogPos(2, 0); height = getDialogPos(3, 0); sprintf(str1, "X: %d, Y: %d, Width: %d, Height: %d", leftx, topy, width, height); setCtlText(8, str1); } return true; }</code> == See Also == |