1<HTML>
2<head>
3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
4<title>wxWindow</title></head>
5<BODY BGCOLOR="#FFFFFF">
6<A NAME="wxwindow"></A><CENTER>
7<A HREF="http://www.wx.org/wx.zip#zip:wx.htm#anchor">Contents</A> <A HREF="wx22.htm#classref">Up</A> <A HREF="wx259.htm#wxwave">&lt;&lt;</A> <A HREF="wx261.htm#wxwindowdc">&gt;&gt;</A> </CENTER><HR>
8
9<H2>wxWindow</H2>
10<P>
11wxWindow is the base class for all windows.  Any
12children of the window will be deleted automatically by the destructor
13before the window itself is deleted.<P>
14<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
15<A HREF="wx85.htm#wxevthandler">wxEvtHandler</A><BR>
16
17<A HREF="wx158.htm#wxobject">wxObject</A><P>
18<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
19&lt;wx/window.h&gt;<P>
20<B><FONT COLOR="#FF0000">Window styles</FONT></B><P>
21The following styles can apply to all windows, although they will not always make sense for a particular
22window class.<P>
23
24<TABLE BORDER>
25
26
27<TR><TD VALIGN=TOP>
28<B>wxSIMPLE_BORDER</B>
29</TD>
30
31<TD VALIGN=TOP>
32Displays a thin border around the window. wxBORDER is the old name
33for this style.
34</TD></TR>
35
36
37<TR><TD VALIGN=TOP>
38<B>wxDOUBLE_BORDER</B>
39</TD>
40
41<TD VALIGN=TOP>
42Displays a double border. Windows only.
43</TD></TR>
44
45
46<TR><TD VALIGN=TOP>
47<B>wxSUNKEN_BORDER</B>
48</TD>
49
50<TD VALIGN=TOP>
51Displays a sunken border.
52</TD></TR>
53
54
55<TR><TD VALIGN=TOP>
56<B>wxRAISED_BORDER</B>
57</TD>
58
59<TD VALIGN=TOP>
60Displays a raised border.
61</TD></TR>
62
63
64<TR><TD VALIGN=TOP>
65<B>wxSTATIC_BORDER</B>
66</TD>
67
68<TD VALIGN=TOP>
69Displays a border suitable for a static control.
70</TD></TR>
71
72
73<TR><TD VALIGN=TOP>
74<B>wxTRANSPARENT_WINDOW</B>
75</TD>
76
77<TD VALIGN=TOP>
78The window is transparent, that is, it will not receive paint
79events. Windows only.
80</TD></TR>
81
82
83<TR><TD VALIGN=TOP>
84<B>wxTAB_TRAVERSAL</B>
85</TD>
86
87<TD VALIGN=TOP>
88Use this to enable tab traversal for non-dialog windows.
89</TD></TR>
90
91
92<TR><TD VALIGN=TOP>
93<B>wxVSCROLL</B>
94</TD>
95
96<TD VALIGN=TOP>
97Use this style to enable a vertical scrollbar.
98</TD></TR>
99
100
101<TR><TD VALIGN=TOP>
102<B>wxHSCROLL</B>
103</TD>
104
105<TD VALIGN=TOP>
106Use this style to enable a horizontal scrollbar.
107</TD></TR>
108
109
110<TR><TD VALIGN=TOP>
111<B>wxCLIP_CHILDREN</B>
112</TD>
113
114<TD VALIGN=TOP>
115Use this style to eliminate flicker caused by the background being
116repainted, then children being painted over them. Windows-only.
117</TD></TR>
118
119
120</TABLE>
121<P>
122See also <A HREF="wx305.htm#windowstyles">window styles overview</A>.<P>
123<B><FONT COLOR="#FF0000">See also</FONT></B><P>
124<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
125<B><FONT COLOR="#FF0000">Members</FONT></B><P>
126<A HREF="#topic1026">wxWindow::wxWindow</A><BR>
127<A HREF="#topic1027">wxWindow::~wxWindow</A><BR>
128<A HREF="#topic1028">wxWindow::AddChild</A><BR>
129<A HREF="#wxwindowcapturemouse">wxWindow::CaptureMouse</A><BR>
130<A HREF="#wxwindowcenter">wxWindow::Center</A><BR>
131<A HREF="#wxwindowcentre">wxWindow::Centre</A><BR>
132<A HREF="#wxwindowclear">wxWindow::Clear</A><BR>
133<A HREF="#topic1029">wxWindow::ClientToScreen</A><BR>
134<A HREF="#wxwindowclose">wxWindow::Close</A><BR>
135<A HREF="#wxwindowconvertdialogtopixels">wxWindow::ConvertDialogToPixels</A><BR>
136<A HREF="#wxwindowconvertpixelstodialog">wxWindow::ConvertPixelsToDialog</A><BR>
137<A HREF="#wxwindowdestroy">wxWindow::Destroy</A><BR>
138<A HREF="#topic1030">wxWindow::DestroyChildren</A><BR>
139<A HREF="#wxwindowdragacceptfiles">wxWindow::DragAcceptFiles</A><BR>
140<A HREF="#wxwindowenable">wxWindow::Enable</A><BR>
141<A HREF="#wxwindowfindfocus">wxWindow::FindFocus</A><BR>
142<A HREF="#wxwindowfindwindow">wxWindow::FindWindow</A><BR>
143<A HREF="#wxwindowfit">wxWindow::Fit</A><BR>
144<A HREF="#wxwindowgetbackgroundcolour">wxWindow::GetBackgroundColour</A><BR>
145<A HREF="#topic1031">wxWindow::GetCharHeight</A><BR>
146<A HREF="#topic1032">wxWindow::GetCharWidth</A><BR>
147<A HREF="#topic1033">wxWindow::GetChildren</A><BR>
148<A HREF="#wxwindowgetclientsize">wxWindow::GetClientSize</A><BR>
149<A HREF="#wxwindowgetconstraints">wxWindow::GetConstraints</A><BR>
150<A HREF="#wxwindowgetdefaultitem">wxWindow::GetDefaultItem</A><BR>
151<A HREF="#wxwindowgetdroptarget">wxWindow::GetDropTarget</A><BR>
152<A HREF="#wxwindowgeteventhandler">wxWindow::GetEventHandler</A><BR>
153<A HREF="#wxwindowgetfont">wxWindow::GetFont</A><BR>
154<A HREF="#wxwindowgetforegroundcolour">wxWindow::GetForegroundColour</A><BR>
155<A HREF="#topic1034">wxWindow::GetGrandParent</A><BR>
156<A HREF="#topic1035">wxWindow::GetHandle</A><BR>
157<A HREF="#wxwindowgetid">wxWindow::GetId</A><BR>
158<A HREF="#topic1036">wxWindow::GetPosition</A><BR>
159<A HREF="#topic1037">wxWindow::GetLabel</A><BR>
160<A HREF="#wxwindowgetname">wxWindow::GetName</A><BR>
161<A HREF="#topic1038">wxWindow::GetParent</A><BR>
162<A HREF="#wxwindowgetrect">wxWindow::GetRect</A><BR>
163<A HREF="#wxwindowgetreturncode">wxWindow::GetReturnCode</A><BR>
164<A HREF="#wxwindowgetscrollthumb">wxWindow::GetScrollThumb</A><BR>
165<A HREF="#wxwindowgetscrollpos">wxWindow::GetScrollPos</A><BR>
166<A HREF="#wxwindowgetscrollrange">wxWindow::GetScrollRange</A><BR>
167<A HREF="#wxwindowgetsize">wxWindow::GetSize</A><BR>
168<A HREF="#topic1039">wxWindow::GetTextExtent</A><BR>
169<A HREF="#wxwindowgettitle">wxWindow::GetTitle</A><BR>
170<A HREF="#wxwindowgetupdateregion">wxWindow::GetUpdateRegion</A><BR>
171<A HREF="#topic1040">wxWindow::GetWindowStyleFlag</A><BR>
172<A HREF="#wxwindowinitdialog">wxWindow::InitDialog</A><BR>
173<A HREF="#wxwindowisenabled">wxWindow::IsEnabled</A><BR>
174<A HREF="#wxwindowisretained">wxWindow::IsRetained</A><BR>
175<A HREF="#wxwindowisshown">wxWindow::IsShown</A><BR>
176<A HREF="#wxwindowlayout">wxWindow::Layout</A><BR>
177<A HREF="#wxwindowloadfromresource">wxWindow::LoadFromResource</A><BR>
178<A HREF="#wxwindowlower">wxWindow::Lower</A><BR>
179<A HREF="#wxwindowmakemodal">wxWindow::MakeModal</A><BR>
180<A HREF="#wxwindowmove">wxWindow::Move</A><BR>
181<A HREF="#wxwindowonactivate">wxWindow::OnActivate</A><BR>
182<A HREF="#wxwindowonchar">wxWindow::OnChar</A><BR>
183<A HREF="#wxwindowoncharhook">wxWindow::OnCharHook</A><BR>
184<A HREF="#wxwindowoncommand">wxWindow::OnCommand</A><BR>
185<A HREF="#wxwindowonclose">wxWindow::OnClose</A><BR>
186<A HREF="#wxwindowonclosewindow">wxWindow::OnCloseWindow</A><BR>
187<A HREF="#wxwindowondropfiles">wxWindow::OnDropFiles</A><BR>
188<A HREF="#wxwindowonerasebackground">wxWindow::OnEraseBackground</A><BR>
189<A HREF="#wxwindowonkeydown">wxWindow::OnKeyDown</A><BR>
190<A HREF="#wxwindowonkeyup">wxWindow::OnKeyUp</A><BR>
191<A HREF="#wxwindowonkillfocus">wxWindow::OnKillFocus</A><BR>
192<A HREF="#wxwindowonidle">wxWindow::OnIdle</A><BR>
193<A HREF="#wxwindowoninitdialog">wxWindow::OnInitDialog</A><BR>
194<A HREF="#wxwindowonmenuhighlight">wxWindow::OnMenuHighlight</A><BR>
195<A HREF="#wxwindowonmouseevent">wxWindow::OnMouseEvent</A><BR>
196<A HREF="#wxwindowonmove">wxWindow::OnMove</A><BR>
197<A HREF="#wxwindowonpaint">wxWindow::OnPaint</A><BR>
198<A HREF="#wxwindowonscroll">wxWindow::OnScroll</A><BR>
199<A HREF="#wxwindowonsetfocus">wxWindow::OnSetFocus</A><BR>
200<A HREF="#wxwindowonsize">wxWindow::OnSize</A><BR>
201<A HREF="#wxwindowonsyscolourchanged">wxWindow::OnSysColourChanged</A><BR>
202<A HREF="#wxwindowpopeventhandler">wxWindow::PopEventHandler</A><BR>
203<A HREF="#wxwindowpopupmenu">wxWindow::PopupMenu</A><BR>
204<A HREF="#wxwindowpusheventhandler">wxWindow::PushEventHandler</A><BR>
205<A HREF="#wxwindowraise">wxWindow::Raise</A><BR>
206<A HREF="#wxwindowrefresh">wxWindow::Refresh</A><BR>
207<A HREF="#wxwindowreleasemouse">wxWindow::ReleaseMouse</A><BR>
208<A HREF="#wxwindowremovechild">wxWindow::RemoveChild</A><BR>
209<A HREF="#wxwindowscreentoclient">wxWindow::ScreenToClient</A><BR>
210<A HREF="#wxwindowscrollwindow">wxWindow::ScrollWindow</A><BR>
211<A HREF="#wxwindowsetacceleratortable">wxWindow::SetAcceleratorTable</A><BR>
212<A HREF="#wxwindowsetautolayout">wxWindow::SetAutoLayout</A><BR>
213<A HREF="#wxwindowsetbackgroundcolour">wxWindow::SetBackgroundColour</A><BR>
214<A HREF="#wxwindowsetclientsize">wxWindow::SetClientSize</A><BR>
215<A HREF="#wxwindowsetcursor">wxWindow::SetCursor</A><BR>
216<A HREF="#wxwindowseteventhandler">wxWindow::SetEventHandler</A><BR>
217<A HREF="#wxwindowsetconstraints">wxWindow::SetConstraints</A><BR>
218<A HREF="#wxwindowsetdroptarget">wxWindow::SetDropTarget</A><BR>
219<A HREF="#wxwindowsetfocus">wxWindow::SetFocus</A><BR>
220<A HREF="#wxwindowsetfont">wxWindow::SetFont</A><BR>
221<A HREF="#wxwindowsetforegroundcolour">wxWindow::SetForegroundColour</A><BR>
222<A HREF="#wxwindowsetid">wxWindow::SetId</A><BR>
223<A HREF="#wxwindowsetname">wxWindow::SetName</A><BR>
224<A HREF="#wxwindowsetpalette">wxWindow::SetPalette</A><BR>
225<A HREF="#wxwindowsetreturncode">wxWindow::SetReturnCode</A><BR>
226<A HREF="#wxwindowsetscrollbar">wxWindow::SetScrollbar</A><BR>
227<A HREF="#wxwindowsetscrollpos">wxWindow::SetScrollPos</A><BR>
228<A HREF="#wxwindowsetsize">wxWindow::SetSize</A><BR>
229<A HREF="#wxwindowsetsizehints">wxWindow::SetSizeHints</A><BR>
230<A HREF="#wxwindowsettitle">wxWindow::SetTitle</A><BR>
231<A HREF="#topic1041">wxWindow::Show</A><BR>
232<A HREF="#wxwindowtransferdatafromwindow">wxWindow::TransferDataFromWindow</A><BR>
233<A HREF="#wxwindowtransferdatatowindow">wxWindow::TransferDataToWindow</A><BR>
234<A HREF="#wxwindowvalidate">wxWindow::Validate</A><BR>
235<A HREF="#wxwindowwarppointer">wxWindow::WarpPointer</A><BR>
236<P>
237
238<HR>
239<A NAME="topic1026"></A>
240<H3>wxWindow::wxWindow</H3>
241<P>
242<B></B> <B>wxWindow</B>()<P>
243Default constructor.<P>
244<B></B> <B>wxWindow</B>(<B>wxWindow*</B><I> parent</I>, <B>wxWindowID </B><I>id</I>,
245 <B>const wxPoint&amp; </B><I>pos = wxDefaultPosition</I>,
246 <B>const wxSize&amp; </B><I>size = wxDefaultSize</I>,
247 <B>long </B><I>style = 0</I>,
248 <B>const wxString&amp; </B><I>name = wxPanelNameStr</I>)<P>
249Constructs a window, which can be a child of a frame, dialog or any other non-control window.<P>
250<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
251<I>parent</I><UL><UL>
252Pointer to a parent window.</UL></UL>
253<P>
254<I>id</I><UL><UL>
255Window identifier. If -1, will automatically create an identifier.</UL></UL>
256<P>
257<I>pos</I><UL><UL>
258Window position. wxDefaultPosition is (-1, -1) which indicates that wxWindows
259should generate a default position for the window. If using the wxWindow class directly, supply
260an actual position.</UL></UL>
261<P>
262<I>size</I><UL><UL>
263Window size. wxDefaultSize is (-1, -1) which indicates that wxWindows
264should generate a default size for the window.</UL></UL>
265<P>
266<I>style</I><UL><UL>
267Window style. For generic window styles, please see <A HREF="wx260.htm#wxwindow">wxWindow</A>.</UL></UL>
268<P>
269<I>name</I><UL><UL>
270Window name.</UL></UL>
271<P>
272
273<HR>
274<A NAME="topic1027"></A>
275<H3>wxWindow::~wxWindow</H3>
276<P>
277<B></B> <B>~wxWindow</B>()<P>
278Destructor. Deletes all subwindows, then deletes itself. Instead of using
279the <B>delete</B> operator explicitly, you should normally
280use <A HREF="wx260.htm#wxwindowdestroy">wxWindow::Destroy</A> so that wxWindows
281can delete a window only when it is safe to do so, in idle time.<P>
282<B><FONT COLOR="#FF0000">See also</FONT></B><P>
283<A HREF="wx296.htm#windowdeletionoverview">Window deletion overview</A>,
284<A HREF="wx260.htm#wxwindowonclosewindow">wxWindow::OnCloseWindow</A>,
285<A HREF="wx260.htm#wxwindowdestroy">wxWindow::Destroy</A>,
286<A HREF="wx45.htm#wxcloseevent">wxCloseEvent</A><P>
287
288<HR>
289<A NAME="topic1028"></A>
290<H3>wxWindow::AddChild</H3>
291<P>
292<B>virtual void</B> <B>AddChild</B>(<B>wxWindow* </B><I>child</I>)<P>
293Adds a child window.  This is called automatically by window creation
294functions so should not be required by the application programmer.<P>
295<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
296<I>child</I><UL><UL>
297Child window to add.</UL></UL>
298<P>
299
300<HR>
301<A NAME="wxwindowcapturemouse"></A>
302<H3>wxWindow::CaptureMouse</H3>
303<P>
304<B>virtual void</B> <B>CaptureMouse</B>()<P>
305Directs all mouse input to this window. Call <A HREF="wx260.htm#wxwindowreleasemouse">wxWindow::ReleaseMouse</A> to
306release the capture.<P>
307<B><FONT COLOR="#FF0000">See also</FONT></B><P>
308<A HREF="wx260.htm#wxwindowreleasemouse">wxWindow::ReleaseMouse</A><P>
309
310<HR>
311<A NAME="wxwindowcenter"></A>
312<H3>wxWindow::Center</H3>
313<P>
314<B>void</B> <B>Center</B>(<B>int</B><I> direction</I>)<P>
315A synonym for <A HREF="wx260.htm#wxwindowcentre">Centre</A>.<P>
316
317<HR>
318<A NAME="wxwindowcentre"></A>
319<H3>wxWindow::Centre</H3>
320<P>
321<B>virtual void</B> <B>Centre</B>(<B>int</B><I> direction = wxHORIZONTAL</I>)<P>
322Centres the window.<P>
323<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
324<I>direction</I><UL><UL>
325Specifies the direction for the centering. May be <TT>wxHORIZONTAL</TT>, <TT>wxVERTICAL</TT>
326or <TT>wxBOTH</TT>.</UL></UL>
327<P>
328<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
329The actual behaviour depends on the derived window. For a frame or dialog box,
330centring is relative to the whole display. For a panel item, centring is
331relative to the panel.<P>
332<B><FONT COLOR="#FF0000">See also</FONT></B><P>
333<A HREF="wx260.htm#wxwindowcenter">wxWindow::Center</A><P>
334
335<HR>
336<A NAME="wxwindowclear"></A>
337<H3>wxWindow::Clear</H3>
338<P>
339<B>void</B> <B>Clear</B>()<P>
340Clears the window by filling it with the current background colour. Does not
341cause an erase background event to be generated.<P>
342
343<HR>
344<A NAME="topic1029"></A>
345<H3>wxWindow::ClientToScreen</H3>
346<P>
347<B>virtual void</B> <B>ClientToScreen</B>(<B>int* </B><I>x</I>, <B>int* </B><I>y</I>) <B>const</B><P>
348<B>virtual wxPoint</B> <B>ClientToScreen</B>(<B>const wxPoint&amp;</B><I> pt</I>) <B>const</B><P>
349Converts to screen coordinates from coordinates relative to this window.<P>
350<I>x</I><UL><UL>
351A pointer to a integer value for the x coordinate. Pass the client coordinate in, and
352a screen coordinate will be passed out.</UL></UL>
353<P>
354<I>y</I><UL><UL>
355A pointer to a integer value for the y coordinate. Pass the client coordinate in, and
356a screen coordinate will be passed out.</UL></UL>
357<P>
358<I>pt</I><UL><UL>
359The client position for the second form of the function.</UL></UL>
360<P>
361<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
362 In place of a single overloaded method name, wxPython
363implements the following methods:<P>
364
365<UL><UL>
366
367<TABLE>
368
369
370<TR><TD VALIGN=TOP>
371<B>ClientToScreen(point)</B>
372</TD>
373
374<TD VALIGN=TOP>
375Accepts and returns a wxPoint
376</TD></TR>
377
378
379<TR><TD VALIGN=TOP>
380<B>ClientToScreenXY(x, y)</B>
381</TD>
382
383<TD VALIGN=TOP>
384Returns a 2-tuple, (x, y)
385</TD></TR>
386
387
388</TABLE>
389</UL></UL>
390
391<P>
392
393
394<HR>
395<A NAME="wxwindowclose"></A>
396<H3>wxWindow::Close</H3>
397<P>
398<B>virtual bool</B> <B>Close</B>(<B>const bool</B><I> force = FALSE</I>)<P>
399The purpose of this call is to provide a safer way of destroying a window than using
400the <I>delete</I> operator.<P>
401<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
402<I>force</I><UL><UL>
403FALSE if the window's close handler should be able to veto the destruction
404of this window, TRUE if it cannot.</UL></UL>
405<P>
406<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
407Close calls the <A HREF="wx45.htm#wxcloseevent">close handler</A> for the window, providing an opportunity for the window to
408choose whether to destroy the window.<P>
409The close handler should check whether the window is being deleted forcibly,
410using <A HREF="wx45.htm#wxcloseeventgetforce">wxCloseEvent::GetForce</A>, in which case it should
411destroy the window using <A HREF="wx260.htm#wxwindowdestroy">wxWindow::Destroy</A>.<P>
412Applies to managed windows (wxFrame and wxDialog classes) only.<P>
413<I>Note</I> that calling Close does not guarantee that the window will be destroyed; but it
414provides a way to simulate a manual close of a window, which may or may not be implemented by
415destroying the window. The default implementation of wxDialog::OnCloseWindow does not
416necessarily delete the dialog, since it will simply simulate an wxID_CANCEL event which
417itself only hides the dialog.<P>
418To guarantee that the window will be destroyed, call <A HREF="wx260.htm#wxwindowdestroy">wxWindow::Destroy</A> instead.<P>
419<B><FONT COLOR="#FF0000">See also</FONT></B><P>
420<A HREF="wx296.htm#windowdeletionoverview">Window deletion overview</A>,
421<A HREF="wx260.htm#wxwindowonclosewindow">wxWindow::OnCloseWindow</A>,
422<A HREF="wx260.htm#wxwindowdestroy">wxWindow::Destroy</A>,
423<A HREF="wx45.htm#wxcloseevent">wxCloseEvent</A><P>
424
425<HR>
426<A NAME="wxwindowconvertdialogtopixels"></A>
427<H3>wxWindow::ConvertDialogToPixels</H3>
428<P>
429<B>wxPoint</B> <B>ConvertDialogToPixels</B>(<B>const wxPoint&amp;</B><I> pt</I>)<P>
430<B>wxSize</B> <B>ConvertDialogToPixels</B>(<B>const wxSize&amp;</B><I> sz</I>)<P>
431Converts a point or size from dialog units to pixels.<P>
432For the x dimension, the dialog units are multiplied by the average character width
433and then divided by 4.<P>
434For the y dimension, the dialog units are multiplied by the average character height
435and then divided by 8.<P>
436<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
437Dialog units are used for maintaining a dialog's proportions even if the font changes.
438Dialogs created using Dialog Editor optionally use dialog units.<P>
439You can also use these functions programmatically. A convenience macro is defined:<P>
440<FONT SIZE=2>
441<PRE>
442#define wxDLG_UNIT(parent, pt) parent-&gt;ConvertDialogToPixels(pt)
443</PRE>
444</FONT><P>
445<B><FONT COLOR="#FF0000">See also</FONT></B><P>
446<A HREF="wx260.htm#wxwindowconvertpixelstodialog">wxWindow::ConvertPixelsToDialog</A><P>
447<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
448 In place of a single overloaded method name, wxPython
449implements the following methods:<P>
450
451<UL><UL>
452
453<TABLE>
454
455
456<TR><TD VALIGN=TOP>
457<B>ConvertDialogPointToPixels(point)</B>
458</TD>
459
460<TD VALIGN=TOP>
461Accepts and returns a wxPoint
462</TD></TR>
463
464
465<TR><TD VALIGN=TOP>
466<B>ConvertDialogSizeToPixels(size)</B>
467</TD>
468
469<TD VALIGN=TOP>
470Accepts and returns a wxSize
471</TD></TR>
472
473
474</TABLE>
475</UL></UL>
476<P>
477Additionally, the following helper functions are defined:<P>
478
479<UL><UL>
480
481<TABLE>
482
483
484<TR><TD VALIGN=TOP>
485<B>wxDLG_PNT(win, point)</B>
486</TD>
487
488<TD VALIGN=TOP>
489Converts a wxPoint from dialog
490units to pixels
491</TD></TR>
492
493
494<TR><TD VALIGN=TOP>
495<B>wxDLG_SZE(win, size)</B>
496</TD>
497
498<TD VALIGN=TOP>
499Converts a wxSize from dialog
500units to pixels
501</TD></TR>
502
503
504</TABLE>
505</UL></UL>
506
507<P>
508
509
510<HR>
511<A NAME="wxwindowconvertpixelstodialog"></A>
512<H3>wxWindow::ConvertPixelsToDialog</H3>
513<P>
514<B>wxPoint</B> <B>ConvertPixelsToDialog</B>(<B>const wxPoint&amp;</B><I> pt</I>)<P>
515<B>wxSize</B> <B>ConvertPixelsToDialog</B>(<B>const wxSize&amp;</B><I> sz</I>)<P>
516Converts a point or size from pixels to dialog units.<P>
517For the x dimension, the pixels are multiplied by 4 and then divided by the average
518character width.<P>
519For the y dimension, the pixels are multipled by 8 and then divided by the average
520character height.<P>
521<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
522Dialog units are used for maintaining a dialog's proportions even if the font changes.
523Dialogs created using Dialog Editor optionally use dialog units.<P>
524<B><FONT COLOR="#FF0000">See also</FONT></B><P>
525<A HREF="wx260.htm#wxwindowconvertdialogtopixels">wxWindow::ConvertDialogToPixels</A><P>
526
527<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
528 In place of a single overloaded method name, wxPython
529implements the following methods:<P>
530
531<UL><UL>
532
533<TABLE>
534
535
536<TR><TD VALIGN=TOP>
537<B>ConvertDialogPointToPixels(point)</B>
538</TD>
539
540<TD VALIGN=TOP>
541Accepts and returns a wxPoint
542</TD></TR>
543
544
545<TR><TD VALIGN=TOP>
546<B>ConvertDialogSizeToPixels(size)</B>
547</TD>
548
549<TD VALIGN=TOP>
550Accepts and returns a wxSize
551</TD></TR>
552
553
554</TABLE>
555</UL></UL>
556
557<P>
558
559<HR>
560<A NAME="wxwindowdestroy"></A>
561<H3>wxWindow::Destroy</H3>
562<P>
563<B>virtual bool</B> <B>Destroy</B>()<P>
564Destroys the window safely. Use this function instead of the delete operator, since
565different window classes can be destroyed differently. Frames and dialogs
566are not destroyed immediately when this function is called - they are added
567to a list of windows to be deleted on idle time, when all the window's events
568have been processed. This prevents problems with events being sent to non-existant
569windows.<P>
570<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
571TRUE if the window has either been successfully deleted, or it has been added
572to the list of windows pending real deletion.<P>
573
574<HR>
575<A NAME="topic1030"></A>
576<H3>wxWindow::DestroyChildren</H3>
577<P>
578<B>virtual void</B> <B>DestroyChildren</B>()<P>
579Destroys all children of a window.  Called automatically by the destructor.<P>
580
581<HR>
582<A NAME="wxwindowdragacceptfiles"></A>
583<H3>wxWindow::DragAcceptFiles</H3>
584<P>
585<B>virtual void</B> <B>DragAcceptFiles</B>(<B>const bool</B><I> accept</I>)<P>
586Enables or disables elibility for drop file events (OnDropFiles).<P>
587<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
588<I>accept</I><UL><UL>
589If TRUE, the window is eligible for drop file events. If FALSE, the window
590will not accept drop file events.</UL></UL>
591<P>
592<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
593Windows only.<P>
594<B><FONT COLOR="#FF0000">See also</FONT></B><P>
595<A HREF="wx260.htm#wxwindowondropfiles">wxWindow::OnDropFiles</A><P>
596
597<HR>
598<A NAME="wxwindowenable"></A>
599<H3>wxWindow::Enable</H3>
600<P>
601<B>virtual void</B> <B>Enable</B>(<B>const bool</B><I> enable</I>)<P>
602Enable or disable the window for user input.<P>
603<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
604<I>enable</I><UL><UL>
605If TRUE, enables the window for input. If FALSE, disables the window.</UL></UL>
606<P>
607<B><FONT COLOR="#FF0000">See also</FONT></B><P>
608<A HREF="wx260.htm#wxwindowisenabled">wxWindow::IsEnabled</A><P>
609
610<HR>
611<A NAME="wxwindowfindfocus"></A>
612<H3>wxWindow::FindFocus</H3>
613<P>
614<B>static wxWindow*</B> <B>FindFocus</B>()<P>
615Finds the window or control which currently has the keyboard focus.<P>
616<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
617Note that this is a static function, so it can be called without needing a wxWindow pointer.<P>
618<B><FONT COLOR="#FF0000">See also</FONT></B><P>
619<A HREF="wx260.htm#wxwindowsetfocus">wxWindow::SetFocus</A><P>
620
621<HR>
622<A NAME="wxwindowfindwindow"></A>
623<H3>wxWindow::FindWindow</H3>
624<P>
625<B>wxWindow*</B> <B>FindWindow</B>(<B>long</B><I> id</I>)<P>
626Find a child of this window, by identifier.<P>
627<B>wxWindow*</B> <B>FindWindow</B>(<B>const wxString&amp;</B><I> name</I>)<P>
628Find a child of this window, by name.<P>
629<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
630 In place of a single overloaded method name, wxPython
631implements the following methods:<P>
632
633<UL><UL>
634
635<TABLE>
636
637
638<TR><TD VALIGN=TOP>
639<B>FindWindowById(id)</B>
640</TD>
641
642<TD VALIGN=TOP>
643Accepts an integer
644</TD></TR>
645
646
647<TR><TD VALIGN=TOP>
648<B>FindWindowByName(name)</B>
649</TD>
650
651<TD VALIGN=TOP>
652Accepts a string
653</TD></TR>
654
655
656</TABLE>
657</UL></UL>
658
659<P>
660
661<HR>
662<A NAME="wxwindowfit"></A>
663<H3>wxWindow::Fit</H3>
664<P>
665<B>virtual void</B> <B>Fit</B>()<P>
666Sizes the window so that it fits around its subwindows.<P>
667
668<HR>
669<A NAME="wxwindowgetbackgroundcolour"></A>
670<H3>wxWindow::GetBackgroundColour</H3>
671<P>
672<B>virtual wxColour</B> <B>GetBackgroundColour</B>() <B>const</B><P>
673Returns the background colour of the window.<P>
674<B><FONT COLOR="#FF0000">See also</FONT></B><P>
675<A HREF="wx260.htm#wxwindowsetbackgroundcolour">wxWindow::SetBackgroundColour</A>,
676<A HREF="wx260.htm#wxwindowsetforegroundcolour">wxWindow::SetForegroundColour</A>,
677<A HREF="wx260.htm#wxwindowgetforegroundcolour">wxWindow::GetForegroundColour</A>,
678<A HREF="wx260.htm#wxwindowonerasebackground">wxWindow::OnEraseBackground</A><P>
679
680<HR>
681<A NAME="topic1031"></A>
682<H3>wxWindow::GetCharHeight</H3>
683<P>
684<B>virtual int</B> <B>GetCharHeight</B>() <B>const</B><P>
685Returns the character height for this window.<P>
686
687<HR>
688<A NAME="topic1032"></A>
689<H3>wxWindow::GetCharWidth</H3>
690<P>
691<B>virtual int</B> <B>GetCharWidth</B>() <B>const</B><P>
692Returns the average character width for this window.<P>
693
694<HR>
695<A NAME="topic1033"></A>
696<H3>wxWindow::GetChildren</H3>
697<P>
698<B>wxList&amp;</B> <B>GetChildren</B>()<P>
699Returns a reference to the list of the window's children.<P>
700
701<HR>
702<A NAME="wxwindowgetclientsize"></A>
703<H3>wxWindow::GetClientSize</H3>
704<P>
705<B>virtual void</B> <B>GetClientSize</B>(<B>int* </B><I>width</I>, <B>int* </B><I>height</I>) <B>const</B><P>
706<B>virtual wxSize</B> <B>GetClientSize</B>() <B>const</B><P>
707This gets the size of the window 'client area' in pixels.  The client area is the
708area which may be drawn on by the programmer, excluding title bar, border etc.<P>
709<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
710<I>width</I><UL><UL>
711Receives the client width in pixels.</UL></UL>
712<P>
713<I>height</I><UL><UL>
714Receives the client height in pixels.</UL></UL>
715<P>
716<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
717 In place of a single overloaded method name, wxPython
718implements the following methods:<P>
719
720<UL><UL>
721
722<TABLE>
723
724
725<TR><TD VALIGN=TOP>
726<B>wxGetClientSizeTuple()</B>
727</TD>
728
729<TD VALIGN=TOP>
730Returns a 2-tuple of (width, height)
731</TD></TR>
732
733
734<TR><TD VALIGN=TOP>
735<B>wxGetClientSize()</B>
736</TD>
737
738<TD VALIGN=TOP>
739Returns a wxSize object
740</TD></TR>
741
742
743</TABLE>
744</UL></UL>
745
746<P>
747
748<HR>
749<A NAME="wxwindowgetconstraints"></A>
750<H3>wxWindow::GetConstraints</H3>
751<P>
752<B>wxLayoutConstraints*</B> <B>GetConstraints</B>() <B>const</B><P>
753Returns a pointer to the window's layout constraints, or NULL if there are none.<P>
754
755<HR>
756<A NAME="wxwindowgetdefaultitem"></A>
757<H3>wxWindow::GetDefaultItem</H3>
758<P>
759<B>wxButton*</B> <B>GetDefaultItem</B>() <B>const</B><P>
760Returns a pointer to the button which is the default for this window, or NULL.<P>
761
762<HR>
763<A NAME="wxwindowgetdroptarget"></A>
764<H3>wxWindow::GetDropTarget</H3>
765<P>
766<B>wxDropTarget*</B> <B>GetDropTarget</B>() <B>const</B><P>
767Returns the associated drop target, which may be NULL.<P>
768<B><FONT COLOR="#FF0000">See also</FONT></B><P>
769<A HREF="wx260.htm#wxwindowsetdroptarget">wxWindow::SetDropTarget</A>,
770<A HREF="wx312.htm#wxdndoverview">Drag and drop overview</A><P>
771
772<HR>
773<A NAME="wxwindowgeteventhandler"></A>
774<H3>wxWindow::GetEventHandler</H3>
775<P>
776<B>wxEvtHandler*</B> <B>GetEventHandler</B>() <B>const</B><P>
777Returns the event handler for this window. By default, the window is its
778own event handler.<P>
779<B><FONT COLOR="#FF0000">See also</FONT></B><P>
780<A HREF="wx260.htm#wxwindowseteventhandler">wxWindow::SetEventHandler</A>,
781<A HREF="wx260.htm#wxwindowpusheventhandler">wxWindow::PushEventHandler</A>,
782<A HREF="wx260.htm#wxwindowpusheventhandler">wxWindow::PopEventHandler</A>,
783<A HREF="wx85.htm#wxevthandlerprocessevent">wxEvtHandler::ProcessEvent</A>,
784<A HREF="wx85.htm#wxevthandler">wxEvtHandler</A><P>
785
786<HR>
787<A NAME="wxwindowgetfont"></A>
788<H3>wxWindow::GetFont</H3>
789<P>
790<B>wxFont&amp;</B> <B>GetFont</B>() <B>const</B><P>
791Returns a reference to the font for this window.<P>
792<B><FONT COLOR="#FF0000">See also</FONT></B><P>
793<A HREF="wx260.htm#wxwindowsetfont">wxWindow::SetFont</A><P>
794
795<HR>
796<A NAME="wxwindowgetforegroundcolour"></A>
797<H3>wxWindow::GetForegroundColour</H3>
798<P>
799<B>virtual wxColour</B> <B>GetForegroundColour</B>()<P>
800Returns the foreground colour of the window.<P>
801<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
802The interpretation of foreground colour is open to interpretation according
803to the window class; it may be the text colour or other colour, or it may not
804be used at all.<P>
805<B><FONT COLOR="#FF0000">See also</FONT></B><P>
806<A HREF="wx260.htm#wxwindowsetforegroundcolour">wxWindow::SetForegroundColour</A>,
807<A HREF="wx260.htm#wxwindowsetbackgroundcolour">wxWindow::SetBackgroundColour</A>,
808<A HREF="wx260.htm#wxwindowgetbackgroundcolour">wxWindow::GetBackgroundColour</A><P>
809
810<HR>
811<A NAME="topic1034"></A>
812<H3>wxWindow::GetGrandParent</H3>
813<P>
814<B>wxWindow*</B> <B>GetGrandParent</B>() <B>const</B><P>
815Returns the grandparent of a window, or NULL if there isn't one.<P>
816
817<HR>
818<A NAME="topic1035"></A>
819<H3>wxWindow::GetHandle</H3>
820<P>
821<B>void*</B> <B>GetHandle</B>() <B>const</B><P>
822Returns the platform-specific handle of the physical window. Cast it to an appropriate
823handle, such as <B>HWND</B> for Windows or <B>Widget</B> for Motif.<P>
824
825<HR>
826<A NAME="wxwindowgetid"></A>
827<H3>wxWindow::GetId</H3>
828<P>
829<B>int</B> <B>GetId</B>() <B>const</B><P>
830Returns the identifier of the window.<P>
831<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
832Each window has an integer identifier. If the application has not provided one,
833an identifier will be generated.<P>
834<B><FONT COLOR="#FF0000">See also</FONT></B><P>
835<A HREF="wx260.htm#wxwindowsetid">wxWindow::SetId</A>
836<A HREF="wx299.htm#windowids">Window identifiers</A><P>
837
838<HR>
839<A NAME="topic1036"></A>
840<H3>wxWindow::GetPosition</H3>
841<P>
842<B>virtual void</B> <B>GetPosition</B>(<B>int* </B><I>x</I>, <B>int* </B><I>y</I>) <B>const</B><P>
843This gets the position of the window in pixels, relative to the parent window or
844if no parent, relative to the whole display.<P>
845<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
846<I>x</I><UL><UL>
847Receives the x position of the window.</UL></UL>
848<P>
849<I>y</I><UL><UL>
850Receives the y position of the window.</UL></UL>
851<P>
852<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
853 In place of a single overloaded method name, wxPython
854implements the following methods:<P>
855
856<UL><UL>
857
858<TABLE>
859
860
861<TR><TD VALIGN=TOP>
862<B>GetPosition()</B>
863</TD>
864
865<TD VALIGN=TOP>
866Returns a wxPoint
867</TD></TR>
868
869
870<TR><TD VALIGN=TOP>
871<B>GetPositionTuple()</B>
872</TD>
873
874<TD VALIGN=TOP>
875Returns a tuple (x, y)
876</TD></TR>
877
878
879</TABLE>
880</UL></UL>
881
882<P>
883
884<HR>
885<A NAME="topic1037"></A>
886<H3>wxWindow::GetLabel</H3>
887<P>
888<B>virtual wxString&amp; </B> <B>GetLabel</B>() <B>const</B><P>
889Generic way of getting a label from any window, for
890identification purposes.<P>
891<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
892The interpretation of this function differs from class to class.
893For frames and dialogs, the value returned is the title. For buttons or static text controls, it is
894the button text. This function can be useful for meta-programs (such as testing
895tools or special-needs access programs) which need to identify windows
896by name.<P>
897
898<HR>
899<A NAME="wxwindowgetname"></A>
900<H3>wxWindow::GetName</H3>
901<P>
902<B>virtual wxString&amp; </B> <B>GetName</B>() <B>const</B><P>
903Returns the window's name.<P>
904<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
905This name is not guaranteed to be unique; it is up to the programmer to supply an appropriate
906name in the window constructor or via <A HREF="wx260.htm#wxwindowsetname">wxWindow::SetName</A>.<P>
907<B><FONT COLOR="#FF0000">See also</FONT></B><P>
908<A HREF="wx260.htm#wxwindowsetname">wxWindow::SetName</A><P>
909
910<HR>
911<A NAME="topic1038"></A>
912<H3>wxWindow::GetParent</H3>
913<P>
914<B>virtual wxWindow*</B> <B>GetParent</B>() <B>const</B><P>
915Returns the parent of the window, or NULL if there is no parent.<P>
916
917<HR>
918<A NAME="wxwindowgetrect"></A>
919<H3>wxWindow::GetRect</H3>
920<P>
921<B>virtual wxRect</B> <B>GetRect</B>() <B>const</B><P>
922Returns the size and position of the window as a <A HREF="wx193.htm#wxrect">wxRect</A> object.<P>
923
924<HR>
925<A NAME="wxwindowgetreturncode"></A>
926<H3>wxWindow::GetReturnCode</H3>
927<P>
928<B>int</B> <B>GetReturnCode</B>()<P>
929Gets the return code for this window.<P>
930<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
931A return code is normally associated with a modal dialog, where <A HREF="wx71.htm#wxdialogshowmodal">wxDialog::ShowModal</A> returns
932a code to the application.<P>
933<B><FONT COLOR="#FF0000">See also</FONT></B><P>
934<A HREF="wx260.htm#wxwindowsetreturncode">wxWindow::SetReturnCode</A>, <A HREF="wx71.htm#wxdialogshowmodal">wxDialog::ShowModal</A>,
935<A HREF="wx71.htm#wxdialogendmodal">wxDialog::EndModal</A><P>
936
937<HR>
938<A NAME="wxwindowgetscrollthumb"></A>
939<H3>wxWindow::GetScrollThumb</H3>
940<P>
941<B>virtual int</B> <B>GetScrollThumb</B>(<B>int </B><I>orientation</I>)<P>
942Returns the built-in scrollbar thumb size.<P>
943<B><FONT COLOR="#FF0000">See also</FONT></B><P>
944<A HREF="wx260.htm#wxwindowsetscrollbar">wxWindow::SetScrollbar</A><P>
945
946<HR>
947<A NAME="wxwindowgetscrollpos"></A>
948<H3>wxWindow::GetScrollPos</H3>
949<P>
950<B>virtual int</B> <B>GetScrollPos</B>(<B>int </B><I>orientation</I>)<P>
951Returns the built-in scrollbar position.<P>
952<B><FONT COLOR="#FF0000">See also</FONT></B><P>
953See <A HREF="wx260.htm#wxwindowsetscrollbar">wxWindow::SetScrollbar</A><P>
954
955<HR>
956<A NAME="wxwindowgetscrollrange"></A>
957<H3>wxWindow::GetScrollRange</H3>
958<P>
959<B>virtual int</B> <B>GetScrollRange</B>(<B>int </B><I>orientation</I>)<P>
960Returns the built-in scrollbar range.<P>
961<B><FONT COLOR="#FF0000">See also</FONT></B><P>
962<A HREF="wx260.htm#wxwindowsetscrollbar">wxWindow::SetScrollbar</A><P>
963
964<HR>
965<A NAME="wxwindowgetsize"></A>
966<H3>wxWindow::GetSize</H3>
967<P>
968<B>virtual void</B> <B>GetSize</B>(<B>int* </B><I>width</I>, <B>int* </B><I>height</I>) <B>const</B><P>
969<B>virtual wxSize</B> <B>GetSize</B>() <B>const</B><P>
970This gets the size of the entire window in pixels.<P>
971<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
972<I>width</I><UL><UL>
973Receives the window width.</UL></UL>
974<P>
975<I>height</I><UL><UL>
976Receives the window height.</UL></UL>
977<P>
978<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
979 In place of a single overloaded method name, wxPython
980implements the following methods:<P>
981
982<UL><UL>
983
984<TABLE>
985
986
987<TR><TD VALIGN=TOP>
988<B>GetSize()</B>
989</TD>
990
991<TD VALIGN=TOP>
992Returns a wxSize
993</TD></TR>
994
995
996<TR><TD VALIGN=TOP>
997<B>GetSizeTuple()</B>
998</TD>
999
1000<TD VALIGN=TOP>
1001Returns a 2-tuple (width, height)
1002</TD></TR>
1003
1004
1005</TABLE>
1006</UL></UL>
1007
1008<P>
1009
1010<HR>
1011<A NAME="topic1039"></A>
1012<H3>wxWindow::GetTextExtent</H3>
1013<P>
1014<B>virtual void</B> <B>GetTextExtent</B>(<B>const wxString&amp; </B><I>string</I>, <B>int* </B><I>x</I>, <B>int* </B><I>y</I>,
1015 <B>int* </B><I>descent = NULL</I>, <B>int* </B><I>externalLeading = NULL</I>,
1016 <B>const wxFont* </B><I>font = NULL</I>, <B>const bool</B><I> use16 = FALSE</I>) <B>const</B><P>
1017Gets the dimensions of the string as it would be drawn on the
1018window with the currently selected font.<P>
1019<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1020<I>string</I><UL><UL>
1021String whose extent is to be measured.</UL></UL>
1022<P>
1023<I>x</I><UL><UL>
1024Return value for width.</UL></UL>
1025<P>
1026<I>y</I><UL><UL>
1027Return value for height.</UL></UL>
1028<P>
1029<I>descent</I><UL><UL>
1030Return value for descent (optional).</UL></UL>
1031<P>
1032<I>externalLeading</I><UL><UL>
1033Return value for external leading (optional).</UL></UL>
1034<P>
1035<I>font</I><UL><UL>
1036Font to use instead of the current window font (optional).</UL></UL>
1037<P>
1038<I>use16</I><UL><UL>
1039If TRUE, <I>string</I> contains 16-bit characters. The default is FALSE.</UL></UL>
1040<P>
1041
1042<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
1043 In place of a single overloaded method name, wxPython
1044implements the following methods:<P>
1045
1046<UL><UL>
1047
1048<TABLE>
1049
1050
1051<TR><TD VALIGN=TOP>
1052<B>GetTextExtent(string)</B>
1053</TD>
1054
1055<TD VALIGN=TOP>
1056Returns a 2-tuple,  (width, height)
1057</TD></TR>
1058
1059
1060<TR><TD VALIGN=TOP>
1061<B>GetFullTextExtent(string, font=NULL)</B>
1062</TD>
1063
1064<TD VALIGN=TOP>
1065Returns a
10664-tuple, (width, height, descent, externalLeading)
1067</TD></TR>
1068
1069
1070</TABLE>
1071</UL></UL>
1072
1073<P>
1074
1075
1076<HR>
1077<A NAME="wxwindowgettitle"></A>
1078<H3>wxWindow::GetTitle</H3>
1079<P>
1080<B>virtual wxString</B> <B>GetTitle</B>()<P>
1081Gets the window's title. Applicable only to frames and dialogs.<P>
1082<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1083<A HREF="wx260.htm#wxwindowsettitle">wxWindow::SetTitle</A><P>
1084
1085<HR>
1086<A NAME="wxwindowgetupdateregion"></A>
1087<H3>wxWindow::GetUpdateRegion</H3>
1088<P>
1089<B>virtual wxRegion</B> <B>GetUpdateRegion</B>() <B>const</B><P>
1090Returns the region specifying which parts of the window have been damaged. Should
1091only be called within an <A HREF="wx260.htm#wxwindowonpaint">OnPaint</A> event handler.<P>
1092<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1093<A HREF="wx195.htm#wxregion">wxRegion</A>, <A HREF="wx196.htm#wxregioniterator">wxRegionIterator</A>, <A HREF="wx260.htm#wxwindowonpaint">wxWindow::OnPaint</A><P>
1094
1095<HR>
1096<A NAME="topic1040"></A>
1097<H3>wxWindow::GetWindowStyleFlag</H3>
1098<P>
1099<B>long</B> <B>GetWindowStyleFlag</B>() <B>const</B><P>
1100Gets the window style that was passed to the consructor or <B>Create</B> member.<P>
1101
1102<HR>
1103<A NAME="wxwindowinitdialog"></A>
1104<H3>wxWindow::InitDialog</H3>
1105<P>
1106<B>void</B> <B>InitDialog</B>()<P>
1107Sends an <A HREF="wx260.htm#wxwindowoninitdialog">wxWindow::OnInitDialog</A> event, which
1108in turn transfers data to the dialog via validators.<P>
1109<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1110<A HREF="wx260.htm#wxwindowoninitdialog">wxWindow::OnInitDialog</A><P>
1111
1112<HR>
1113<A NAME="wxwindowisenabled"></A>
1114<H3>wxWindow::IsEnabled</H3>
1115<P>
1116<B>virtual bool</B> <B>IsEnabled</B>() <B>const</B><P>
1117Returns TRUE if the window is enabled for input, FALSE otherwise.<P>
1118<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1119<A HREF="wx260.htm#wxwindowenable">wxWindow::Enable</A><P>
1120
1121<HR>
1122<A NAME="wxwindowisretained"></A>
1123<H3>wxWindow::IsRetained</H3>
1124<P>
1125<B>virtual bool</B> <B>IsRetained</B>() <B>const</B><P>
1126Returns TRUE if the window is retained, FALSE otherwise.<P>
1127<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1128Retained windows are only available on X platforms.<P>
1129
1130<HR>
1131<A NAME="wxwindowisshown"></A>
1132<H3>wxWindow::IsShown</H3>
1133<P>
1134<B>virtual bool</B> <B>IsShown</B>() <B>const</B><P>
1135Returns TRUE if the window is shown, FALSE if it has been hidden.<P>
1136
1137<HR>
1138<A NAME="wxwindowlayout"></A>
1139<H3>wxWindow::Layout</H3>
1140<P>
1141<B>void</B> <B>Layout</B>()<P>
1142Invokes the constraint-based layout algorithm for this window. It is called
1143automatically by the default <B>wxWindow::OnSize</B> member.<P>
1144
1145<HR>
1146<A NAME="wxwindowloadfromresource"></A>
1147<H3>wxWindow::LoadFromResource</H3>
1148<P>
1149<B>virtual bool</B> <B>LoadFromResource</B>(<B>wxWindow* </B><I>parent</I>,
1150<B>const wxString&amp; </B><I>resourceName</I>, <B>const wxResourceTable* </B><I>resourceTable = NULL</I>)<P>
1151Loads a panel or dialog from a resource file.<P>
1152<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1153<I>parent</I><UL><UL>
1154Parent window.</UL></UL>
1155<P>
1156<I>resourceName</I><UL><UL>
1157The name of the resource to load.</UL></UL>
1158<P>
1159<I>resourceTable</I><UL><UL>
1160The resource table to load it from. If this is NULL, the
1161default resource table will be used.</UL></UL>
1162<P>
1163<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
1164TRUE if the operation succeeded, otherwise FALSE.<P>
1165
1166<HR>
1167<A NAME="wxwindowlower"></A>
1168<H3>wxWindow::Lower</H3>
1169<P>
1170<B>void</B> <B>Lower</B>()<P>
1171Lowers the window to the bottom of the window hierarchy if it is a managed window (dialog
1172or frame).<P>
1173
1174<HR>
1175<A NAME="wxwindowmakemodal"></A>
1176<H3>wxWindow::MakeModal</H3>
1177<P>
1178<B>virtual void</B> <B>MakeModal</B>(<B>const bool </B><I>flag</I>)<P>
1179Disables all other windows in the application so that
1180the user can only interact with this window.<P>
1181<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1182<I>flag</I><UL><UL>
1183If TRUE, this call disables all other windows in the application so that
1184the user can only interact with this window. If FALSE, the effect is reversed.</UL></UL>
1185<P>
1186
1187<HR>
1188<A NAME="wxwindowmove"></A>
1189<H3>wxWindow::Move</H3>
1190<P>
1191<B>void</B> <B>Move</B>(<B>int</B><I> x</I>, <B>int</B><I> y</I>)<P>
1192<B>void</B> <B>Move</B>(<B>const wxPoint&amp;</B><I> pt</I>)<P>
1193Moves the window to the given position.<P>
1194<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1195<I>x</I><UL><UL>
1196Required x position.</UL></UL>
1197<P>
1198<I>y</I><UL><UL>
1199Required y position.</UL></UL>
1200<P>
1201<I>pt</I><UL><UL>
1202<A HREF="wx171.htm#wxpoint">wxPoint</A> object representing the position.</UL></UL>
1203<P>
1204<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1205Implementations of SetSize can also implicitly implement the
1206wxWindow::Move function, which is defined in the base wxWindow class
1207as the call:<P>
1208<PRE>
1209  SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING);
1210</PRE>
1211<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1212<A HREF="wx260.htm#wxwindowsetsize">wxWindow::SetSize</A><P>
1213<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
1214 In place of a single overloaded method name, wxPython
1215implements the following methods:<P>
1216
1217<UL><UL>
1218
1219<TABLE>
1220
1221
1222<TR><TD VALIGN=TOP>
1223<B>Move(point)</B>
1224</TD>
1225
1226<TD VALIGN=TOP>
1227Accepts a wxPoint
1228</TD></TR>
1229
1230
1231<TR><TD VALIGN=TOP>
1232<B>MoveXY(x, y)</B>
1233</TD>
1234
1235<TD VALIGN=TOP>
1236Accepts a pair of integers
1237</TD></TR>
1238
1239
1240</TABLE>
1241</UL></UL>
1242
1243<P>
1244
1245<HR>
1246<A NAME="wxwindowonactivate"></A>
1247<H3>wxWindow::OnActivate</H3>
1248<P>
1249<B>void</B> <B>OnActivate</B>(<B>wxActivateEvent&amp;</B><I> event</I>)<P>
1250Called when a window is activated or deactivated.<P>
1251<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1252<I>event</I><UL><UL>
1253Object containing activation information.</UL></UL>
1254<P>
1255<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1256If the window is being activated, <A HREF="wx25.htm#wxactivateeventgetactive">wxActivateEvent::GetActive</A> returns TRUE,
1257otherwise it returns FALSE (it is being deactivated).<P>
1258<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1259<A HREF="wx25.htm#wxactivateevent">wxActivateEvent</A>,
1260<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1261
1262<HR>
1263<A NAME="wxwindowonchar"></A>
1264<H3>wxWindow::OnChar</H3>
1265<P>
1266<B>void</B> <B>OnChar</B>(<B>wxKeyEvent&amp;</B><I> event</I>)<P>
1267Called when the user has pressed a key that is not a modifier (SHIFT, CONTROL or ALT).<P>
1268<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1269<I>event</I><UL><UL>
1270Object containing keypress information. See <A HREF="wx124.htm#wxkeyevent">wxKeyEvent</A> for
1271details about this class.</UL></UL>
1272<P>
1273<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1274This member function is called in response to a keypress. To intercept this event,
1275use the EVT_CHAR macro in an event table definition. Your <B>OnChar</B> handler may call this
1276default function to achieve default keypress functionality.<P>
1277Note that the ASCII values do not have explicit key codes: they are passed as ASCII
1278values.<P>
1279Note that not all keypresses can be intercepted this way. If you wish to intercept modifier
1280keypresses, then you will need to use <A HREF="wx260.htm#wxwindowonkeydown">wxWindow::OnKeyDown</A> or
1281<A HREF="wx260.htm#wxwindowonkeyup">wxWindow::OnKeyUp</A>.<P>
1282Most, but not all, windows allow keypresses to be intercepted.<P>
1283<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1284<A HREF="wx260.htm#wxwindowonkeydown">wxWindow::OnKeyDown</A>, <A HREF="wx260.htm#wxwindowonkeyup">wxWindow::OnKeyUp</A>,
1285<A HREF="wx124.htm#wxkeyevent">wxKeyEvent</A>, <A HREF="wx260.htm#wxwindowoncharhook">wxWindow::OnCharHook</A>,
1286<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1287
1288<HR>
1289<A NAME="wxwindowoncharhook"></A>
1290<H3>wxWindow::OnCharHook</H3>
1291<P>
1292<B>void</B> <B>OnCharHook</B>(<B>wxKeyEvent&amp;</B><I> event</I>)<P>
1293This member is called to allow the window to intercept keyboard events
1294before they are processed by child windows.<P>
1295<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1296<I>event</I><UL><UL>
1297Object containing keypress information. See <A HREF="wx124.htm#wxkeyevent">wxKeyEvent</A> for
1298details about this class.</UL></UL>
1299<P>
1300<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1301This member function is called in response to a keypress, if the window is active. To intercept this event,
1302use the EVT_CHAR_HOOK macro in an event table definition. If you do not process a particular
1303keypress, call <A HREF="wx84.htm#wxeventskip">wxEvent::Skip</A> to allow default processing.<P>
1304An example of using this function is in the implementation of escape-character processing for wxDialog,
1305where pressing ESC dismisses the dialog by <B>OnCharHook</B> 'forging' a cancel button press event.<P>
1306Note that the ASCII values do not have explicit key codes: they are passed as ASCII
1307values.<P>
1308This function is only relevant to top-level windows (frames and dialogs), and under
1309Windows only.<P>
1310<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1311<A HREF="wx124.htm#wxkeyevent">wxKeyEvent</A>, <A HREF="wx260.htm#wxwindowoncharhook">wxWindow::OnCharHook</A>,
1312<A HREF="wx26.htm#wxapponcharhook">wxApp::OnCharHook</A>,
1313<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1314
1315<HR>
1316<A NAME="wxwindowoncommand"></A>
1317<H3>wxWindow::OnCommand</H3>
1318<P>
1319<B>virtual void</B> <B>OnCommand</B>(<B>wxEvtHandler&amp; </B><I>object</I>, <B>wxCommandEvent&amp; </B><I>event</I>)<P>
1320This virtual member function is called if the control does not handle the command event.<P>
1321<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1322<I>object</I><UL><UL>
1323Object receiving the command event.</UL></UL>
1324<P>
1325<I>event</I><UL><UL>
1326Command event</UL></UL>
1327<P>
1328<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1329This virtual function is provided mainly for backward compatibility. You can also intercept commands
1330from child controls by using an event table, with identifiers or identifier ranges to identify
1331the control(s) in question.<P>
1332<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1333<A HREF="wx52.htm#wxcommandevent">wxCommandEvent</A>,
1334<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1335
1336<HR>
1337<A NAME="wxwindowonclose"></A>
1338<H3>wxWindow::OnClose</H3>
1339<P>
1340<B>virtual bool</B> <B>OnClose</B>()<P>
1341Called when the user has tried to close a a frame
1342or dialog box using the window manager (X) or system menu (Windows).<P>
1343<B>Note:</B> This is an obsolete function.
1344It is superceded by the <A HREF="wx260.htm#wxwindowonclosewindow">wxWindow::OnCloseWindow</A> event
1345handler.<P>
1346<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
1347If TRUE is returned by OnClose, the window will be deleted by the system, otherwise the
1348attempt will be ignored. Do not delete the window from within this handler, although
1349you may delete other windows.<P>
1350<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1351<A HREF="wx296.htm#windowdeletionoverview">Window deletion overview</A>,
1352<A HREF="wx260.htm#wxwindowclose">wxWindow::Close</A>,
1353<A HREF="wx260.htm#wxwindowonclosewindow">wxWindow::OnCloseWindow</A>,
1354<A HREF="wx45.htm#wxcloseevent">wxCloseEvent</A><P>
1355
1356<HR>
1357<A NAME="wxwindowonclosewindow"></A>
1358<H3>wxWindow::OnCloseWindow</H3>
1359<P>
1360<B>void</B> <B>OnCloseWindow</B>(<B>wxCloseEvent&amp; </B><I>event</I>)<P>
1361This is an event handler function called when the user has tried to close a a frame
1362or dialog box using the window manager (X) or system menu (Windows). It is
1363called via the <A HREF="wx260.htm#wxwindowclose">wxWindow::Close</A> function, so
1364that the application can also invoke the handler programmatically.<P>
1365Use the EVT_CLOSE event table macro to handle close events.<P>
1366You should check whether the application is forcing the deletion of the window
1367using <A HREF="wx45.htm#wxcloseeventgetforce">wxCloseEvent::GetForce</A>. If this is TRUE,
1368destroy the window using <A HREF="wx260.htm#wxwindowdestroy">wxWindow::Destroy</A>.
1369If not, it is up to you whether you respond by destroying the window.<P>
1370(Note: GetForce is now superceded by CanVeto. So to test whether forced destruction of
1371the window is required, test for the negative of CanVeto. If CanVeto returns FALSE,
1372it is not possible to skip window deletion.)<P>
1373If you don't destroy the window, you should call <A HREF="wx45.htm#wxcloseeventveto">wxCloseEvent::Veto</A> to
1374let the calling code know that you did not destroy the window. This allows the <A HREF="wx260.htm#wxwindowclose">wxWindow::Close</A> function
1375to return TRUE or FALSE depending on whether the close instruction was honoured or not.<P>
1376<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1377The <A HREF="wx260.htm#wxwindowonclose">wxWindow::OnClose</A> virtual function remains
1378for backward compatibility with earlier versions of wxWindows. The
1379default <B>OnCloseWindow</B> handler for wxFrame and wxDialog will call <B>OnClose</B>,
1380destroying the window if it returns TRUE or if the close is being forced.<P>
1381<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1382<A HREF="wx296.htm#windowdeletionoverview">Window deletion overview</A>,
1383<A HREF="wx260.htm#wxwindowclose">wxWindow::Close</A>,
1384<A HREF="wx260.htm#wxwindowonclose">wxWindow::OnClose</A>,
1385<A HREF="wx260.htm#wxwindowdestroy">wxWindow::Destroy</A>,
1386<A HREF="wx45.htm#wxcloseevent">wxCloseEvent</A>,
1387<A HREF="wx26.htm#wxapponqueryendsession">wxApp::OnQueryEndSession</A>,
1388<A HREF="wx26.htm#wxapponendsession">wxApp::OnEndSession</A><P>
1389
1390<HR>
1391<A NAME="wxwindowondropfiles"></A>
1392<H3>wxWindow::OnDropFiles</H3>
1393<P>
1394<B>void</B> <B>OnDropFiles</B>(<B>wxDropFilesEvent&amp;</B><I> event</I>)<P>
1395Called when files have been dragged from the file manager to the window.<P>
1396<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1397<I>event</I><UL><UL>
1398Drop files event. For more information, see <A HREF="wx80.htm#wxdropfilesevent">wxDropFilesEvent</A>.</UL></UL>
1399<P>
1400<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1401The window must have previously been enabled for dropping by calling
1402<A HREF="wx260.htm#wxwindowdragacceptfiles">wxWindow::DragAcceptFiles</A>.<P>
1403This event is only generated under Windows.<P>
1404To intercept this event, use the EVT_DROP_FILES macro in an event table definition.<P>
1405<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1406<A HREF="wx80.htm#wxdropfilesevent">wxDropFilesEvent</A>, <A HREF="wx260.htm#wxwindowdragacceptfiles">wxWindow::DragAcceptFiles</A>,
1407<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1408
1409<HR>
1410<A NAME="wxwindowonerasebackground"></A>
1411<H3>wxWindow::OnEraseBackground</H3>
1412<P>
1413<B>void</B> <B>OnEraseBackground</B>(<B>wxEraseEvent&amp;</B><I> event</I>)<P>
1414Called when the background of the window needs to be erased.<P>
1415<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1416<I>event</I><UL><UL>
1417Erase background event. For more information, see <A HREF="wx83.htm#wxeraseevent">wxEraseEvent</A>.</UL></UL>
1418<P>
1419<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1420This event is only generated under Windows.<P>
1421To intercept this event, use the EVT_ERASE_BACKGROUND macro in an event table definition.<P>
1422<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1423<A HREF="wx83.htm#wxeraseevent">wxEraseEvent</A>, <A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1424
1425<HR>
1426<A NAME="wxwindowonkeydown"></A>
1427<H3>wxWindow::OnKeyDown</H3>
1428<P>
1429<B>void</B> <B>OnKeyDown</B>(<B>wxKeyEvent&amp;</B><I> event</I>)<P>
1430Called when the user has pressed a key, before it is translated into an ASCII value using other
1431modifier keys that might be pressed at the same time.<P>
1432<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1433<I>event</I><UL><UL>
1434Object containing keypress information. See <A HREF="wx124.htm#wxkeyevent">wxKeyEvent</A> for
1435details about this class.</UL></UL>
1436<P>
1437<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1438This member function is called in response to a key down event. To intercept this event,
1439use the EVT_KEY_DOWN macro in an event table definition. Your <B>OnKeyDown</B> handler may call this
1440default function to achieve default keypress functionality.<P>
1441Note that not all keypresses can be intercepted this way. If you wish to intercept special
1442keys, such as shift, control, and function keys, then you will need to use <A HREF="wx260.htm#wxwindowonkeydown">wxWindow::OnKeyDown</A> or
1443<A HREF="wx260.htm#wxwindowonkeyup">wxWindow::OnKeyUp</A>.<P>
1444Most, but not all, windows allow keypresses to be intercepted.<P>
1445<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1446<A HREF="wx260.htm#wxwindowonchar">wxWindow::OnChar</A>, <A HREF="wx260.htm#wxwindowonkeyup">wxWindow::OnKeyUp</A>,
1447<A HREF="wx124.htm#wxkeyevent">wxKeyEvent</A>, <A HREF="wx260.htm#wxwindowoncharhook">wxWindow::OnCharHook</A>,
1448<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1449
1450<HR>
1451<A NAME="wxwindowonkeyup"></A>
1452<H3>wxWindow::OnKeyUp</H3>
1453<P>
1454<B>void</B> <B>OnKeyUp</B>(<B>wxKeyEvent&amp;</B><I> event</I>)<P>
1455Called when the user has released a key.<P>
1456<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1457<I>event</I><UL><UL>
1458Object containing keypress information. See <A HREF="wx124.htm#wxkeyevent">wxKeyEvent</A> for
1459details about this class.</UL></UL>
1460<P>
1461<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1462This member function is called in response to a key up event. To intercept this event,
1463use the EVT_KEY_UP macro in an event table definition. Your <B>OnKeyUp</B> handler may call this
1464default function to achieve default keypress functionality.<P>
1465Note that not all keypresses can be intercepted this way. If you wish to intercept special
1466keys, such as shift, control, and function keys, then you will need to use <A HREF="wx260.htm#wxwindowonkeydown">wxWindow::OnKeyDown</A> or
1467<A HREF="wx260.htm#wxwindowonkeyup">wxWindow::OnKeyUp</A>.<P>
1468Most, but not all, windows allow key up events to be intercepted.<P>
1469<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1470<A HREF="wx260.htm#wxwindowonchar">wxWindow::OnChar</A>, <A HREF="wx260.htm#wxwindowonkeydown">wxWindow::OnKeyDown</A>,
1471<A HREF="wx124.htm#wxkeyevent">wxKeyEvent</A>, <A HREF="wx260.htm#wxwindowoncharhook">wxWindow::OnCharHook</A>,
1472<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1473
1474<HR>
1475<A NAME="wxwindowonkillfocus"></A>
1476<H3>wxWindow::OnKillFocus</H3>
1477<P>
1478<B>void</B> <B>OnKillFocus</B>(<B>wxFocusEvent&amp; </B><I>event</I>)<P>
1479Called when a window's focus is being killed.<P>
1480<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1481<I>event</I><UL><UL>
1482The focus event. For more information, see <A HREF="wx99.htm#wxfocusevent">wxFocusEvent</A>.</UL></UL>
1483<P>
1484<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1485To intercept this event, use the macro EVT_KILL_FOCUS in an event table definition.<P>
1486Most, but not all, windows respond to this event.<P>
1487<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1488<A HREF="wx99.htm#wxfocusevent">wxFocusEvent</A>, <A HREF="wx260.htm#wxwindowonsetfocus">wxWindow::OnSetFocus</A>,
1489<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1490
1491<HR>
1492<A NAME="wxwindowonidle"></A>
1493<H3>wxWindow::OnIdle</H3>
1494<P>
1495<B>void</B> <B>OnIdle</B>(<B>wxIdleEvent&amp; </B><I>event</I>)<P>
1496Provide this member function for any processing which needs to be done
1497when the application is idle.<P>
1498<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1499<A HREF="wx26.htm#wxapponidle">wxApp::OnIdle</A>, <A HREF="wx113.htm#wxidleevent">wxIdleEvent</A><P>
1500
1501<HR>
1502<A NAME="wxwindowoninitdialog"></A>
1503<H3>wxWindow::OnInitDialog</H3>
1504<P>
1505<B>void</B> <B>OnInitDialog</B>(<B>wxInitDialogEvent&amp;</B><I> event</I>)<P>
1506Default handler for the wxEVT_INIT_DIALOG event. Calls <A HREF="wx260.htm#wxwindowtransferdatatowindow">wxWindow::TransferDataToWindow</A>.<P>
1507<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1508<I>event</I><UL><UL>
1509Dialog initialisation event.</UL></UL>
1510<P>
1511<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1512Gives the window the default behaviour of transferring data to child controls via
1513the validator that each control has.<P>
1514<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1515<A HREF="wx255.htm#wxvalidator">wxValidator</A>, <A HREF="wx260.htm#wxwindowtransferdatatowindow">wxWindow::TransferDataToWindow</A><P>
1516
1517<HR>
1518<A NAME="wxwindowonmenuhighlight"></A>
1519<H3>wxWindow::OnMenuHighlight</H3>
1520<P>
1521<B>void</B> <B>OnMenuHighlight</B>(<B>wxMenuEvent&amp; </B><I>event</I>)<P>
1522Called when a menu select is received from a menu bar: that is, the
1523mouse cursor is over a menu item, but the left mouse button has not been
1524pressed.<P>
1525<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1526<I>event</I><UL><UL>
1527The menu highlight event. For more information, see <A HREF="wx143.htm#wxmenuevent">wxMenuEvent</A>.</UL></UL>
1528<P>
1529<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1530You can choose any member function to receive
1531menu select events, using the EVT_MENU_HIGHLIGHT macro for individual menu items or EVT_MENU_HIGHLIGHT_ALL macro
1532for all menu items.<P>
1533The default implementation for <A HREF="wx104.htm#wxframeonmenuhighlight">wxFrame::OnMenuHighlight</A> displays help
1534text in the first field of the status bar.<P>
1535This function was known as <B>OnMenuSelect</B> in earlier versions of wxWindows, but this was confusing
1536since a selection is normally a left-click action.<P>
1537<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1538<A HREF="wx143.htm#wxmenuevent">wxMenuEvent</A>,
1539<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1540
1541
1542<HR>
1543<A NAME="wxwindowonmouseevent"></A>
1544<H3>wxWindow::OnMouseEvent</H3>
1545<P>
1546<B>void</B> <B>OnMouseEvent</B>(<B>wxMouseEvent&amp;</B><I> event</I>)<P>
1547Called when the user has initiated an event with the
1548mouse.<P>
1549<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1550<I>event</I><UL><UL>
1551The mouse event. See <A HREF="wx150.htm#wxmouseevent">wxMouseEvent</A> for
1552more details.</UL></UL>
1553<P>
1554<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1555Most, but not all, windows respond to this event.<P>
1556To intercept this event, use the EVT_MOUSE_EVENTS macro in an event table definition, or individual
1557mouse event macros such as EVT_LEFT_DOWN.<P>
1558<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1559<A HREF="wx150.htm#wxmouseevent">wxMouseEvent</A>,
1560<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1561
1562<HR>
1563<A NAME="wxwindowonmove"></A>
1564<H3>wxWindow::OnMove</H3>
1565<P>
1566<B>void</B> <B>OnMove</B>(<B>wxMoveEvent&amp; </B><I>event</I>)<P>
1567Called when a window is moved.<P>
1568<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1569<I>event</I><UL><UL>
1570The move event. For more information, see <A HREF="wx151.htm#wxmoveevent">wxMoveEvent</A>.</UL></UL>
1571<P>
1572<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1573Use the EVT_MOVE macro to intercept move events.<P>
1574<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1575Not currently implemented.<P>
1576<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1577<A HREF="wx151.htm#wxmoveevent">wxMoveEvent</A>,
1578<A HREF="wx104.htm#wxframeonsize">wxFrame::OnSize</A>,
1579<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1580
1581<HR>
1582<A NAME="wxwindowonpaint"></A>
1583<H3>wxWindow::OnPaint</H3>
1584<P>
1585<B>void</B> <B>OnPaint</B>(<B>wxPaintEvent&amp; </B><I>event</I>)<P>
1586Sent to the event handler when the window must be refreshed.<P>
1587<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1588<I>event</I><UL><UL>
1589Paint event. For more information, see <A HREF="wx164.htm#wxpaintevent">wxPaintEvent</A>.</UL></UL>
1590<P>
1591<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1592Use the EVT_PAINT macro in an event table definition to intercept paint events.<P>
1593In a paint event handler, the application should always create a <A HREF="wx163.htm#wxpaintdc">wxPaintDC</A> object.<P>
1594For example:<P>
1595<FONT SIZE=2><PRE>
1596  void MyWindow::OnPaint(wxPaintEvent& event)
1597  {
1598      wxPaintDC dc(this);
1599
1600      DrawMyDocument(dc);
1601  }
1602</PRE>
1603</FONT>You can optimize painting by retrieving the rectangles
1604that have been damaged and only repainting these. The rectangles are in
1605terms of the client area, and are unscrolled, so you will need to do
1606some calculations using the current view position to obtain logical,
1607scrolled units.<P>
1608Here is an example of using the <A HREF="wx196.htm#wxregioniterator">wxRegionIterator</A> class:<P>
1609<FONT SIZE=2><PRE>
1610// Called when window needs to be repainted.
1611void MyWindow::OnPaint(wxPaintEvent& event)
1612{
1613  wxPaintDC dc(this);
1614
1615  // Find Out where the window is scrolled to
1616  int vbX,vbY;                     // Top left corner of client
1617  ViewStart(&vbX,&vbY);
1618
1619  int vX,vY,vW,vH;                 // Dimensions of client area in pixels
1620  wxRegionIterator upd(GetUpdateRegion()); // get the update rect list
1621
1622  while (upd)
1623  {
1624    vX = upd.GetX();
1625    vY = upd.GetY();
1626    vW = upd.GetW();
1627    vH = upd.GetH();
1628
1629    // Alternatively we can do this:
1630    // wxRect rect;
1631    // upd.GetRect(&rect);
1632
1633    // Repaint this rectangle
1634    ...some code...
1635
1636    upd ++ ;
1637  }
1638}
1639</PRE>
1640</FONT><B><FONT COLOR="#FF0000">See also</FONT></B><P>
1641<A HREF="wx164.htm#wxpaintevent">wxPaintEvent</A>,
1642<A HREF="wx163.htm#wxpaintdc">wxPaintDC</A>,
1643<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1644
1645<HR>
1646<A NAME="wxwindowonscroll"></A>
1647<H3>wxWindow::OnScroll</H3>
1648<P>
1649<B>void</B> <B>OnScroll</B>(<B>wxScrollEvent&amp; </B><I>event</I>)<P>
1650Called when a scroll event is received from one of the window's built-in scrollbars.<P>
1651<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1652<I>event</I><UL><UL>
1653Command event. Retrieve the new scroll position by
1654calling <A HREF="wx202.htm#wxscrolleventgetposition">wxScrollEvent::GetPosition</A>, and the
1655scrollbar orientation by calling <A HREF="wx202.htm#wxscrolleventgetorientation">wxScrollEvent::GetOrientation</A>.</UL></UL>
1656<P>
1657<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1658Note that it is not possible to distinguish between horizontal and vertical scrollbars
1659until the function is executing (you can't have one function for vertical, another
1660for horizontal events).<P>
1661<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1662<A HREF="wx202.htm#wxscrollevent">wxScrollEvent</A>,
1663<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1664
1665<HR>
1666<A NAME="wxwindowonsetfocus"></A>
1667<H3>wxWindow::OnSetFocus</H3>
1668<P>
1669<B>void</B> <B>OnSetFocus</B>(<B>wxFocusEvent&amp; </B><I>event</I>)<P>
1670Called when a window's focus is being set.<P>
1671<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1672<I>event</I><UL><UL>
1673The focus event. For more information, see <A HREF="wx99.htm#wxfocusevent">wxFocusEvent</A>.</UL></UL>
1674<P>
1675<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1676To intercept this event, use the macro EVT_SET_FOCUS in an event table definition.<P>
1677Most, but not all, windows respond to this event.<P>
1678<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1679<A HREF="wx99.htm#wxfocusevent">wxFocusEvent</A>, <A HREF="wx260.htm#wxwindowonkillfocus">wxWindow::OnKillFocus</A>,
1680<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1681
1682<HR>
1683<A NAME="wxwindowonsize"></A>
1684<H3>wxWindow::OnSize</H3>
1685<P>
1686<B>void</B> <B>OnSize</B>(<B>wxSizeEvent&amp; </B><I>event</I>)<P>
1687Called when the window has been resized.<P>
1688<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1689<I>event</I><UL><UL>
1690Size event. For more information, see <A HREF="wx206.htm#wxsizeevent">wxSizeEvent</A>.</UL></UL>
1691<P>
1692<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1693You may wish to use this for frames to resize their child windows as appropriate.<P>
1694Note that the size passed is of
1695the whole window: call <A HREF="wx260.htm#wxwindowgetclientsize">wxWindow::GetClientSize</A> for the area which may be
1696used by the application.<P>
1697<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1698<A HREF="wx206.htm#wxsizeevent">wxSizeEvent</A>,
1699<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1700
1701<HR>
1702<A NAME="wxwindowonsyscolourchanged"></A>
1703<H3>wxWindow::OnSysColourChanged</H3>
1704<P>
1705<B>void</B> <B>OnSysColourChanged</B>(<B>wxOnSysColourChangedEvent&amp; </B><I>event</I>)<P>
1706Called when the user has changed the system colours.<P>
1707<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1708<I>event</I><UL><UL>
1709System colour change event. For more information, see <A HREF="wx227.htm#wxsyscolourchangedevent">wxSysColourChangedEvent</A>.</UL></UL>
1710<P>
1711<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1712<A HREF="wx227.htm#wxsyscolourchangedevent">wxSysColourChangedEvent</A>,
1713<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1714
1715<HR>
1716<A NAME="wxwindowpopeventhandler"></A>
1717<H3>wxWindow::PopEventHandler</H3>
1718<P>
1719<B>wxEvtHandler*</B> <B>PopEventHandler</B>(<B>bool </B><I>deleteHandler = FALSE</I>) <B>const</B><P>
1720Removes and returns the top-most event handler on the event handler stack.<P>
1721<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1722<I>deleteHandler</I><UL><UL>
1723If this is TRUE, the handler will be deleted after it is removed. The
1724default value is FALSE.</UL></UL>
1725<P>
1726<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1727<A HREF="wx260.htm#wxwindowseteventhandler">wxWindow::SetEventHandler</A>,
1728<A HREF="wx260.htm#wxwindowgeteventhandler">wxWindow::GetEventHandler</A>,
1729<A HREF="wx260.htm#wxwindowpusheventhandler">wxWindow::PushEventHandler</A>,
1730<A HREF="wx85.htm#wxevthandlerprocessevent">wxEvtHandler::ProcessEvent</A>,
1731<A HREF="wx85.htm#wxevthandler">wxEvtHandler</A><P>
1732
1733<HR>
1734<A NAME="wxwindowpopupmenu"></A>
1735<H3>wxWindow::PopupMenu</H3>
1736<P>
1737<B>virtual bool</B> <B>PopupMenu</B>(<B>wxMenu* </B><I>menu</I>, <B>int </B><I>x</I>, <B>int </B><I>y</I>)<P>
1738Pops up the given menu at the specified coordinates, relative to this
1739window, and returns control when the user has dismissed the menu. If a
1740menu item is selected, the callback defined for the menu is called with
1741wxMenu and wxCommandEvent reference arguments. The callback should access
1742the commandInt member of the event to check the selected menu identifier.<P>
1743<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1744<I>menu</I><UL><UL>
1745Menu to pop up.</UL></UL>
1746<P>
1747<I>x</I><UL><UL>
1748Required x position for the menu to appear.</UL></UL>
1749<P>
1750<I>y</I><UL><UL>
1751Required y position for the menu to appear.</UL></UL>
1752<P>
1753<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1754<A HREF="wx140.htm#wxmenu">wxMenu</A><P>
1755<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1756Just before the menu is popped up, <A HREF="wx140.htm#wxmenuupdateui">wxMenu::UpdateUI</A> is called
1757to ensure that the menu items are in the correct state.<P>
1758
1759<HR>
1760<A NAME="wxwindowpusheventhandler"></A>
1761<H3>wxWindow::PushEventHandler</H3>
1762<P>
1763<B>void</B> <B>PushEventHandler</B>(<B>wxEvtHandler* </B><I>handler</I>)<P>
1764Pushes this event handler onto the event stack for the window.<P>
1765<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1766<I>handler</I><UL><UL>
1767Specifies the handler to be pushed.</UL></UL>
1768<P>
1769<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1770An event handler is an object that is capable of processing the events
1771sent to a window. By default, the window is its own event handler, but
1772an application may wish to substitute another, for example to allow
1773central implementation of event-handling for a variety of different
1774window classes.<P>
1775<A HREF="wx260.htm#wxwindowpusheventhandler">wxWindow::PushEventHandler</A> allows
1776an application to set up a chain of event handlers, where an event not handled by one event handler is
1777handed to the next one in the chain. Use <A HREF="wx260.htm#wxwindowpopeventhandler">wxWindow::PopEventHandler</A> to
1778remove the event handler.<P>
1779<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1780<A HREF="wx260.htm#wxwindowseteventhandler">wxWindow::SetEventHandler</A>,
1781<A HREF="wx260.htm#wxwindowgeteventhandler">wxWindow::GetEventHandler</A>,
1782<A HREF="wx260.htm#wxwindowpusheventhandler">wxWindow::PopEventHandler</A>,
1783<A HREF="wx85.htm#wxevthandlerprocessevent">wxEvtHandler::ProcessEvent</A>,
1784<A HREF="wx85.htm#wxevthandler">wxEvtHandler</A><P>
1785
1786<HR>
1787<A NAME="wxwindowraise"></A>
1788<H3>wxWindow::Raise</H3>
1789<P>
1790<B>void</B> <B>Raise</B>()<P>
1791Raises the window to the top of the window hierarchy if it is a managed window (dialog
1792or frame).<P>
1793
1794<HR>
1795<A NAME="wxwindowrefresh"></A>
1796<H3>wxWindow::Refresh</H3>
1797<P>
1798<B>virtual void</B> <B>Refresh</B>(<B>const bool</B><I> eraseBackground = TRUE</I>, <B>const wxRect* </B><I>rect
1799= NULL</I>)<P>
1800Causes a message or event to be generated to repaint the
1801window.<P>
1802<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1803<I>eraseBackground</I><UL><UL>
1804If TRUE, the background will be
1805erased.</UL></UL>
1806<P>
1807<I>rect</I><UL><UL>
1808If non-NULL, only the given rectangle will
1809be treated as damaged.</UL></UL>
1810<P>
1811
1812<HR>
1813<A NAME="wxwindowreleasemouse"></A>
1814<H3>wxWindow::ReleaseMouse</H3>
1815<P>
1816<B>virtual void</B> <B>ReleaseMouse</B>()<P>
1817Releases mouse input captured with <A HREF="wx260.htm#wxwindowcapturemouse">wxWindow::CaptureMouse</A>.<P>
1818<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1819<A HREF="wx260.htm#wxwindowcapturemouse">wxWindow::CaptureMouse</A><P>
1820
1821<HR>
1822<A NAME="wxwindowremovechild"></A>
1823<H3>wxWindow::RemoveChild</H3>
1824<P>
1825<B>virtual void</B> <B>RemoveChild</B>(<B>wxWindow* </B><I>child</I>)<P>
1826Removes a child window.  This is called automatically by window deletion
1827functions so should not be required by the application programmer.<P>
1828<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1829<I>child</I><UL><UL>
1830Child window to remove.</UL></UL>
1831<P>
1832
1833<HR>
1834<A NAME="wxwindowscreentoclient"></A>
1835<H3>wxWindow::ScreenToClient</H3>
1836<P>
1837<B>virtual void</B> <B>ScreenToClient</B>(<B>int* </B><I>x</I>, <B>int* </B><I>y</I>) <B>const</B><P>
1838<B>virtual wxPoint</B> <B>ScreenToClient</B>(<B>const wxPoint&amp; </B><I>pt</I>) <B>const</B><P>
1839Converts from screen to client window coordinates.<P>
1840<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1841<I>x</I><UL><UL>
1842Stores the screen x coordinate and receives the client x coordinate.</UL></UL>
1843<P>
1844<I>y</I><UL><UL>
1845Stores the screen x coordinate and receives the client x coordinate.</UL></UL>
1846<P>
1847<I>pt</I><UL><UL>
1848The screen position for the second form of the function.</UL></UL>
1849<P>
1850<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
1851 In place of a single overloaded method name, wxPython
1852implements the following methods:<P>
1853
1854<UL><UL>
1855
1856<TABLE>
1857
1858
1859<TR><TD VALIGN=TOP>
1860<B>ScreenToClient(point)</B>
1861</TD>
1862
1863<TD VALIGN=TOP>
1864Accepts and returns a wxPoint
1865</TD></TR>
1866
1867
1868<TR><TD VALIGN=TOP>
1869<B>ScreenToClientXY(x, y)</B>
1870</TD>
1871
1872<TD VALIGN=TOP>
1873Returns a 2-tuple, (x, y)
1874</TD></TR>
1875
1876
1877</TABLE>
1878</UL></UL>
1879
1880<P>
1881
1882
1883<HR>
1884<A NAME="wxwindowscrollwindow"></A>
1885<H3>wxWindow::ScrollWindow</H3>
1886<P>
1887<B>virtual void</B> <B>ScrollWindow</B>(<B>int </B><I>dx</I>, <B>int </B><I>dy</I>, <B>const wxRect*</B><I> rect = NULL</I>)<P>
1888Physically scrolls the pixels in the window.<P>
1889<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1890<I>dx</I><UL><UL>
1891Amount to scroll horizontally.</UL></UL>
1892<P>
1893<I>dy</I><UL><UL>
1894Amount to scroll vertically.</UL></UL>
1895<P>
1896<I>rect</I><UL><UL>
1897Rectangle to invalidate. If this is NULL, the whole window is invalidated. If you
1898pass a rectangle corresponding to the area of the window exposed by the scroll, your painting handler
1899can optimise painting by checking for the invalidated region.</UL></UL>
1900<P>
1901<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1902Available only under Windows.<P>
1903Use this function to optimise your scrolling implementations, to minimise the area that must be
1904redrawn.<P>
1905
1906<HR>
1907<A NAME="wxwindowsetacceleratortable"></A>
1908<H3>wxWindow::SetAcceleratorTable</H3>
1909<P>
1910<B>virtual void</B> <B>SetAcceleratorTable</B>(<B>const wxAcceleratorTable&amp;</B><I> accel</I>)<P>
1911Sets the accelerator table for this window. See <A HREF="wx24.htm#wxacceleratortable">wxAcceleratorTable</A>.<P>
1912
1913<HR>
1914<A NAME="wxwindowsetautolayout"></A>
1915<H3>wxWindow::SetAutoLayout</H3>
1916<P>
1917<B>void</B> <B>SetAutoLayout</B>(<B>const bool</B><I> autoLayout</I>)<P>
1918Determines whether the <A HREF="wx260.htm#wxwindowlayout">wxWindow::Layout</A> function will
1919be called automatically when the window is resized.<P>
1920<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1921<I>autoLayout</I><UL><UL>
1922Set this to TRUE if you wish the Layout function to be called
1923from within wxWindow::OnSize functions.</UL></UL>
1924<P>
1925<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1926<A HREF="wx260.htm#wxwindowsetconstraints">wxWindow::SetConstraints</A><P>
1927
1928<HR>
1929<A NAME="wxwindowsetbackgroundcolour"></A>
1930<H3>wxWindow::SetBackgroundColour</H3>
1931<P>
1932<B>virtual void</B> <B>SetBackgroundColour</B>(<B>const wxColour&amp; </B><I>colour</I>)<P>
1933Sets the background colour of the window.<P>
1934<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1935<I>colour</I><UL><UL>
1936The colour to be used as the background colour.</UL></UL>
1937<P>
1938<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1939The background colour is usually painted by the default
1940<A HREF="wx260.htm#wxwindowonerasebackground">wxWindow::OnEraseBackground</A> event handler function.<P>
1941Note that setting the background colour does not cause an immediate refresh, so you
1942may wish to call <A HREF="wx260.htm#wxwindowclear">wxWindow::Clear</A> or <A HREF="wx260.htm#wxwindowrefresh">wxWindow::Refresh</A> after
1943calling this function.<P>
1944<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1945<A HREF="wx260.htm#wxwindowgetbackgroundcolour">wxWindow::GetBackgroundColour</A>,
1946<A HREF="wx260.htm#wxwindowsetforegroundcolour">wxWindow::SetForegroundColour</A>,
1947<A HREF="wx260.htm#wxwindowgetforegroundcolour">wxWindow::GetForegroundColour</A>,
1948<A HREF="wx260.htm#wxwindowclear">wxWindow::Clear</A>,
1949<A HREF="wx260.htm#wxwindowrefresh">wxWindow::Refresh</A>,
1950<A HREF="wx260.htm#wxwindowonerasebackground">wxWindow::OnEraseBackground</A><P>
1951
1952<HR>
1953<A NAME="wxwindowsetclientsize"></A>
1954<H3>wxWindow::SetClientSize</H3>
1955<P>
1956<B>virtual void</B> <B>SetClientSize</B>(<B>int</B><I> width</I>, <B>int</B><I> height</I>)<P>
1957<B>virtual void</B> <B>SetClientSize</B>(<B>const wxSize&amp;</B><I> size</I>)<P>
1958This sets the size of the window client area in pixels. Using this function to size a window
1959tends to be more device-independent than <A HREF="wx260.htm#wxwindowsetsize">wxWindow::SetSize</A>, since the application need not
1960worry about what dimensions the border or title bar have when trying to fit the window
1961around panel items, for example.<P>
1962<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1963<I>width</I><UL><UL>
1964The required client area width.</UL></UL>
1965<P>
1966<I>height</I><UL><UL>
1967The required client area height.</UL></UL>
1968<P>
1969<I>size</I><UL><UL>
1970The required client size.</UL></UL>
1971<P>
1972<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
1973 In place of a single overloaded method name, wxPython
1974implements the following methods:<P>
1975
1976<UL><UL>
1977
1978<TABLE>
1979
1980
1981<TR><TD VALIGN=TOP>
1982<B>SetClientSize(size)</B>
1983</TD>
1984
1985<TD VALIGN=TOP>
1986Accepts a wxSize
1987</TD></TR>
1988
1989
1990<TR><TD VALIGN=TOP>
1991<B>SetClientSizeWH(width, height)</B>
1992</TD>
1993
1994<TD VALIGN=TOP>
1995
1996</TD></TR>
1997
1998
1999</TABLE>
2000</UL></UL>
2001
2002<P>
2003
2004<HR>
2005<A NAME="wxwindowsetcursor"></A>
2006<H3>wxWindow::SetCursor</H3>
2007<P>
2008<B>virtual void</B> <B>SetCursor</B>(<B>const wxCursor&amp;</B><I>cursor</I>)<P>
2009Sets the window's cursor. Notice that setting the cursor for this window does
2010not set it for its children so you'll need to explicitly call SetCursor() for
2011them too if you need it.<P>
2012<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2013<I>cursor</I><UL><UL>
2014Specifies the cursor that the window should normally display.</UL></UL>
2015<P>
2016<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2017<A HREF="wx268.htm#wxsetcursor">::wxSetCursor</A>, <A HREF="wx59.htm#wxcursor">wxCursor</A><P>
2018
2019<HR>
2020<A NAME="wxwindowseteventhandler"></A>
2021<H3>wxWindow::SetEventHandler</H3>
2022<P>
2023<B>void</B> <B>SetEventHandler</B>(<B>wxEvtHandler* </B><I>handler</I>)<P>
2024Sets the event handler for this window.<P>
2025<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2026<I>handler</I><UL><UL>
2027Specifies the handler to be set.</UL></UL>
2028<P>
2029<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2030An event handler is an object that is capable of processing the events
2031sent to a window. By default, the window is its own event handler, but
2032an application may wish to substitute another, for example to allow
2033central implementation of event-handling for a variety of different
2034window classes.<P>
2035It is usually better to use <A HREF="wx260.htm#wxwindowpusheventhandler">wxWindow::PushEventHandler</A> since
2036this sets up a chain of event handlers, where an event not handled by one event handler is
2037handed to the next one in the chain.<P>
2038<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2039<A HREF="wx260.htm#wxwindowgeteventhandler">wxWindow::GetEventHandler</A>,
2040<A HREF="wx260.htm#wxwindowpusheventhandler">wxWindow::PushEventHandler</A>,
2041<A HREF="wx260.htm#wxwindowpusheventhandler">wxWindow::PopEventHandler</A>,
2042<A HREF="wx85.htm#wxevthandlerprocessevent">wxEvtHandler::ProcessEvent</A>,
2043<A HREF="wx85.htm#wxevthandler">wxEvtHandler</A><P>
2044
2045<HR>
2046<A NAME="wxwindowsetconstraints"></A>
2047<H3>wxWindow::SetConstraints</H3>
2048<P>
2049<B>void</B> <B>SetConstraints</B>(<B>wxLayoutConstraints* </B><I>constraints</I>)<P>
2050Sets the window to have the given layout constraints. The window
2051will then own the object, and will take care of its deletion.
2052If an existing layout constraints object is already owned by the
2053window, it will be deleted.<P>
2054<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2055<I>constraints</I><UL><UL>
2056The constraints to set. Pass NULL to disassociate and delete the window's
2057constraints.</UL></UL>
2058<P>
2059<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2060You must call <A HREF="wx260.htm#wxwindowsetautolayout">wxWindow::SetAutoLayout</A> to tell a window to use
2061the constraints automatically in OnSize; otherwise, you must
2062override OnSize and call Layout explicitly.<P>
2063
2064<HR>
2065<A NAME="wxwindowsetdroptarget"></A>
2066<H3>wxWindow::SetDropTarget</H3>
2067<P>
2068<B>void</B> <B>SetDropTarget</B>(<B>wxDropTarget*</B><I> target</I>)<P>
2069Associates a drop target with this window.<P>
2070If the window already has a drop target, it is deleted.<P>
2071<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2072<A HREF="wx260.htm#wxwindowgetdroptarget">wxWindow::GetDropTarget</A>,
2073<A HREF="wx312.htm#wxdndoverview">Drag and drop overview</A><P>
2074
2075<HR>
2076<A NAME="wxwindowsetfocus"></A>
2077<H3>wxWindow::SetFocus</H3>
2078<P>
2079<B>virtual void</B> <B>SetFocus</B>()<P>
2080This sets the window to receive keyboard input.<P>
2081
2082<HR>
2083<A NAME="wxwindowsetfont"></A>
2084<H3>wxWindow::SetFont</H3>
2085<P>
2086<B>void</B> <B>SetFont</B>(<B>const wxFont&amp; </B><I>font</I>)<P>
2087Sets the font for this window.<P>
2088<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2089<I>font</I><UL><UL>
2090Font to associate with this window.</UL></UL>
2091<P>
2092<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2093<A HREF="wx260.htm#wxwindowgetfont">wxWindow::GetFont</A><P>
2094
2095<HR>
2096<A NAME="wxwindowsetforegroundcolour"></A>
2097<H3>wxWindow::SetForegroundColour</H3>
2098<P>
2099<B>virtual void</B> <B>SetForegroundColour</B>(<B>const wxColour&amp; </B><I>colour</I>)<P>
2100Sets the foreground colour of the window.<P>
2101<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2102<I>colour</I><UL><UL>
2103The colour to be used as the foreground colour.</UL></UL>
2104<P>
2105<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2106The interpretation of foreground colour is open to interpretation according
2107to the window class; it may be the text colour or other colour, or it may not
2108be used at all.<P>
2109<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2110<A HREF="wx260.htm#wxwindowgetforegroundcolour">wxWindow::GetForegroundColour</A>,
2111<A HREF="wx260.htm#wxwindowsetbackgroundcolour">wxWindow::SetBackgroundColour</A>,
2112<A HREF="wx260.htm#wxwindowgetbackgroundcolour">wxWindow::GetBackgroundColour</A><P>
2113
2114<HR>
2115<A NAME="wxwindowsetid"></A>
2116<H3>wxWindow::SetId</H3>
2117<P>
2118<B>void</B> <B>SetId</B>(<B>int</B><I> id</I>)<P>
2119Sets the identifier of the window.<P>
2120<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2121Each window has an integer identifier. If the application has not provided one,
2122an identifier will be generated. Normally, the identifier should be provided
2123on creation and should not be modified subsequently.<P>
2124<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2125<A HREF="wx260.htm#wxwindowgetid">wxWindow::GetId</A>,
2126<A HREF="wx299.htm#windowids">Window identifiers</A><P>
2127
2128<HR>
2129<A NAME="wxwindowsetname"></A>
2130<H3>wxWindow::SetName</H3>
2131<P>
2132<B>virtual void</B> <B>SetName</B>(<B>const wxString&amp; </B><I>name</I>)<P>
2133Sets the window's name.<P>
2134<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2135<I>name</I><UL><UL>
2136A name to set for the window.</UL></UL>
2137<P>
2138<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2139<A HREF="wx260.htm#wxwindowgetname">wxWindow::GetName</A><P>
2140
2141<HR>
2142<A NAME="wxwindowsetpalette"></A>
2143<H3>wxWindow::SetPalette</H3>
2144<P>
2145<B>virtual void</B> <B>SetPalette</B>(<B>wxPalette* </B><I>palette</I>)<P>
2146Obsolete - use <A HREF="wx65.htm#wxdcsetpalette">wxDC::SetPalette</A> instead.<P>
2147
2148<HR>
2149<A NAME="wxwindowsetreturncode"></A>
2150<H3>wxWindow::SetReturnCode</H3>
2151<P>
2152<B>void</B> <B>SetReturnCode</B>(<B>int </B><I>retCode</I>)<P>
2153Sets the return code for this window.<P>
2154<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2155<I>retCode</I><UL><UL>
2156The integer return code, usually a control identifier.</UL></UL>
2157<P>
2158<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2159A return code is normally associated with a modal dialog, where <A HREF="wx71.htm#wxdialogshowmodal">wxDialog::ShowModal</A> returns
2160a code to the application. The function <A HREF="wx71.htm#wxdialogendmodal">wxDialog::EndModal</A> calls <B>SetReturnCode</B>.<P>
2161<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2162<A HREF="wx260.htm#wxwindowgetreturncode">wxWindow::GetReturnCode</A>, <A HREF="wx71.htm#wxdialogshowmodal">wxDialog::ShowModal</A>,
2163<A HREF="wx71.htm#wxdialogendmodal">wxDialog::EndModal</A><P>
2164
2165<HR>
2166<A NAME="wxwindowsetscrollbar"></A>
2167<H3>wxWindow::SetScrollbar</H3>
2168<P>
2169<B>virtual void</B> <B>SetScrollbar</B>(<B>int </B><I>orientation</I>, <B>int </B><I>position</I>,
2170<B>int </B><I>thumbSize</I>, <B>int </B><I>range</I>,
2171<B>const bool </B><I>refresh = TRUE</I>)<P>
2172Sets the scrollbar properties of a built-in scrollbar.<P>
2173<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2174<I>orientation</I><UL><UL>
2175Determines the scrollbar whose page size is to be set. May be wxHORIZONTAL or wxVERTICAL.</UL></UL>
2176<P>
2177<I>position</I><UL><UL>
2178The position of the scrollbar in scroll units.</UL></UL>
2179<P>
2180<I>thumbSize</I><UL><UL>
2181The size of the thumb, or visible portion of the scrollbar, in scroll units.</UL></UL>
2182<P>
2183<I>range</I><UL><UL>
2184The maximum position of the scrollbar.</UL></UL>
2185<P>
2186<I>refresh</I><UL><UL>
2187TRUE to redraw the scrollbar, FALSE otherwise.</UL></UL>
2188<P>
2189<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2190Let's say you wish to display 50 lines of text, using the same font.
2191The window is sized so that you can only see 16 lines at a time.<P>
2192You would use:<P>
2193<FONT SIZE=2><PRE>
2194  SetScrollbar(wxVERTICAL, 0, 16, 50);
2195</PRE>
2196</FONT><P>
2197Note that with the window at this size, the thumb position can never go
2198above 50 minus 16, or 34.<P>
2199You can determine how many lines are currently visible by dividing the current view
2200size by the character height in pixels.<P>
2201When defining your own scrollbar behaviour, you will always need to recalculate
2202the scrollbar settings when the window size changes. You could therefore put your
2203scrollbar calculations and SetScrollbar
2204call into a function named AdjustScrollbars, which can be called initially and also
2205from your <A HREF="wx260.htm#wxwindowonsize">wxWindow::OnSize</A> event handler function.<P>
2206<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2207<A HREF="wx297.htm#scrollingoverview">Scrolling overview</A>,
2208<A HREF="wx201.htm#wxscrollbar">wxScrollBar</A>, <A HREF="wx203.htm#wxscrolledwindow">wxScrolledWindow</A><P>
2209
2210<HR>
2211<A NAME="wxwindowsetscrollpos"></A>
2212<H3>wxWindow::SetScrollPos</H3>
2213<P>
2214<B>virtual void</B> <B>SetScrollPos</B>(<B>int </B><I>orientation</I>, <B>int </B><I>pos</I>, <B>const bool </B><I>refresh = TRUE</I>)<P>
2215Sets the position of one of the built-in scrollbars.<P>
2216<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2217<I>orientation</I><UL><UL>
2218Determines the scrollbar whose position is to be set. May be wxHORIZONTAL or wxVERTICAL.</UL></UL>
2219<P>
2220<I>pos</I><UL><UL>
2221Position in scroll units.</UL></UL>
2222<P>
2223<I>refresh</I><UL><UL>
2224TRUE to redraw the scrollbar, FALSE otherwise.</UL></UL>
2225<P>
2226<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2227This function does not directly affect the contents of the window: it is up to the
2228application to take note of scrollbar attributes and redraw contents accordingly.<P>
2229<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2230<A HREF="wx260.htm#wxwindowsetscrollbar">wxWindow::SetScrollbar</A>,
2231<A HREF="wx260.htm#wxwindowsetscrollpos">wxWindow::GetScrollPos</A>,
2232<A HREF="wx260.htm#wxwindowgetscrollthumb">wxWindow::GetScrollThumb</A>,
2233<A HREF="wx201.htm#wxscrollbar">wxScrollBar</A>, <A HREF="wx203.htm#wxscrolledwindow">wxScrolledWindow</A><P>
2234
2235<HR>
2236<A NAME="wxwindowsetsize"></A>
2237<H3>wxWindow::SetSize</H3>
2238<P>
2239<B>virtual void</B> <B>SetSize</B>(<B>int</B><I> x</I>, <B>int</B><I> y</I>, <B>int</B><I> width</I>, <B>int</B><I> height</I>,
2240 <B>int</B><I> sizeFlags = wxSIZE_AUTO</I>)<P>
2241<B>virtual void</B> <B>SetSize</B>(<B>const wxRect&amp;</B><I> rect</I>)<P>
2242Sets the size and position of the window in pixels.<P>
2243<B>virtual void</B> <B>SetSize</B>(<B>int</B><I> width</I>, <B>int</B><I> height</I>)<P>
2244<B>virtual void</B> <B>SetSize</B>(<B>const wxSize&amp;</B><I> size</I>)<P>
2245Sets the size of the window in pixels.<P>
2246<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2247<I>x</I><UL><UL>
2248Required x position in pixels, or -1 to indicate that the existing
2249value should be used.</UL></UL>
2250<P>
2251<I>y</I><UL><UL>
2252Required y position in pixels, or -1 to indicate that the existing
2253value should be used.</UL></UL>
2254<P>
2255<I>width</I><UL><UL>
2256Required width in pixels, or -1 to indicate that the existing
2257value should be used.</UL></UL>
2258<P>
2259<I>height</I><UL><UL>
2260Required height position in pixels, or -1 to indicate that the existing
2261value should be used.</UL></UL>
2262<P>
2263<I>size</I><UL><UL>
2264<A HREF="wx205.htm#wxsize">wxSize</A> object for setting the size.</UL></UL>
2265<P>
2266<I>rect</I><UL><UL>
2267<A HREF="wx193.htm#wxrect">wxRect</A> object for setting the position and size.</UL></UL>
2268<P>
2269<I>sizeFlags</I><UL><UL>
2270Indicates the interpretation of other parameters. It is a bit list of the following:<P>
2271<B>wxSIZE_AUTO_WIDTH</B>: a -1 width value is taken to indicate
2272a wxWindows-supplied default width.<BR>
2273
2274<B>wxSIZE_AUTO_HEIGHT</B>: a -1 height value is taken to indicate
2275a wxWindows-supplied default width.<BR>
2276
2277<B>wxSIZE_AUTO</B>: -1 size values are taken to indicate
2278a wxWindows-supplied default size.<BR>
2279
2280<B>wxSIZE_USE_EXISTING</B>: existing dimensions should be used
2281if -1 values are supplied.<BR>
2282
2283<B>wxSIZE_ALLOW_MINUS_ONE</B>: allow dimensions of -1 and less to be interpreted
2284as real dimensions, not default values.
2285</UL></UL>
2286<P>
2287<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2288The second form is a convenience for calling the first form with default
2289x and y parameters, and must be used with non-default width and height values.<P>
2290The first form sets the position and optionally size, of the window.
2291Parameters may be -1 to indicate either that a default should be supplied
2292by wxWindows, or that the current value of the dimension should be used.<P>
2293<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2294<A HREF="wx260.htm#wxwindowmove">wxWindow::Move</A><P>
2295<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
2296 In place of a single overloaded method name, wxPython
2297implements the following methods:<P>
2298
2299<UL><UL>
2300
2301<TABLE>
2302
2303
2304<TR><TD VALIGN=TOP>
2305<B>SetDimensions(x, y, width, height, sizeFlags=wxSIZE_AUTO)</B>
2306</TD>
2307
2308<TD VALIGN=TOP>
2309
2310</TD></TR>
2311
2312
2313<TR><TD VALIGN=TOP>
2314<B>SetSize(size)</B>
2315</TD>
2316
2317<TD VALIGN=TOP>
2318
2319</TD></TR>
2320
2321
2322<TR><TD VALIGN=TOP>
2323<B>SetPosition(point)</B>
2324</TD>
2325
2326<TD VALIGN=TOP>
2327
2328</TD></TR>
2329
2330
2331</TABLE>
2332</UL></UL>
2333
2334<P>
2335
2336<HR>
2337<A NAME="wxwindowsetsizehints"></A>
2338<H3>wxWindow::SetSizeHints</H3>
2339<P>
2340<B>virtual void</B> <B>SetSizeHints</B>(<B>int</B><I> minW=-1</I>, <B>int</B><I> minH=-1</I>, <B>int</B><I> maxW=-1</I>, <B>int</B><I> maxH=-1</I>,
2341 <B>int</B><I> incW=-1</I>, <B>int</B><I> incH=-1</I>)<P>
2342Allows specification of minimum and maximum window sizes, and window size increments.
2343If a pair of values is not set (or set to -1), the default values will be used.<P>
2344<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2345<I>minW</I><UL><UL>
2346Specifies the minimum width allowable.</UL></UL>
2347<P>
2348<I>minH</I><UL><UL>
2349Specifies the minimum height allowable.</UL></UL>
2350<P>
2351<I>maxW</I><UL><UL>
2352Specifies the maximum width allowable.</UL></UL>
2353<P>
2354<I>maxH</I><UL><UL>
2355Specifies the maximum height allowable.</UL></UL>
2356<P>
2357<I>incW</I><UL><UL>
2358Specifies the increment for sizing the width (Motif/Xt only).</UL></UL>
2359<P>
2360<I>incH</I><UL><UL>
2361Specifies the increment for sizing the height (Motif/Xt only).</UL></UL>
2362<P>
2363<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2364If this function is called, the user will not be able to size the window outside the
2365given bounds.<P>
2366The resizing increments are only significant under Motif or Xt.<P>
2367
2368<HR>
2369<A NAME="wxwindowsettitle"></A>
2370<H3>wxWindow::SetTitle</H3>
2371<P>
2372<B>virtual void</B> <B>SetTitle</B>(<B>const wxString&amp; </B><I>title</I>)<P>
2373Sets the window's title. Applicable only to frames and dialogs.<P>
2374<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2375<I>title</I><UL><UL>
2376The window's title.</UL></UL>
2377<P>
2378<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2379<A HREF="wx260.htm#wxwindowgettitle">wxWindow::GetTitle</A><P>
2380
2381<HR>
2382<A NAME="topic1041"></A>
2383<H3>wxWindow::Show</H3>
2384<P>
2385<B>virtual bool</B> <B>Show</B>(<B>const bool</B><I> show</I>)<P>
2386Shows or hides the window.<P>
2387<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2388<I>show</I><UL><UL>
2389If TRUE, displays the window and brings it to the front. Otherwise,
2390hides the window.</UL></UL>
2391<P>
2392<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2393<A HREF="wx260.htm#wxwindowisshown">wxWindow::IsShown</A><P>
2394
2395<HR>
2396<A NAME="wxwindowtransferdatafromwindow"></A>
2397<H3>wxWindow::TransferDataFromWindow</H3>
2398<P>
2399<B>virtual bool</B> <B>TransferDataFromWindow</B>()<P>
2400Transfers values from child controls to data areas specified by their validators. Returns
2401FALSE if a transfer failed.<P>
2402<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2403<A HREF="wx260.htm#wxwindowtransferdatatowindow">wxWindow::TransferDataToWindow</A>,
2404<A HREF="wx255.htm#wxvalidator">wxValidator</A>, <A HREF="wx260.htm#wxwindowvalidate">wxWindow::Validate</A><P>
2405
2406<HR>
2407<A NAME="wxwindowtransferdatatowindow"></A>
2408<H3>wxWindow::TransferDataToWindow</H3>
2409<P>
2410<B>virtual bool</B> <B>TransferDataToWindow</B>()<P>
2411Transfers values to child controls from data areas specified by their validators.<P>
2412<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
2413Returns FALSE if a transfer failed.<P>
2414<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2415<A HREF="wx260.htm#wxwindowtransferdatafromwindow">wxWindow::TransferDataFromWindow</A>,
2416<A HREF="wx255.htm#wxvalidator">wxValidator</A>, <A HREF="wx260.htm#wxwindowvalidate">wxWindow::Validate</A><P>
2417
2418<HR>
2419<A NAME="wxwindowvalidate"></A>
2420<H3>wxWindow::Validate</H3>
2421<P>
2422<B>virtual bool</B> <B>Validate</B>()<P>
2423Validates the current values of the child controls using their validators.<P>
2424<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
2425Returns FALSE if any of the validations failed.<P>
2426<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2427<A HREF="wx260.htm#wxwindowtransferdatafromwindow">wxWindow::TransferDataFromWindow</A>,
2428<A HREF="wx260.htm#wxwindowtransferdatafromwindow">wxWindow::TransferDataFromWindow</A>,
2429<A HREF="wx255.htm#wxvalidator">wxValidator</A><P>
2430
2431<HR>
2432<A NAME="wxwindowwarppointer"></A>
2433<H3>wxWindow::WarpPointer</H3>
2434<P>
2435<B>void</B> <B>WarpPointer</B>(<B>int</B><I> x</I>, <B>int</B><I> y</I>)<P>
2436Moves the pointer to the given position on the window.<P>
2437<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2438<I>x</I><UL><UL>
2439The new x position for the cursor.</UL></UL>
2440<P>
2441<I>y</I><UL><UL>
2442The new y position for the cursor.</UL></UL>
2443<P>
2444
2445</BODY></HTML>
2446