Herror ::get_window_extents (
    const HTuple &WindowHandle,
    long *Row,
    long *Column,
    long *Width,
    long *Height
)
HTuple HWindow::GetWindowExtents (
    HTuple *Column,
    HTuple *Width,
    HTuple *Height
) const

Information about a window's size and position.

::get_window_extents returns the position of the upper left corner, as well as width and height of the output window.


Attention

Size and position of a window may be modified by the window manager, without explicit instruction in the program. Therefore the values which are returned by ::get_window_extents may change cause of side effects.


Parameters

WindowHandle (input_control)
window -> HTuple.long
Window identifier.

Row (output_control)
rectangle.origin.y -> long *
Row index of upper left corner of the window.

Column (output_control)
rectangle.origin.x -> long *
Column index of upper left corner of the window.

Width (output_control)
rectangle.extent.x -> long *
Window width.

Height (output_control)
rectangle.extent.y -> long *
Window height.


Example
open_window(100,100,200,200,"root","visible","",&WindowHandle) ;
fwrite_string("Move the window with the mouse!") ;
fnew_line() ;
create_tuple(&String,1) ;
do
{
  get_mbutton(WindowHandle,_,_,&Button) ;
  get_window_extents(WindowHandle,&Row,&Column,&Width,&Height) ;
  sprintf(buf,"Row %d Col %d ",Row,Column) ;
  set_s(String,buf,0) ;
  T_fwrite_string(String) ;
  fnew_line() ;
}
while(Button < 4) ;

Result

If the window is valid ::get_window_extents returns H_MSG_TRUE. If necessary an exception handling is raised.


Possible Predecessors

::open_window, ::set_draw, ::set_color, ::set_colored, ::set_line_width, ::open_textwindow


See also

::set_window_extents, ::open_window, ::open_textwindow


Module

System



Copyright © 1996-2002 MVTec Software GmbH