-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathControlWindow.cpp
More file actions
74 lines (49 loc) · 1.76 KB
/
ControlWindow.cpp
File metadata and controls
74 lines (49 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// ControlWindow.cpp
#include "ControlWindow.h"
HWND ControlWindowCreate( HWND hWndParent, HINSTANCE hInstance )
{
HWND hWndControl;
// Create control window
hWndControl = CreateWindowEx( CONTROL_WINDOW_EXTENDED_STYLE, CONTROL_WINDOW_CLASS_NAME, CONTROL_WINDOW_TEXT, CONTROL_WINDOW_STYLE, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hWndParent, ( HMENU )NULL, hInstance, NULL );
// Ensure that control window was created
if( hWndControl )
{
// Successfully created control window
} // End of successfully created control window
return hWndControl;
} // End of function ControlWindowCreate
BOOL ControlWindowHandleCommandMessage( WPARAM wParam, LPARAM, BOOL( *lpStatusFunction )( LPCTSTR lpszItemText ) )
{
BOOL bResult = FALSE;
// Select control window notification code
switch( HIWORD( wParam ) )
{
default:
{
// Default notification code
// No need to do anything here, just continue with default result
// Break out of switch
break;
} // End of default notification code
}; // End of selection for control window notification code
return bResult;
} // End of function ControlWindowHandleCommandMessage
BOOL ControlWindowHandleNotifyMessage( WPARAM wParam, LPARAM lParam, BOOL( *lpStatusFunction )( LPCTSTR lpszItemText ) )
{
BOOL bResult = FALSE;
LPNMHDR lpNmhdr;
// Get notify message handler
lpNmhdr = ( ( LPNMHDR )lParam );
// Select control window notification code
switch( lpNmhdr->code )
{
default:
{
// Default notification code
// No need to do anything here, just continue with default result
// Break out of switch
break;
} // End of default notification code
}; // End of selection for control window notification code
return bResult;
} // End of function ControlWindowHandleNotifyMessage