]> git.saurik.com Git - wxWidgets.git/blame - src/msw/dialog.cpp
compilation fix
[wxWidgets.git] / src / msw / dialog.cpp
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
b6c588e1 2// Name: src/msw/dialog.cpp
2bda0e17
KB
3// Purpose: wxDialog class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart and Markus Holzem
dc1c4b62 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
b6c588e1
VZ
12// ============================================================================
13// declarations
14// ============================================================================
15
16// ----------------------------------------------------------------------------
17// headers
18// ----------------------------------------------------------------------------
19
2bda0e17 20#ifdef __GNUG__
b6c588e1 21 #pragma implementation "dialog.h"
2bda0e17
KB
22#endif
23
24// For compilers that support precompilation, includes "wx.h".
25#include "wx/wxprec.h"
26
27#ifdef __BORLANDC__
b6c588e1 28 #pragma hdrstop
2bda0e17
KB
29#endif
30
31#ifndef WX_PRECOMP
b6c588e1
VZ
32 #include "wx/dialog.h"
33 #include "wx/utils.h"
34 #include "wx/frame.h"
35 #include "wx/app.h"
36 #include "wx/settings.h"
37 #include "wx/intl.h"
38 #include "wx/log.h"
2bda0e17
KB
39#endif
40
41#include "wx/msw/private.h"
dbda9e86 42#include "wx/log.h"
2bda0e17 43
47d67540 44#if wxUSE_COMMON_DIALOGS
b6c588e1 45 #include <commdlg.h>
2bda0e17
KB
46#endif
47
b6c588e1
VZ
48// ----------------------------------------------------------------------------
49// constants
50// ----------------------------------------------------------------------------
51
52// default dialog pos and size
53
2bda0e17
KB
54#define wxDIALOG_DEFAULT_X 300
55#define wxDIALOG_DEFAULT_Y 300
56
b6c588e1
VZ
57#define wxDIALOG_DEFAULT_WIDTH 500
58#define wxDIALOG_DEFAULT_HEIGHT 500
59
60// ----------------------------------------------------------------------------
61// globals
62// ----------------------------------------------------------------------------
63
64// all objects to be deleted during next idle processing - from window.cpp
cde9f08e 65extern wxList WXDLLEXPORT wxPendingDelete;
2bda0e17 66
b6c588e1
VZ
67// all frames and modeless dialogs - not static, used in frame.cpp, mdi.cpp &c
68wxWindowList wxModelessWindows;
69
70// all modal dialogs currently shown
71static wxWindowList wxModalDialogs;
72
73// ----------------------------------------------------------------------------
74// wxWin macros
75// ----------------------------------------------------------------------------
76
1b6452df
VZ
77IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxPanel)
78
79BEGIN_EVENT_TABLE(wxDialog, wxPanel)
1b6452df
VZ
80 EVT_BUTTON(wxID_OK, wxDialog::OnOK)
81 EVT_BUTTON(wxID_APPLY, wxDialog::OnApply)
82 EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel)
b6c588e1 83
1b6452df 84 EVT_CHAR_HOOK(wxDialog::OnCharHook)
b6c588e1 85
1b6452df 86 EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged)
b6c588e1 87
1b6452df
VZ
88 EVT_CLOSE(wxDialog::OnCloseWindow)
89END_EVENT_TABLE()
2bda0e17 90
b6c588e1
VZ
91// ============================================================================
92// implementation
93// ============================================================================
94
95// ----------------------------------------------------------------------------
96// wxDialog construction
97// ----------------------------------------------------------------------------
98
b0a6bb75 99void wxDialog::Init()
2bda0e17 100{
52a07708 101 m_oldFocus = (wxWindow *)NULL;
b0a6bb75 102
b6c588e1 103 m_isShown = FALSE;
2bda0e17 104
b0a6bb75
VZ
105 m_windowDisabler = (wxWindowDisabler *)NULL;
106
b6c588e1 107 SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
2bda0e17
KB
108}
109
debe6624 110bool wxDialog::Create(wxWindow *parent, wxWindowID id,
462e2437
VZ
111 const wxString& title,
112 const wxPoint& pos,
113 const wxSize& size,
114 long style,
115 const wxString& name)
2bda0e17 116{
b0a6bb75
VZ
117 Init();
118
abceee76
VZ
119 m_oldFocus = FindFocus();
120
462e2437 121 SetName(name);
bd9d76cb 122
f6bcfd97 123 wxTopLevelWindows.Append(this);
2bda0e17 124
462e2437 125 // windowFont = wxTheFontList->FindOrCreateFont(11, wxSWISS, wxNORMAL, wxNORMAL);
2bda0e17 126
462e2437 127 if (parent) parent->AddChild(this);
2bda0e17 128
462e2437
VZ
129 if ( id == -1 )
130 m_windowId = (int)NewControlId();
131 else
132 m_windowId = id;
133
134 int x = pos.x;
135 int y = pos.y;
136 int width = size.x;
137 int height = size.y;
138
b6c588e1
VZ
139 if (x < 0)
140 x = wxDIALOG_DEFAULT_X;
141 if (y < 0)
142 y = wxDIALOG_DEFAULT_Y;
462e2437
VZ
143
144 m_windowStyle = style;
145
462e2437 146 if (width < 0)
b6c588e1 147 width = wxDIALOG_DEFAULT_WIDTH;
462e2437 148 if (height < 0)
b6c588e1 149 height = wxDIALOG_DEFAULT_HEIGHT;
462e2437 150
706bb5f9
JS
151 // All dialogs should really have this style
152 m_windowStyle |= wxTAB_TRAVERSAL;
153
462e2437
VZ
154 WXDWORD extendedStyle = MakeExtendedStyle(m_windowStyle);
155 if (m_windowStyle & wxSTAY_ON_TOP)
156 extendedStyle |= WS_EX_TOPMOST;
157
4204da65
JS
158#ifndef __WIN16__
159 if (m_exStyle & wxDIALOG_EX_CONTEXTHELP)
160 extendedStyle |= WS_EX_CONTEXTHELP;
161#endif
462e2437
VZ
162 // Allows creation of dialogs with & without captions under MSWindows,
163 // resizeable or not (but a resizeable dialog always has caption -
164 // otherwise it would look too strange)
837e5743 165 const wxChar *dlg;
257bf510 166 if ( style & wxRESIZE_BORDER )
223d09f6 167 dlg = wxT("wxResizeableDialog");
462e2437 168 else if ( style & wxCAPTION )
223d09f6 169 dlg = wxT("wxCaptionDialog");
462e2437 170 else
223d09f6 171 dlg = wxT("wxNoCaptionDialog");
462e2437
VZ
172 MSWCreate(m_windowId, parent, NULL, this, NULL,
173 x, y, width, height,
174 0, // style is not used if we have dlg template
175 dlg,
176 extendedStyle);
2bda0e17 177
462e2437 178 HWND hwnd = (HWND)GetHWND();
2bda0e17 179
462e2437
VZ
180 if ( !hwnd )
181 {
f6bcfd97 182 wxFAIL_MSG(_("Failed to create dialog. You probably forgot to include wx/msw/wx.rc in your resources."));
2bda0e17 183
462e2437
VZ
184 return FALSE;
185 }
2bda0e17 186
462e2437 187 SubclassWin(GetHWND());
bd9d76cb 188
462e2437
VZ
189 SetWindowText(hwnd, title);
190 SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
2bda0e17 191
462e2437 192 return TRUE;
2bda0e17
KB
193}
194
debe6624 195void wxDialog::SetModal(bool flag)
2bda0e17 196{
b6c588e1
VZ
197 if ( flag )
198 {
199 m_windowStyle |= wxDIALOG_MODAL;
200
201 wxModelessWindows.DeleteObject(this);
202 }
203 else
204 {
205 m_windowStyle &= ~wxDIALOG_MODAL;
206
207 wxModelessWindows.Append(this);
208 }
2bda0e17
KB
209}
210
211wxDialog::~wxDialog()
212{
b6c588e1 213 m_isBeingDeleted = TRUE;
2bda0e17 214
b6c588e1 215 wxTopLevelWindows.DeleteObject(this);
2bda0e17 216
b0a6bb75 217 // this will also reenable all the other windows for a modal dialog
b6c588e1 218 Show(FALSE);
edccf428 219
b6c588e1
VZ
220 if ( !IsModal() )
221 wxModelessWindows.DeleteObject(this);
2bda0e17 222
b6c588e1
VZ
223 // If this is the last top-level window, exit.
224 if ( wxTheApp && (wxTopLevelWindows.Number() == 0) )
2bda0e17 225 {
b6c588e1
VZ
226 wxTheApp->SetTopWindow(NULL);
227
228 if ( wxTheApp->GetExitOnFrameDelete() )
229 {
230 ::PostQuitMessage(0);
231 }
2bda0e17 232 }
2bda0e17
KB
233}
234
b6c588e1
VZ
235// ----------------------------------------------------------------------------
236// kbd handling
237// ----------------------------------------------------------------------------
238
2bda0e17
KB
239// By default, pressing escape cancels the dialog
240void wxDialog::OnCharHook(wxKeyEvent& event)
241{
cbc66a27 242 if (GetHWND())
2bda0e17 243 {
cbc66a27
VZ
244 // "Esc" works as an accelerator for the "Cancel" button, but it
245 // shouldn't close the dialog which doesn't have any cancel button
246 if ( (event.m_keyCode == WXK_ESCAPE) && FindWindow(wxID_CANCEL) )
247 {
248 wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
249 cancelEvent.SetEventObject( this );
250 GetEventHandler()->ProcessEvent(cancelEvent);
251
252 // ensure that there is another message for this window so the
253 // ShowModal loop will exit and won't get stuck in GetMessage().
254 ::PostMessage(GetHwnd(), WM_NULL, 0, 0);
255
256 return;
257 }
2bda0e17 258 }
cbc66a27
VZ
259
260 // We didn't process this event.
261 event.Skip();
2bda0e17
KB
262}
263
b6c588e1
VZ
264// ----------------------------------------------------------------------------
265// Windows dialog boxes can't be iconized
266// ----------------------------------------------------------------------------
2bda0e17 267
debe6624 268void wxDialog::Iconize(bool WXUNUSED(iconize))
2bda0e17 269{
2bda0e17
KB
270}
271
a23fd0e1 272bool wxDialog::IsIconized() const
2bda0e17 273{
b6c588e1 274 return FALSE;
2bda0e17
KB
275}
276
b6c588e1
VZ
277// ----------------------------------------------------------------------------
278// size/position handling
279// ----------------------------------------------------------------------------
280
721b32e0 281void wxDialog::DoSetClientSize(int width, int height)
2bda0e17 282{
b6c588e1
VZ
283 HWND hWnd = (HWND) GetHWND();
284 RECT rect;
285 ::GetClientRect(hWnd, &rect);
2bda0e17 286
b6c588e1
VZ
287 RECT rect2;
288 GetWindowRect(hWnd, &rect2);
2bda0e17 289
b6c588e1
VZ
290 // Find the difference between the entire window (title bar and all)
291 // and the client area; add this to the new client size to move the
292 // window
293 int actual_width = rect2.right - rect2.left - rect.right + width;
294 int actual_height = rect2.bottom - rect2.top - rect.bottom + height;
2bda0e17 295
b6c588e1 296 MoveWindow(hWnd, rect2.left, rect2.top, actual_width, actual_height, TRUE);
debe6624 297
b6c588e1
VZ
298 wxSizeEvent event(wxSize(actual_width, actual_height), m_windowId);
299 event.SetEventObject( this );
300 GetEventHandler()->ProcessEvent(event);
2bda0e17
KB
301}
302
b6c588e1 303void wxDialog::DoGetPosition(int *x, int *y) const
2bda0e17 304{
b6c588e1
VZ
305 RECT rect;
306 GetWindowRect(GetHwnd(), &rect);
2bda0e17 307
b6c588e1
VZ
308 if ( x )
309 *x = rect.left;
310 if ( y )
311 *y = rect.top;
2bda0e17
KB
312}
313
b6c588e1
VZ
314// ----------------------------------------------------------------------------
315// showing the dialogs
316// ----------------------------------------------------------------------------
22cf5fec
VZ
317
318bool wxDialog::IsModal() const
319{
b6c588e1 320 return (GetWindowStyleFlag() & wxDIALOG_MODAL) != 0;
2bda0e17
KB
321}
322
b6c588e1 323bool wxDialog::IsModalShowing() const
2bda0e17 324{
b6c588e1 325 return wxModalDialogs.Find((wxDialog *)this) != NULL; // const_cast
2bda0e17
KB
326}
327
b6c588e1 328void wxDialog::DoShowModal()
2bda0e17 329{
b6c588e1 330 wxCHECK_RET( !IsModalShowing(), _T("DoShowModal() called twice") );
f6bcfd97 331 wxCHECK_RET( IsModal(), _T("can't DoShowModal() modeless dialog") );
b6c588e1
VZ
332
333 wxModalDialogs.Append(this);
334
335 wxWindow *parent = GetParent();
336
f6bcfd97 337 wxWindow* oldFocus = m_oldFocus;
b6c588e1 338
f6bcfd97
BP
339 // We have to remember the HWND because we need to check
340 // the HWND still exists (oldFocus can be garbage when the dialog
341 // exits, if it has been destroyed)
342 HWND hwndOldFocus = 0;
343 if (oldFocus)
344 hwndOldFocus = (HWND) oldFocus->GetHWND();
b6c588e1 345
b0a6bb75
VZ
346 // remember where the focus was
347 if ( !oldFocus )
b6c588e1 348 {
b0a6bb75
VZ
349 oldFocus = parent;
350 if ( parent )
351 hwndOldFocus = GetHwndOf(parent);
352 }
f6bcfd97 353
b0a6bb75
VZ
354 // disable all other app windows
355 wxASSERT_MSG( !m_windowDisabler, _T("disabling windows twice?") );
f6bcfd97 356
b0a6bb75
VZ
357 m_windowDisabler = new wxWindowDisabler(this);
358
359 // enter the modal loop
360 while ( IsModalShowing() )
361 {
b6c588e1 362#if wxUSE_THREADS
b0a6bb75 363 wxMutexGuiLeaveOrEnter();
b6c588e1
VZ
364#endif // wxUSE_THREADS
365
b0a6bb75
VZ
366 while ( !wxTheApp->Pending() && wxTheApp->ProcessIdle() )
367 ;
b6c588e1 368
b0a6bb75
VZ
369 // a message came or no more idle processing to do
370 wxTheApp->DoMessage();
b6c588e1
VZ
371 }
372
b0a6bb75 373#if 0 //def __WIN32__
f6bcfd97
BP
374 if ( parent )
375 ::SetActiveWindow(GetHwndOf(parent));
376#endif // __WIN32__
b6c588e1
VZ
377
378 // and restore focus
f6bcfd97
BP
379 // Note that this code MUST NOT access the dialog object's data
380 // in case the object has been deleted (which will be the case
381 // for a modal dialog that has been destroyed before calling EndModal).
382 if ( oldFocus && (oldFocus != this) && ::IsWindow(hwndOldFocus))
b6c588e1 383 {
f6bcfd97
BP
384 // This is likely to prove that the object still exists
385 if (wxFindWinFromHandle((WXHWND) hwndOldFocus) == oldFocus)
386 oldFocus->SetFocus();
b6c588e1 387 }
2bda0e17
KB
388}
389
b6c588e1 390bool wxDialog::Show(bool show)
2bda0e17 391{
abceee76 392 if ( !show )
86ad564e 393 {
b0a6bb75
VZ
394 // if we had disabled other app windows, reenable them back now because
395 // if they stay disabled Windows will activate another window (one
396 // which is enabled, anyhow) and we will lose activation
397 if ( m_windowDisabler )
86ad564e 398 {
b0a6bb75
VZ
399 delete m_windowDisabler;
400 m_windowDisabler = NULL;
86ad564e
JS
401 }
402 }
403
abceee76
VZ
404 // ShowModal() may be called for already shown dialog
405 if ( !wxDialogBase::Show(show) && !(show && IsModal()) )
b6c588e1
VZ
406 {
407 // nothing to do
408 return FALSE;
409 }
2bda0e17 410
b6c588e1
VZ
411 if ( show )
412 {
413 // usually will result in TransferDataToWindow() being called
414 InitDialog();
415 }
2bda0e17 416
b6c588e1
VZ
417 if ( IsModal() )
418 {
419 if ( show )
420 {
f6bcfd97
BP
421 // modal dialog needs a parent window, so try to find one
422 if ( !GetParent() )
423 {
424 wxWindow *parent = wxTheApp->GetTopWindow();
425 if ( parent && parent != this && parent->IsShown() )
426 {
427 // use it
428 m_parent = parent;
429 }
430 }
431
b6c588e1
VZ
432 DoShowModal();
433 }
434 else // end of modal dialog
435 {
436 // this will cause IsModalShowing() return FALSE and our local
437 // message loop will terminate
438 wxModalDialogs.DeleteObject(this);
439 }
440 }
2bda0e17 441
b6c588e1 442 return TRUE;
2bda0e17
KB
443}
444
f6bcfd97 445// a special version for Show(TRUE) for modal dialogs which returns return code
a23fd0e1 446int wxDialog::ShowModal()
2bda0e17 447{
f6bcfd97 448 if ( !IsModal() )
5e1febfa 449 {
f6bcfd97 450 SetModal(TRUE);
5e1febfa
VZ
451 }
452
b6c588e1 453 Show(TRUE);
5e1febfa 454
b6c588e1 455 return GetReturnCode();
2bda0e17
KB
456}
457
b6c588e1
VZ
458// NB: this function (surprizingly) may be called for both modal and modeless
459// dialogs and should work for both of them
2bda0e17
KB
460void wxDialog::EndModal(int retCode)
461{
b6c588e1 462 SetReturnCode(retCode);
6a088435 463
b6c588e1 464 Show(FALSE);
2bda0e17
KB
465}
466
b6c588e1
VZ
467// ----------------------------------------------------------------------------
468// wxWin event handlers
469// ----------------------------------------------------------------------------
2bda0e17
KB
470
471// Standard buttons
472void wxDialog::OnOK(wxCommandEvent& event)
473{
dc1c4b62
VZ
474 if ( Validate() && TransferDataFromWindow() )
475 {
b6c588e1 476 EndModal(wxID_OK);
dc1c4b62 477 }
2bda0e17
KB
478}
479
480void wxDialog::OnApply(wxCommandEvent& event)
481{
b6c588e1
VZ
482 if ( Validate() )
483 TransferDataFromWindow();
484
485 // TODO probably need to disable the Apply button until things change again
2bda0e17
KB
486}
487
488void wxDialog::OnCancel(wxCommandEvent& event)
489{
b6c588e1 490 EndModal(wxID_CANCEL);
2bda0e17
KB
491}
492
e3065973 493void wxDialog::OnCloseWindow(wxCloseEvent& event)
2bda0e17 494{
b6c588e1 495 // We'll send a Cancel message by default, which may close the dialog.
e3065973
JS
496 // Check for looping if the Cancel event handler calls Close().
497
498 // Note that if a cancel button and handler aren't present in the dialog,
499 // nothing will happen when you close the dialog via the window manager, or
b6c588e1
VZ
500 // via Close(). We wouldn't want to destroy the dialog by default, since
501 // the dialog may have been created on the stack. However, this does mean
502 // that calling dialog->Close() won't delete the dialog unless the handler
503 // for wxID_CANCEL does so. So use Destroy() if you want to be sure to
504 // destroy the dialog. The default OnCancel (above) simply ends a modal
505 // dialog, and hides a modeless dialog.
506
507 // VZ: this is horrible and MT-unsafe. Can't we reuse some of these global
508 // lists here? don't dare to change it now, but should be done later!
2bda0e17 509 static wxList closing;
bd9d76cb 510
2bda0e17 511 if ( closing.Member(this) )
e3065973 512 return;
bd9d76cb 513
2bda0e17 514 closing.Append(this);
bd9d76cb 515
387a3b02
JS
516 wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
517 cancelEvent.SetEventObject( this );
e3065973 518 GetEventHandler()->ProcessEvent(cancelEvent); // This may close the dialog
2bda0e17
KB
519
520 closing.DeleteObject(this);
e3065973 521}
2bda0e17 522
e3065973 523// Destroy the window (delayed, if a managed window)
a23fd0e1 524bool wxDialog::Destroy()
e3065973 525{
b6c588e1
VZ
526 wxCHECK_MSG( !wxPendingDelete.Member(this), FALSE,
527 _T("wxDialog destroyed twice") );
528
e3065973 529 wxPendingDelete.Append(this);
2bda0e17 530
b6c588e1 531 return TRUE;
94b49b93
JS
532}
533
2bda0e17
KB
534void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& event)
535{
1f112209 536#if wxUSE_CTL3D
b6c588e1 537 Ctl3dColorChange();
2bda0e17 538#else
b6c588e1
VZ
539 SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
540 Refresh();
2bda0e17 541#endif
68ad65f8 542}
42e69d6b
VZ
543
544// ---------------------------------------------------------------------------
545// dialog window proc
546// ---------------------------------------------------------------------------
547
548long wxDialog::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
549{
550 long rc = 0;
551 bool processed = FALSE;
552
553 switch ( message )
554 {
b0a6bb75 555#if 0 // now that we got owner window right it doesn't seem to be needed
5e1febfa
VZ
556 case WM_ACTIVATE:
557 switch ( LOWORD(wParam) )
558 {
559 case WA_ACTIVE:
560 case WA_CLICKACTIVE:
561 if ( IsModalShowing() && GetParent() )
562 {
563 // bring the owner window to top as the standard dialog
564 // boxes do
565 if ( !::SetWindowPos
566 (
567 GetHwndOf(GetParent()),
568 GetHwnd(),
569 0, 0,
570 0, 0,
571 SWP_NOACTIVATE |
572 SWP_NOMOVE |
573 SWP_NOSIZE
574 ) )
575 {
f6bcfd97 576 wxLogLastError(wxT("SetWindowPos(SWP_NOACTIVATE)"));
5e1febfa
VZ
577 }
578 }
579 // fall through to process it normally as well
580 }
581 break;
b0a6bb75 582#endif // 0
5e1febfa 583
42e69d6b
VZ
584 case WM_CLOSE:
585 // if we can't close, tell the system that we processed the
586 // message - otherwise it would close us
587 processed = !Close();
588 break;
abceee76
VZ
589
590 case WM_SETCURSOR:
591 // we want to override the busy cursor for modal dialogs:
592 // typically, wxBeginBusyCursor() is called and then a modal dialog
bfbd6dc1 593 // is shown, but the modal dialog shouldn't have hourglass cursor
d1477745 594 if ( IsModalShowing() && wxIsBusy() )
abceee76 595 {
bfbd6dc1
VZ
596 // set our cursor for all windows (but see below)
597 wxCursor cursor = m_cursor;
598 if ( !cursor.Ok() )
599 cursor = wxCURSOR_ARROW;
abceee76 600
bfbd6dc1
VZ
601 ::SetCursor(GetHcursorOf(cursor));
602
603 // in any case, stop here and don't let wxWindow process this
604 // message (it would set the busy cursor)
abceee76 605 processed = TRUE;
bfbd6dc1
VZ
606
607 // but return FALSE to tell the child window (if the event
608 // comes from one of them and not from ourselves) that it can
609 // set its own cursor if it has one: thus, standard controls
610 // (e.g. text ctrl) still have correct cursors in a dialog
611 // invoked while wxIsBusy()
612 rc = FALSE;
abceee76 613 }
bfbd6dc1 614 break;
42e69d6b
VZ
615 }
616
617 if ( !processed )
618 rc = wxWindow::MSWWindowProc(message, wParam, lParam);
619
620 return rc;
621}
b6c588e1
VZ
622
623#if wxUSE_CTL3D
624
625// Define for each class of dialog and control
626WXHBRUSH wxDialog::OnCtlColor(WXHDC WXUNUSED(pDC),
627 WXHWND WXUNUSED(pWnd),
628 WXUINT WXUNUSED(nCtlColor),
629 WXUINT message,
630 WXWPARAM wParam,
631 WXLPARAM lParam)
632{
633 return (WXHBRUSH)Ctl3dCtlColorEx(message, wParam, lParam);
634}
635
636#endif // wxUSE_CTL3D
637