25 void Init(HWND pHwnd, UINT pMessage, WPARAM pWP, LPARAM pLP)
43 assert(resultSet ==
false);
65 HWND WindowGainingCapture() {
return (HWND)lp; }
70 WORD ID() {
return LOWORD(wp); }
71 WORD NotifyCode() {
return HIWORD(wp); }
72 HWND
Control() {
return reinterpret_cast<HWND
>(lp); }
77 CREATESTRUCT* CreateStruct() {
return reinterpret_cast<CREATESTRUCT*
>(lp); }
82 HDC
DC() {
return (HDC)wp; }
83 HWND
Control() {
return (HWND)lp; }
94 HDROP
HandleDrop() {
return reinterpret_cast<HDROP
>(wp); }
107 UINT requiredBufferSize = DragQueryFile(
HandleDrop(), i, 0, 0);
110 dropped.resize(requiredBufferSize);
112 DragQueryFile(
HandleDrop(), i, &dropped[0], requiredBufferSize + 1);
120 bool Enabled() {
return wp == TRUE; }
125 HDC
DC() {
return reinterpret_cast<HDC
>(wp); }
133 WPARAM Type() {
return wp; }
141 MINMAXINFO* MinMaxInfo() {
return reinterpret_cast<MINMAXINFO*
>(lp); }
155 SHORT Repeat() {
return LOWORD(lp); }
156 BYTE ScanCode() {
return static_cast<BYTE
>((lp & 0x00FF0000) >> 16); }
157 bool ExtendedKey() {
return (lp & 0x01000000) > 0; }
158 bool AltDown() {
return (lp & 0x20000000) > 0; }
159 bool KeyWasDown() {
return (lp & 0x40000000) > 0; }
160 bool KeyWasUp() {
return !KeyWasDown(); }
161 bool KeyReleased() {
return (lp & 0x80000000) > 0; }
162 bool KeyPressed() {
return !KeyReleased(); }
167 bool Ctrl() {
return (wp & MK_CONTROL) > 0; }
168 bool Shift() {
return (wp & MK_SHIFT) > 0; }
169 bool LButton() {
return (wp & MK_LBUTTON) > 0; }
170 bool MButton() {
return (wp & MK_MBUTTON) > 0; }
171 bool RButton() {
return (wp & MK_RBUTTON) > 0; }
172 bool XButton1() {
return (wp & MK_XBUTTON1) > 0; }
173 bool XButton2() {
return (wp & MK_XBUTTON2) > 0; }
174 SHORT X() {
return MAKEPOINTS(lp).x; }
175 SHORT Y() {
return MAKEPOINTS(lp).y; }
180 return static_cast<double>(
static_cast<SHORT
>(HIWORD(wp)) ) /
181 static_cast<double>(WHEEL_DELTA);
191 SHORT X() {
return MAKEPOINTS(lp).x; }
192 SHORT Y() {
return MAKEPOINTS(lp).y; }
198 RECT*
Rect() {
return reinterpret_cast<RECT*
>(lp); }
203 WPARAM ID() {
return wp; }
204 NMHDR* Header() {
return reinterpret_cast<NMHDR*
>(lp); }
209 HDC
DC() {
return reinterpret_cast<HDC
>(wp); }
210 LPARAM Options() {
return lp; }
215 WORD Pos() {
return LOWORD(wp); }
216 WORD ScrollCode() {
return HIWORD(wp); }
217 HWND
ScrollBar() {
return reinterpret_cast<HWND
>(lp); }
218 bool IsHorizontal() {
return message == WM_HSCROLL; }
219 bool IsVertical() {
return message == WM_VSCROLL; }
227 WPARAM Type() {
return wp; }
228 WORD Width() {
return LOWORD(lp); }
229 WORD Height() {
return HIWORD(lp); }
230 Size GetSize() {
return Size(Width(), Height()); }
235 WPARAM Side() {
return wp; }
236 RECT*
Rect() {
return reinterpret_cast<RECT*
>(lp); }
241 bool StyleChanged() {
return (wp & GWL_STYLE) > 0; }
242 bool ExStyleChanged() {
return (wp & GWL_EXSTYLE) > 0; }
243 STYLESTRUCT* StyleStruct() {
return reinterpret_cast<STYLESTRUCT*
>(lp); }
248 WPARAM ID() {
return wp; }
253 WINDOWPOS* WindowPos() {
return reinterpret_cast<WINDOWPOS*
>(lp); }
The big window class that every other class descends from.
Definition: WindowBase.h:152
WPARAM KeyCode()
Definition: Message.h:154
Base class for standard Windows controls.
Definition: Control.h:73
bool FromXButton2()
Definition: Message.h:186
Definition: Message.h:189
Definition: Message.h:131
Definition: Message.h:196
void ResultDefault()
Definition: Message.h:51
UINT NumFiles()
Definition: Message.h:99
Definition: Message.h:251
double WheelMoveSteps()
Definition: Message.h:178
Wrap parameters of WndProc in a struct. Can be used for any message.
Definition: Message.h:10
void Init(HWND pHwnd, UINT pMessage, WPARAM pWP, LPARAM pLP)
Definition: Message.h:25
Windows POINT structure with constructor.
Definition: Rect.h:10
tstring GetFile(UINT i)
Definition: Message.h:105
Definition: Message.h:144
Unmanaged device context, to allow the user to call IDC functions on arbitrary DCs.
Definition: DC.h:167
Windows SIZE structure with constructor.
Definition: Rect.h:79
Definition: Message.h:207
LRESULT Default()
Definition: Message.inl:4
HDROP HandleDrop()
Definition: Message.h:94
Definition: Message.h:123
bool FromXButton1()
Definition: Message.h:184
Windows RECT structure with constructor.
Definition: Rect.h:108
Definition: Message.h:118
void Result(HICON icon)
Definition: Message.h:136
void Result(bool erased)
Definition: Message.h:128
Definition: Message.h:233
void Result(LRESULT res)
Definition: Message.h:40
Definition: Message.h:225
Definition: Message.h:239
Definition: Message.h:201
Definition: Message.h:139
Definition: Message.h:246
Definition: Message.h:165
void Result(HBRUSH brush)
Definition: Message.h:86