4 * ---------------------------------------------------------------------------
6 * Implementation of a minimal C++ class framework for use with the
7 * Microsoft Windows Application Programming Interface.
11 * This file provides the implementation for the default dialogue procedure
12 * which is available to all window classes derived from GenericDialogue.
14 * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
15 * Copyright (C) 2012, MinGW.org Project.
17 * ---------------------------------------------------------------------------
19 * Permission is hereby granted, free of charge, to any person obtaining a
20 * copy of this software and associated documentation files (the "Software"),
21 * to deal in the Software without restriction, including without limitation
22 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
23 * and/or sell copies of the Software, and to permit persons to whom the
24 * Software is furnished to do so, subject to the following conditions:
26 * The above copyright notice, this permission notice, and the following
27 * disclaimer shall be included in all copies or substantial portions of
30 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
31 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
33 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
35 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
36 * DEALINGS IN THE SOFTWARE.
38 * ---------------------------------------------------------------------------
41 #define WIN32_LEAN_AND_MEAN
47 BOOL CALLBACK GenericDialogue::Dismiss
48 ( HWND window, unsigned msg, WPARAM wParam, LPARAM lParam )
50 /* This is a minimal dialogue box procedure; it provides
51 * no more than a mechanism to dismiss the dialogue.
55 /* We need to handle only two message types:
59 * We make this a no-op, while marking it as handled.
64 switch( LOWORD( wParam ) )
66 /* Here, we respond to only the IDOK and IDCANCEL
67 * messages, by closing the dialogue...
71 EndDialog( window, 0 );
75 /* ...while in every other case, we simply ignore the message,
76 * leaving it for any other handler which may wish to process it.
82 /* $RCSfile$: end of file */