OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
commctrl.h
Go to the documentation of this file.
1//
2/// \file
3/// Definition of classes for CommonControl encapsulation
4//
5// Part of OWLNext - the next generation Object Windows Library
6// Copyright (c) 1995, 1996 by Borland International, All Rights Reserved
7// Copyright (c) 2013 Vidar Hasfjord
8//
9// For more information, including license details, see
10// http://owlnext.sourceforge.net
11//
12
13#if !defined(OWL_COMMCTRL_H)
14#define OWL_COMMCTRL_H
15
16#include <owl/private/defs.h>
17#if defined(BI_HAS_PRAGMA_ONCE)
18# pragma once
19#endif
20
21//JJH
22#if !defined(RC_INVOKED)
23
24# include <owl/control.h>
25# include <owl/module.h>
26
27#if !defined(__RICHEDIT_H)
28# include <richedit.h>
29#endif
30
31#endif /*RC_INVOKED*/
32
33//
34// Get the necessary system headers
35//
36#if !defined(_INC_COMMCTRL)
37# include <commctrl.h>
38#endif
39
40#include <owl/shelwapi.h>
41
42#pragma comment(lib, "comctl32")
43
46
47namespace owl {
48
49//
50/// Wrapper for the Windows API function InitCommmonControlsEx.
51/// The given argument must be one or a combination of flags indicating the controls to register.
52/// Throws TXCommCtrl on failure.
53/// \sa http://msdn.microsoft.com/en-us/library/windows/desktop/bb775697.aspx
54//
56
57//
58/// Returns the version number of the Common Control library (ComCtl32.dll).
59/// The upper WORD of the returned value contains the major version number, and the lower WORD
60/// contains the minor version number.
61/// \sa http://msdn.microsoft.com/en-us/library/windows/desktop/hh298349.aspx#DllGetVersion
62//
64
65//----------------------------------------------------------------------------
66// Forward declaration of classes used in dispatch macros
67//
68class _OWLCLASS THdrItem;
69
70#include <owl/preclass.h>
71
72//
73/// \class TXCommCtrl
74// ~~~~~ ~~~~~~~~~~
75/// Exception object thrown by the Common Control wrappers of ObjectWindows.
76//
77class _OWLCLASS TXCommCtrl : public TXOwl {
78 public:
79 TXCommCtrl();
80 TXCommCtrl* Clone();
81 void Throw();
82 static void Raise();
83};
84
85//
86/// \class TNotify
87// ~~~~~ ~~~~~~~
88/// TNotify is a thin wrapper around the NMHDR structure. It's a
89/// place-holder for future enhancements for handling notifications.
90//
91class _OWLCLASS TNotify : public NMHDR {
92 public:
93 TNotify();
95};
96
97
98//----------------------------------------------------------------------------
99// Structures used for UpDown (Spin Ctrl) notifications
100//----------------------------------------------------------------------------
101//
102/// \class TNmUpDown
103// ~~~~~ ~~~~~~~~~
104/// TNmUpDown is a wrapper of the NM_UPDOWN structure sent with
105/// notifications from an 'UpDown' control.
106//
107class _OWLCLASS TNmUpDown : public NM_UPDOWN {
108 public:
109 TNmUpDown(HWND hwnd, uint id, uint code, int pos, int delta);
110
111 // Allows the notification structure to be transparently treated an
112 // an NMHDR structure thereby eliminating the need to explicitly refer
113 // to the NMHDR data member [always the first member of notification
114 // structures]
115 //
116 operator NMHDR&() { return hdr; }
117};
118
119
120
121//----------------------------------------------------------------------------
122// Structures used for Tab Control notifications
123//----------------------------------------------------------------------------
124//
125/// \class TTabKeyDown
126// ~~~~~ ~~~~~~~~~~~
127/// Wrapper of the TC_KEYDOWN structure sent to the parent of a tabcontrol
128/// to notify that a key has been pressed
129//
130class _OWLCLASS TTabKeyDown : public TC_KEYDOWN {
131 public:
132 TTabKeyDown();
134
135/// Allows the notification structure to be transparently treated as an NMHDR
136/// structure, thereby eliminating the need to explicitly refer to the NMHDR data
137/// member (which is always the first member of notification structures).
138 operator NMHDR&() { return hdr; }
139};
140
141
142
143//----------------------------------------------------------------------------
144// Structures used for tooltip notifications & API
145//----------------------------------------------------------------------------
146//
147/// \class TTooltipText
148// ~~~~~ ~~~~~~~~~~~~
149/// TTooltipText identifies a tool for which text is to be displayed. It
150/// is sent to the parent of the tooltip via a WM_NOTIFY/TTN_NEEDTEXT
151/// notification. It receives the text to be displayed.
152//
153class _OWLCLASS TTooltipText : public TOOLTIPTEXT {
154 public:
155 operator NMHDR&() { return hdr; }
156
157 // Set the text to be displayed for the tool.
158 //
159 void SetText(LPCTSTR buff);
160 void SetText(int resId, HINSTANCE hInstance);
161 void CopyText(LPCTSTR buff);
162 void CopyText(const tstring& s) { CopyText(s.c_str()); }
163};
164
165//
166//
167//
168class _OWLCLASS TTtCustomDraw : public NMTTCUSTOMDRAW {
169 public:
170 operator NMCUSTOMDRAW&() { return nmcd; }
171};
172
173//
174//
175//
176class _OWLCLASS TTooltipDispInfo : public NMTTDISPINFO {
177 public:
178 operator NMHDR&() { return hdr; }
179};
180
181//
182// Documented but not defined ????????????????
183//
184#if 0
186 public:
187 operator NMHDR&() { return hdr; }
188};
189#endif
190
191//----------------------------------------------------------------------------
192// Structures used for Column Header notifications
193//----------------------------------------------------------------------------
194//
195/// \class THdrNotify
196// ~~~~~ ~~~~~~~~~~
197/// THdrNotify encapsulates the 'HD_NOTIFY' structure which is sent
198/// with the WM_NOTIFY messages sent by the HeaderControl to its parent.
199//
200class _OWLCLASS THdrNotify : public HD_NOTIFY {
201 public:
202/// Allows the notification structure to be transparently treated as an NMHDR
203/// structure, thereby eliminating the need to explicitly refer to the NMHDR data
204/// member (which is always the first member of notification structures).
205 operator NMHDR&() { return hdr; }
206};
207
208//
209// Version 4.0
210//
211class _OWLCLASS THdrDispInfo : public NMHDDISPINFO {
212 public:
213 operator NMHDR&() { return hdr; }
214};
215
216//
217// Version 5.8
218//
219class _OWLCLASS THdrFilterBtnClick : public NMHDFILTERBTNCLICK {
220 public:
221 operator NMHDR&() { return hdr; }
222};
223
224//----------------------------------------------------------------------------
225// TDateTimePicker structures
226//
227// Version 4.70
228//
229class _OWLCLASS TDateTimeChange : public NMDATETIMECHANGE {
230 public:
231 operator NMHDR&() { return nmhdr; }
232};
233
234//
235// Version 4.70
236//
237class _OWLCLASS TDateTimeFormat : public NMDATETIMEFORMAT {
238 public:
239 operator NMHDR&() { return nmhdr; }
240};
241
242//
243// Version 4.70
244//
245class _OWLCLASS TDateTimeFormatQuery : public NMDATETIMEFORMATQUERY {
246 public:
247 operator NMHDR&() { return nmhdr; }
248};
249
250//
251// Version 4.70
252//
253class _OWLCLASS TDateTimeString : public NMDATETIMESTRING {
254 public:
255 operator NMHDR&() { return nmhdr; }
256};
257
258//
259// Version 4.70
260//
261class _OWLCLASS TDateTimeKeyDown : public NMDATETIMEWMKEYDOWN {
262 public:
263 operator NMHDR&() { return nmhdr; }
264};
265
266//----------------------------------------------------------------------------
267// Structures used for RichEdit notifications and API
268//----------------------------------------------------------------------------
269//
270/// \class TEnDropFiles
271// ~~~~~ ~~~~~~~~~~~~
272/// Structure sent with EN_DROPFILES notification.
273//
274class _OWLCLASS TEnDropFiles : public ENDROPFILES {
275 public:
276/// Allows the notification structure to be transparently treated as an NMHDR
277/// structure, thereby eliminating the need to explicitly refer to the NMHDR data
278/// member (which is always the first member of notification structures).
279 operator NMHDR&() { return nmhdr; }
280};
281
282//
283/// \class TMsgFilter
284// ~~~~~ ~~~~~~~~~~
285/// Structure sent with EN_MSGFILTER notification
286//
287class _OWLCLASS TMsgFilter : public MSGFILTER {
288 public:
289/// Allows the notification structure to be transparently treated as an NMHDR
290/// structure, thereby eliminating the need to explicitly refer to the NMHDR data
291/// member (which is always the first member of notification structures).
292 operator NMHDR&() { return nmhdr; }
293};
294
295//
296/// \class TEnProtected
297// ~~~~~ ~~~~~~~~~~~~
298/// Structure sent with EN_PROTECTED notification
299//
300class _OWLCLASS TEnProtected : public ENPROTECTED {
301 public:
302/// Allows the notification structure to be transparently treated as an NMHDR
303/// structure, thereby eliminating the need to explicitly refer to the NMHDR data
304/// member (which is always the first member of notification structures).
305 operator NMHDR&() { return nmhdr; }
306};
307
308//
309/// \class TReqResize
310// ~~~~~ ~~~~~~~~~~
311/// Structure sent with EN_REQUESTRESIZE notification
312//
313class _OWLCLASS TReqResize : public REQRESIZE {
314 public:
315/// Allows the notification structure to be transparently treated as an NMHDR
316/// structure, thereby eliminating the need to explicitly refer to the NMHDR data
317/// member (which is always the first member of notification structures).
318 operator NMHDR&() { return nmhdr; }
319};
320
321//
322/// \class TSelChange
323// ~~~~~ ~~~~~~~~~~
324/// Structure sent with EN_SELCHANGE notification
325//
326class _OWLCLASS TSelChange : public SELCHANGE {
327 public:
328/// Allows the notification structure to be transparently treated as an NMHDR
329/// structure, thereby eliminating the need to explicitly refer to the NMHDR data
330/// member (which is always the first member of notification structures).
331 operator NMHDR&() { return nmhdr; }
332};
333
334
335//
336// Forward declarations of notifications
337//
338
339//----------------------------------------------------------------------------
340// Structures used for ListView control (TListViewCtrl) notifications
341//----------------------------------------------------------------------------
342//
343/// \class TLvNotify
344// ~~~~~ ~~~~~~~~~
345/// Basic TListViewCtrl notification
346//
347class _OWLCLASS TLvNotify : public NMLISTVIEW {
348 public:
349 operator NMHDR&() { return hdr; }
350};
351typedef TLvNotify TLwNotify; // Old alternative name - deprecated.
352
353//
354/// \class TLvDispInfoNotify
355// ~~~~~ ~~~~~~~~~~~~~~~~~
356/// A TListViewCtrl notification to repaint an item.
357//
358class _OWLCLASS TLvDispInfoNotify : public NMLVDISPINFO {
359 public:
360 operator NMHDR&() { return hdr; }
361};
362typedef TLvDispInfoNotify TLwDispInfoNotify; // Old alternative name - deprecated.
363
364//
365/// \class TLvKeyDownNotify
366// ~~~~~ ~~~~~~~~~~~~~~~~
367/// A TListViewCtrl notification that a key has been pressed.
368//
369class _OWLCLASS TLvKeyDownNotify : public NMLVKEYDOWN {
370 public:
371 operator NMHDR&() { return hdr; }
372};
373typedef TLvKeyDownNotify TLwKeyDownNotify; // Old alternative name - deprecated.
374
375//
376/// \class TLvBkImage
377// ~~~~~ ~~~~~~~~~~
378// Version 4.70
379class _OWLCLASS TLvBkImage : public LVBKIMAGE{
380 public:
382};
383typedef TLvBkImage TLwBkImage; // Old alternative name - deprecated.
384
385//
386/// \class TLvCacheHint
387// ~~~~~ ~~~~~~~~~~
388// Version 4.70
389class _OWLCLASS TLvCacheHint : public NMLVCACHEHINT{
390 public:
392 operator NMHDR&() { return hdr; }
393};
394typedef TLvCacheHint TLwCacheHint; // Old alternative name - deprecated.
395
396//
397/// \class TLvCustomDraw
398// ~~~~~ ~~~~~~~~~~~~~
399// Version 4.70/4.71
400class _OWLCLASS TLvCustomDraw : public NMLVCUSTOMDRAW{
401 public:
403
404 operator NMCUSTOMDRAW&() { return nmcd; }
405
406 TColor GetTextColor() const { return TColor(clrText); }
407 TColor GetBkColor() const { return TColor(clrTextBk); }
408 int GetSubItem() const { return iSubItem; } // Version 4.71
409};
410typedef TLvCustomDraw TLwCustomDraw; // Old alternative name - deprecated.
411
412//
413/// \class TLvFindItem
414// ~~~~~ ~~~~~~~~~~~
415// Version 4.70
416class _OWLCLASS TLvFindItem : public NMLVFINDITEM{
417 public:
419
420 operator NMHDR&() { return hdr; }
421};
422typedef TLvFindItem TLwFindItem; // Old alternative name - deprecated.
423
424//
425/// \class TLvOdStateChanged
426// ~~~~~ ~~~~~~~~~~~~~~~~~
427// Version 4.70
428class _OWLCLASS TLvOdStateChanged : public NMLVODSTATECHANGE{
429 public:
431
432 operator NMHDR&() { return hdr; }
433};
434typedef TLvOdStateChanged TLwOdStateChanged; // Old alternative name - deprecated.
435
436//
437/// \class TLvGetInfoTip
438// ~~~~~ ~~~~~~~~~~~~~
439// Version 4.71
440class _OWLCLASS TLvGetInfoTip : public NMLVGETINFOTIP{
441 public:
443
444 operator NMHDR&() { return hdr; }
445};
446typedef TLvGetInfoTip TLwGetInfoTip; // Old alternative name - deprecated.
447
448//
449/// \class TLvItemActivate
450// ~~~~~ ~~~~~~~~~~~~~~~
451// Version 4.71
452class _OWLCLASS TLvItemActivate : public NMITEMACTIVATE{
453 public:
455
456 operator NMHDR&() { return hdr; }
457};
458typedef TLvItemActivate TLwItemActivate; // Old alternative name - deprecated.
459
460
461
462//----------------------------------------------------------------------------
463// Structures used for TreeView control (TTreeViewCtrl) notifications
464//----------------------------------------------------------------------------
465//
466/// \class TTvNotify
467// ~~~~~ ~~~~~~~~~
468/// Basic TTreeViewCtrl notification
469//
470class _OWLCLASS TTvNotify : public NMTREEVIEW {
471 public:
472 operator NMHDR&() { return hdr; }
473};
474typedef TTvNotify TTwNotify; // Old alternative name - deprecated.
475
476//
477/// \class TTvDispInfoNotify
478// ~~~~~ ~~~~~~~~~~~~~~~~~
479/// A TTreeViewCtrl notification to repaint an item.
480//
481class _OWLCLASS TTvDispInfoNotify : public NMTVDISPINFO {
482 public:
483 operator NMHDR&() { return hdr; }
484};
485typedef TTvDispInfoNotify TTwDispInfoNotify; // Old alternative name - deprecated.
486
487//
488/// \class TTvKeyDownNotify
489// ~~~~~ ~~~~~~~~~~~~~~~~
490/// A TTreeViewCtrl notification that a key has been pressed.
491//
492class _OWLCLASS TTvKeyDownNotify : public NMTVKEYDOWN {
493 public:
494 operator NMHDR&() { return hdr; }
495};
496typedef TTvKeyDownNotify TTwKeyDownNotify; // Old alternative name - deprecated.
497
498//
499/// \class TTvHitTestInfo
500// ~~~~~ ~~~~~~~~~~~~~~
501/// A TTreeViewCtrl notification for hit-testing.
502//
503class _OWLCLASS TTvHitTestInfo : public TVHITTESTINFO {
504 public:
505};
506typedef TTvHitTestInfo TTwHitTestInfo; // Old alternative name - deprecated.
507
508//
509/// \class TTvCustomDraw
510// ~~~~~ ~~~~~~~~~~~~~
511// Version 4.70/4.71
512class _OWLCLASS TTvCustomDraw : public NMTVCUSTOMDRAW{
513 public:
514 operator NMHDR&() {return nmcd.hdr;}
515 operator NMCUSTOMDRAW&() { return nmcd; }
516
517 TColor GetTextColor() const { return TColor(clrText); }
518 TColor GetBkColor() const { return TColor(clrTextBk); }
519 int GetLevel() const { return iLevel; } // Version 4.71
520};
521typedef TTvCustomDraw TTwCustomDraw; // Old alternative name - deprecated.
522
523//
524// class TTvGetInfoTip
525// ~~~~~ ~~~~~~~~~~~~~
526// Version 4.71
527class _OWLCLASS TTvGetInfoTip : public NMTVGETINFOTIP {
528 public:
529 operator NMHDR&() { return hdr; }
530};
531typedef TTvGetInfoTip TTwGetInfoTip; // Old alternative name - deprecated.
532
533////////////////////////////////////////////////////////////////////////////////
534//
535/// \class TNmMouse
536// ~~~~~ ~~~~~~~~
537//
538class _OWLCLASS TNmMouse : public NMMOUSE {
539 public:
540 operator NMHDR&() { return hdr; }
541};
542
543//
544/// \class TNmObjectNotify
545// ~~~~~ ~~~~~~~~~~~~~~~
546//
547class _OWLCLASS TNmObjectNotify : public NMOBJECTNOTIFY {
548 public:
549 operator NMHDR&() { return hdr; }
550};
551
552//
553/// \class TNmKey
554// ~~~~~ ~~~~~~
555//
556class _OWLCLASS TNmKey : public NMKEY {
557 public:
558 operator NMHDR&() { return hdr; }
559};
560
561
562//
563/// \class TNmChar
564// ~~~~~ ~~~~~~~
565//
566class _OWLCLASS TNmChar : public NMCHAR {
567 public:
568 operator NMHDR&() { return hdr; }
569};
570
571//
572/// \class TNmCustomDraw
573// ~~~~~ ~~~~~~~~~~~~~
574//
575class _OWLCLASS TNmCustomDraw : public NMCUSTOMDRAW {
576 public:
578};
579
580//
581/// \class TRebarInfo
582// ~~~~~ ~~~~~~~~~~
583//
584class _OWLCLASS TRebarInfo : public REBARINFO {
585 public:
586 TRebarInfo() { cbSize = sizeof(REBARINFO); }
587
588 // Would prefer to use TImageLists...
589 void SetImageList(HIMAGELIST Images);
590 HIMAGELIST GetImageList();
591};
592
593//
594/// \class TColorScheme
595// ~~~~~ ~~~~~~~~~~~~
596//
597class _OWLCLASS TColorScheme : public COLORSCHEME {
598 public:
600 {
601 dwSize=sizeof(COLORSCHEME);
602 clrBtnHighlight=clrBtnShadow=TColor::None;
603 }
605 {
606 dwSize = sizeof(COLORSCHEME);
609 }
610
615};
616
617//
618/// \class TRbHitTestInfo
619// ~~~~~ ~~~~~~~~~~
620//
621class _OWLCLASS TRbHitTestInfo : public RBHITTESTINFO {
622 public:
624};
625
626//
627// ComboBoxEx structures
628// ~~~~~~~~~~ ~~~~~~~~~~
629//
630class _OWLCLASS TCBExItemInfo : public COMBOBOXEXITEM {
631 public:
632};
633
634class _OWLCLASS TCBExEditInfo : public NMCBEENDEDIT {
635 public:
636};
637
638class _OWLCLASS TCBExDragInfo : public NMCBEDRAGBEGIN {
639 public:
640};
641
642class _OWLCLASS TCBExNotifyInfo : public NMCOMBOBOXEX {
643 public:
644};
645
646//
647/// MonthCalendar Control notifications
648//
649
650class _OWLCLASS TMCHitTestInfo: public MCHITTESTINFO{
651 public:
652 TMCHitTestInfo() { cbSize = sizeof(MCHITTESTINFO);}
653};
654
655//
656/// \class TNmDayState
657// ~~~~~ ~~~~~~~~~~~
658//
659class _OWLCLASS TNmDayState : public NMDAYSTATE {
660 public:
661 operator NMHDR&() { return nmhdr; }
662};
663
664//
665/// \class TNmSelChange
666// ~~~~~ ~~~~~~~~~~~~
667//
668class _OWLCLASS TNmSelChange : public NMSELCHANGE {
669 public:
670 operator NMHDR&() { return nmhdr; }
671};
672
673
674//
675/// Pager Control notifications
676//
677
678class _OWLCLASS TNmPGCalcSize: public NMPGCALCSIZE{
679 public:
680 operator NMHDR&() { return hdr; }
681};
682
683class _OWLCLASS TNmPGScroll: public NMPGSCROLL{
684 public:
685 operator NMHDR&() { return hdr; }
686};
687
688//
689/// IP Address control notifications
690//
691
692class _OWLCLASS TNmIPAddress: public NMIPADDRESS{
693 public:
694 operator NMHDR&() { return hdr; }
695};
696
697// Property Sheet notifications
698
699class _OWLCLASS TPshNotify : public PSHNOTIFY {
700 public:
702 operator NMHDR&() { return hdr; }
703};
704
705#include <owl/posclass.h>
706
707//----------------------------------------------------------------------------
708// Control notification message dispatch
709// TODO: Change handler parameters to const where applicable.
710//
711
712template <> struct TDispatch<WM_NOTIFY>
713{
714 static const TMsgId MessageId = WM_NOTIFY;
716
717 //
718 // General encoder - used when the notification code is not known at compile-time.
719 //
720 template <class F>
723
724#if OWL_EV_SIGNATURE_CHECK
725
726 template <class T> struct THandler {typedef THandlerResult (T::*type)(NMHDR&);};
727
728#endif
729
730 //
731 // General decoder - used when the notification code is not known at compile-time.
732 //
733 template <class T, THandlerResult (T::*M)(NMHDR&)>
735 {
736 struct TForwarder
737 {
738 T* i_;
740 {
742 return pnmhdr ? (i_->*M)(*pnmhdr) : 0;
743 };
744 }
745 forwarder = {static_cast<T*>(i)};
746 return HANDLE_WM_NOTIFY(0, p1, p2, forwarder);
747 }
748
749 //
750 // Base class for specialized notification dispatch
751 // Defines NotificationCode and THandlerResult.
752 //
753 template <uint NotificationCode, class THandlerResult, class TParam>
754 struct TNotificationDispatchBase;
755
756 //
757 // Specialization for non-void return and reference parameter
758 //
759 template <uint NotificationCode_, class THandlerResult_, class TNmParam>
760 struct TNotificationDispatchBase<NotificationCode_, THandlerResult_, TNmParam&>
761 {
762 enum {NotificationCode = NotificationCode_};
763 typedef THandlerResult_ THandlerResult; // Hides TDispatch<WM_NOTIFY>::THandlerResult.
764
765 template <class F>
767 {return static_cast<THandlerResult>(sendMessage(wnd, MessageId, static_cast<TParam1>(n.idFrom), reinterpret_cast<TParam2>(&n)));}
768
769
770#if OWL_EV_SIGNATURE_CHECK
771
772 template <class T> struct THandler {typedef THandlerResult (T::*type)(TNmParam&);};
773
774#endif
775
776 template <class T, THandlerResult (T::*M)(TNmParam&)>
778 {
780 return p2 != 0 ? (TResult)( ((static_cast<T*>(i)->*M)(*reinterpret_cast<TNmParam*>(p2)))) : 0;
781 }
782 };
783
784 //
785 // Specialization for void return and reference parameter
786 //
787 template <uint NotificationCode_, class TNmParam>
788 struct TNotificationDispatchBase<NotificationCode_, void, TNmParam&>
789 {
790 enum {NotificationCode = NotificationCode_};
791 typedef void THandlerResult; // Hides TDispatch<WM_NOTIFY>::THandlerResult.
792
793 template <class F>
795 {sendMessage(wnd, MessageId, static_cast<TParam1>(n.idFrom), reinterpret_cast<TParam2>(&n));}
796
797
798#if OWL_EV_SIGNATURE_CHECK
799
800 template <class T> struct THandler {typedef THandlerResult (T::*type)(TNmParam&);};
801
802#endif
803
804 template <class T, THandlerResult (T::*M)(TNmParam&)>
806 {
808 return p2 != 0 ? ((static_cast<T*>(i)->*M)(*reinterpret_cast<TNmParam*>(p2)), 0) : 0;
809 }
810 };
811
812 //
813 // The next two specializations allow a message to be handled without passing any arguments.
814 // Note: Since notification info is required to send a notification message, no encoder can be provided.
815 // TODO: Ideally, all notification handlers should use at least a notification info parameter.
816 //
817 template <uint NotificationCode_, class THandlerResult_>
818 struct TNotificationDispatchBase<NotificationCode_, THandlerResult_, void>
819 {
820 enum {NotificationCode = NotificationCode_};
821 typedef THandlerResult_ THandlerResult; // Hides TDispatch<WM_NOTIFY>::THandlerResult.
822
823#if OWL_EV_SIGNATURE_CHECK
824
825 template <class T> struct THandler {typedef THandlerResult (T::*type)();};
826
827#endif
828
829 template <class T, THandlerResult (T::*M)()>
831 {return static_cast<TResult>((static_cast<T*>(i)->*M)());}
832 };
833
834 template <uint NotificationCode_>
835 struct TNotificationDispatchBase<NotificationCode_, void, void>
836 {
837 enum {NotificationCode = NotificationCode_};
838 typedef void THandlerResult; // Hides TDispatch<WM_NOTIFY>::THandlerResult.
839
840#if OWL_EV_SIGNATURE_CHECK
841
842 template <class T> struct THandler {typedef THandlerResult (T::*type)();};
843
844#endif
845
846 template <class T, THandlerResult (T::*M)()>
848 {return (static_cast<T*>(i)->*M)(), 0;}
849 };
850
851 //
852 // Dispatch template for Common Controls notifications passed by WM_NOTIFY
853 // Note that notification codes are unique among all Common Controls, so they all share this dispatch template.
854 // This default implementation is looked up if a notification does not provide a full specialization.
855 // Passes the general NMHDR& and returns TResult.
856 //
857 template <uint NotificationCode>
858 struct TNotificationDispatch : TNotificationDispatchBase<NotificationCode, TResult, NMHDR&>
859 {};
860
861};
862
863template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<NM_CHAR> : TNotificationDispatchBase<NM_CHAR, void, TNmChar&> {};
864template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<NM_CLICK> : TNotificationDispatchBase<NM_CLICK, void, void> {};
865template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<NM_CUSTOMDRAW> : TNotificationDispatchBase<NM_CUSTOMDRAW, int, TNmCustomDraw&> {};
866template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<NM_DBLCLK> : TNotificationDispatchBase<NM_DBLCLK, void, void> {};
867template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<NM_HOVER> : TNotificationDispatchBase<NM_HOVER, bool, TNotify&> {};
868template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<NM_KEYDOWN> : TNotificationDispatchBase<NM_KEYDOWN, bool, TNmKey&> {};
869template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<NM_KILLFOCUS> : TNotificationDispatchBase<NM_KILLFOCUS, void, void> {};
870template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<NM_NCHITTEST> : TNotificationDispatchBase<NM_NCHITTEST, int, TNmMouse&> {};
871template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<NM_OUTOFMEMORY> : TNotificationDispatchBase<NM_OUTOFMEMORY, void, void> {};
872template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<NM_RCLICK> : TNotificationDispatchBase<NM_RCLICK, void, void> {};
873template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<NM_RDBLCLK> : TNotificationDispatchBase<NM_RDBLCLK, void, void> {};
874template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<NM_RELEASEDCAPTURE> : TNotificationDispatchBase<NM_RELEASEDCAPTURE, void, void> {};
875template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<NM_RETURN> : TNotificationDispatchBase<NM_RETURN, void, void> {};
876template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<NM_SETCURSOR> : TNotificationDispatchBase<NM_SETCURSOR, int, TNmMouse&> {};
877template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<NM_SETFOCUS> : TNotificationDispatchBase<NM_SETFOCUS, void, void> {};
878
879template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<ACN_START> : TNotificationDispatchBase<ACN_START, void, void> {};
880template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<ACN_STOP> : TNotificationDispatchBase<ACN_STOP, void, void> {};
881
882template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<HDN_BEGINDRAG> : TNotificationDispatchBase<HDN_BEGINDRAG, bool, THdrNotify&> {};
883template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<HDN_BEGINTRACK> : TNotificationDispatchBase<HDN_BEGINTRACK, bool, THdrNotify&> {};
884template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<HDN_DIVIDERDBLCLICK> : TNotificationDispatchBase<HDN_DIVIDERDBLCLICK, void, THdrNotify&> {};
885template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<HDN_ENDDRAG> : TNotificationDispatchBase<HDN_ENDDRAG, bool, THdrNotify&> {};
886template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<HDN_ENDTRACK> : TNotificationDispatchBase<HDN_ENDTRACK, void, THdrNotify&> {};
887template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<HDN_FILTERBTNCLICK> : TNotificationDispatchBase<HDN_FILTERBTNCLICK, bool, THdrFilterBtnClick&> {};
888template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<HDN_FILTERCHANGE> : TNotificationDispatchBase<HDN_FILTERCHANGE, void, THdrNotify&> {};
889template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<HDN_GETDISPINFO> : TNotificationDispatchBase<HDN_GETDISPINFO, void, THdrNotify&> {};
890template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<HDN_ITEMCHANGED> : TNotificationDispatchBase<HDN_ITEMCHANGED, void, THdrNotify&> {};
891template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<HDN_ITEMCHANGING> : TNotificationDispatchBase<HDN_ITEMCHANGING, void, THdrNotify&> {};
892template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<HDN_ITEMCLICK> : TNotificationDispatchBase<HDN_ITEMCLICK, void, THdrNotify&> {};
893template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<HDN_ITEMDBLCLICK> : TNotificationDispatchBase<HDN_ITEMDBLCLICK, void, THdrNotify&> {};
894template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<HDN_TRACK> : TNotificationDispatchBase<HDN_TRACK, bool, THdrNotify&> {};
895
896template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<DTN_CLOSEUP> : TNotificationDispatchBase<DTN_CLOSEUP, void, void> {};
897template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<DTN_DATETIMECHANGE> : TNotificationDispatchBase<DTN_DATETIMECHANGE, int, TDateTimeChange&> {};
898template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<DTN_DROPDOWN> : TNotificationDispatchBase<DTN_DROPDOWN, void, void> {};
899template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<DTN_FORMAT> : TNotificationDispatchBase<DTN_FORMAT, int, TDateTimeFormat&> {};
900template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<DTN_FORMATQUERY> : TNotificationDispatchBase<DTN_FORMATQUERY, int, TDateTimeFormat&> {};
901template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<DTN_USERSTRING> : TNotificationDispatchBase<DTN_USERSTRING, int, TDateTimeString&> {};
902template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<DTN_WMKEYDOWN> : TNotificationDispatchBase<DTN_WMKEYDOWN, int, TDateTimeKeyDown&> {};
903
904template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TCN_GETOBJECT> : TNotificationDispatchBase<TCN_GETOBJECT, void, TNmObjectNotify&> {};
905template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TCN_KEYDOWN> : TNotificationDispatchBase<TCN_KEYDOWN, void, TTabKeyDown&> {};
906template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TCN_SELCHANGE> : TNotificationDispatchBase<TCN_SELCHANGE, void, TNotify&> {};
907template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TCN_SELCHANGING> : TNotificationDispatchBase<TCN_SELCHANGING, bool, TNotify&> {};
908
909template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<EN_DROPFILES> : TNotificationDispatchBase<EN_DROPFILES, bool, TEnDropFiles&> {};
910template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<EN_MSGFILTER> : TNotificationDispatchBase<EN_MSGFILTER, bool, TMsgFilter&> {};
911template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<EN_PROTECTED> : TNotificationDispatchBase<EN_PROTECTED, bool, TEnProtected&> {};
912template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<EN_REQUESTRESIZE> : TNotificationDispatchBase<EN_REQUESTRESIZE, void, TReqResize&> {};
913template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<EN_SELCHANGE> : TNotificationDispatchBase<EN_SELCHANGE, bool, TSelChange&> {};
914
915template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<UDN_DELTAPOS> : TNotificationDispatchBase<UDN_DELTAPOS, bool, TNmUpDown&> {};
916
917template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TTN_GETDISPINFO> : TNotificationDispatchBase<TTN_GETDISPINFO, void, TTooltipDispInfo&> {};
918template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TTN_POP> : TNotificationDispatchBase<TTN_POP, void, TNotify&> {};
919template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TTN_SHOW> : TNotificationDispatchBase<TTN_SHOW, void, TNotify&> {};
920
921template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TVN_BEGINDRAG> : TNotificationDispatchBase<TVN_BEGINDRAG, void, TTvNotify&> {};
922template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TVN_BEGINLABELEDIT> : TNotificationDispatchBase<TVN_BEGINLABELEDIT, bool, TTvDispInfoNotify&> {};
923template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TVN_BEGINRDRAG> : TNotificationDispatchBase<TVN_BEGINRDRAG, void, TTvNotify&> {};
924template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TVN_DELETEITEM> : TNotificationDispatchBase<TVN_DELETEITEM, void, TTvNotify&> {};
925template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TVN_ENDLABELEDIT> : TNotificationDispatchBase<TVN_ENDLABELEDIT, void, TTvDispInfoNotify&> {};
926template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TVN_GETDISPINFO> : TNotificationDispatchBase<TVN_GETDISPINFO, void, TTvDispInfoNotify&> {};
927template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TVN_GETINFOTIP> : TNotificationDispatchBase<TVN_GETINFOTIP, void, TTvGetInfoTip&> {};
928template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TVN_ITEMEXPANDED> : TNotificationDispatchBase<TVN_ITEMEXPANDED, void, TTvNotify&> {};
929template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TVN_ITEMEXPANDING> : TNotificationDispatchBase<TVN_ITEMEXPANDING, bool, TTvNotify&> {};
930template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TVN_KEYDOWN> : TNotificationDispatchBase<TVN_KEYDOWN, void, TTvKeyDownNotify&> {};
931template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TVN_SELCHANGED> : TNotificationDispatchBase<TVN_SELCHANGED, void, TTvNotify&> {};
932template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TVN_SELCHANGING> : TNotificationDispatchBase<TVN_SELCHANGING, bool, TTvNotify&> {};
933template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TVN_SETDISPINFO> : TNotificationDispatchBase<TVN_SETDISPINFO, void, TTvDispInfoNotify&> {};
934template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<TVN_SINGLEEXPAND> : TNotificationDispatchBase<TVN_SINGLEEXPAND, void, TTvNotify&> {};
935template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<NM_TVSTATEIMAGECHANGING> : TNotificationDispatchBase<NM_TVSTATEIMAGECHANGING, void, NMTVSTATEIMAGECHANGING&> {};
936
937template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_BEGINDRAG> : TNotificationDispatchBase<LVN_BEGINDRAG, void, TLvNotify&> {};
938template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_BEGINLABELEDIT> : TNotificationDispatchBase<LVN_BEGINLABELEDIT, bool, TLvDispInfoNotify&> {};
939template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_BEGINRDRAG> : TNotificationDispatchBase<LVN_BEGINRDRAG, void, TLvNotify&> {};
940template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_COLUMNCLICK> : TNotificationDispatchBase<LVN_COLUMNCLICK, void, TLvNotify&> {};
941template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_DELETEALLITEMS> : TNotificationDispatchBase<LVN_DELETEALLITEMS, void, TLvNotify&> {};
942template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_DELETEITEM> : TNotificationDispatchBase<LVN_DELETEITEM, void, TLvNotify&> {};
943template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_ENDLABELEDIT> : TNotificationDispatchBase<LVN_ENDLABELEDIT, bool, TLvDispInfoNotify&> {};
944template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_GETDISPINFO> : TNotificationDispatchBase<LVN_GETDISPINFO, void, TLvDispInfoNotify&> {};
945template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_GETINFOTIP> : TNotificationDispatchBase<LVN_GETINFOTIP, void, TLvGetInfoTip&> {};
946template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_HOTTRACK> : TNotificationDispatchBase<LVN_HOTTRACK, bool, TLvNotify&> {};
947template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_INSERTITEM> : TNotificationDispatchBase<LVN_INSERTITEM, void, TLvNotify&> {};
948template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_ITEMACTIVATE> : TNotificationDispatchBase<LVN_ITEMACTIVATE, void, TLvItemActivate&> {};
949template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_ITEMCHANGED> : TNotificationDispatchBase<LVN_ITEMCHANGED, void, TLvNotify&> {};
950template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_ITEMCHANGING> : TNotificationDispatchBase<LVN_ITEMCHANGING, bool, TLvNotify&> {};
951template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_KEYDOWN> : TNotificationDispatchBase<LVN_KEYDOWN, void, TLvKeyDownNotify&> {};
952template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_MARQUEEBEGIN> : TNotificationDispatchBase<LVN_MARQUEEBEGIN, bool, TLvNotify&> {};
953template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_ODCACHEHINT> : TNotificationDispatchBase<LVN_ODCACHEHINT, bool, TLvCacheHint&> {};
954template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_ODFINDITEM> : TNotificationDispatchBase<LVN_ODFINDITEM, int, TLvFindItem&> {};
955template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_ODSTATECHANGED> : TNotificationDispatchBase<LVN_ODSTATECHANGED, bool, TLvOdStateChanged&> {};
956template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<LVN_SETDISPINFO> : TNotificationDispatchBase<LVN_SETDISPINFO, void, TLvDispInfoNotify&> {};
957
958template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<RBN_AUTOSIZE> : TNotificationDispatchBase<RBN_AUTOSIZE, void, TNotify&> {};
959template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<RBN_BEGINDRAG> : TNotificationDispatchBase<RBN_BEGINDRAG, bool, TNotify&> {};
960template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<RBN_CHILDSIZE> : TNotificationDispatchBase<RBN_CHILDSIZE, void, TNotify&> {};
961template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<RBN_DELETEDBAND> : TNotificationDispatchBase<RBN_DELETEDBAND, void, TNotify&> {};
962template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<RBN_DELETINGBAND> : TNotificationDispatchBase<RBN_DELETINGBAND, void, TNotify&> {};
963template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<RBN_ENDDRAG> : TNotificationDispatchBase<RBN_ENDDRAG, void, TNotify&> {};
964template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<RBN_GETOBJECT> : TNotificationDispatchBase<RBN_GETOBJECT, bool, TNotify&> {};
965template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<RBN_HEIGHTCHANGE> : TNotificationDispatchBase<RBN_HEIGHTCHANGE, void, TNotify&> {};
966template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<RBN_LAYOUTCHANGED> : TNotificationDispatchBase<RBN_LAYOUTCHANGED, void, TNotify&> {};
967
968template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<CBEN_BEGINEDIT> : TNotificationDispatchBase<CBEN_BEGINEDIT, void, TNotify&> {};
969template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<CBEN_DELETEITEM> : TNotificationDispatchBase<CBEN_DELETEITEM, bool, TCBExItemInfo&> {};
970template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<CBEN_DRAGBEGIN> : TNotificationDispatchBase<CBEN_DRAGBEGIN, void, TCBExDragInfo&> {};
971template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<CBEN_ENDEDIT> : TNotificationDispatchBase<CBEN_ENDEDIT, bool, TCBExEditInfo&> {};
972template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<CBEN_GETDISPINFO> : TNotificationDispatchBase<CBEN_GETDISPINFO, bool, TCBExItemInfo&> {};
973template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<CBEN_INSERTITEM> : TNotificationDispatchBase<CBEN_INSERTITEM, bool, TCBExItemInfo&> {};
974
975template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<MCN_GETDAYSTATE> : TNotificationDispatchBase<MCN_GETDAYSTATE, void, TNmDayState&> {};
976template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<MCN_SELCHANGE> : TNotificationDispatchBase<MCN_SELCHANGE, void, TNmSelChange&> {};
977template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<MCN_SELECT> : TNotificationDispatchBase<MCN_SELECT, void, TNmSelChange&> {};
978
979template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<PGN_CALCSIZE> : TNotificationDispatchBase<PGN_CALCSIZE, void, TNmPGCalcSize&> {};
980template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<PGN_SCROLL> : TNotificationDispatchBase<PGN_SCROLL, void, TNmPGScroll&> {};
981
982template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<IPN_FIELDCHANGED> : TNotificationDispatchBase<IPN_FIELDCHANGED, void, TNmIPAddress&> {};
983
984template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<PSN_APPLY> : TNotificationDispatchBase<PSN_APPLY, int, TPshNotify&> {};
985template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<PSN_GETOBJECT> : TNotificationDispatchBase<PSN_GETOBJECT, void, TNmObjectNotify&> {};
986template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<PSN_HELP> : TNotificationDispatchBase<PSN_HELP, void, TPshNotify&> {};
987template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<PSN_KILLACTIVE> : TNotificationDispatchBase<PSN_KILLACTIVE, bool, TPshNotify&> {};
988template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<PSN_QUERYCANCEL> : TNotificationDispatchBase<PSN_QUERYCANCEL, bool, TPshNotify&> {};
989// TODO: template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<PSN_QUERYINITIALFOCUS> {...};
990template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<PSN_RESET> : TNotificationDispatchBase<PSN_RESET, void, TPshNotify&> {};
991template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<PSN_SETACTIVE> : TNotificationDispatchBase<PSN_SETACTIVE, int, TPshNotify&> {};
992// TODO: template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<PSN_TRANSLATEACCELERATOR> {...};
993template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<PSN_WIZBACK> : TNotificationDispatchBase<PSN_WIZBACK, int, TPshNotify&> {};
994template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<PSN_WIZFINISH> : TNotificationDispatchBase<PSN_WIZFINISH, bool, TPshNotify&> {};
995template <> struct TDispatch<WM_NOTIFY>::TNotificationDispatch<PSN_WIZNEXT> : TNotificationDispatchBase<PSN_WIZNEXT, int, TPshNotify&> {};
996
997//----------------------------------------------------------------------------
998
999#if defined(OWL5_COMPAT)
1000
1001DECLARE_SIGNATURE1(void,v_NMHDR_Sig,NMHDR &)
1002DECLARE_SIGNATURE1(bool,b_NMHDR_Sig,NMHDR &)
1027DECLARE_SIGNATURE1(int,i_TV_CUSTOMDRAW_Sig,TTvCustomDraw &) // Version 4.70/4.71
1028DECLARE_SIGNATURE1(void,v_TV_GETINFOTIP_Sig,TTvGetInfoTip &) // Version 4.70/4.71
1040DECLARE_SIGNATURE1(int,i_NMLVCUSTOMDRAW_Sig,TLvCustomDraw &) // Version 4.70/4.71
1060
1061#endif
1062
1063//----------------------------------------------------------------------------
1064/// \name Common control notification macros
1065/// @{
1066
1067#if OWL_EV_SIGNATURE_CHECK
1068
1069//
1070/// \brief Response table entry macro for WM_NOTIFY messages
1071/// Looks up the correct dispatcher for the given notificationCode.
1072//
1073#define OWL_EV_NOTIFICATION(notificationCode, sourceId, method)\
1074 {{static_cast<::owl::uint>(notificationCode)}, static_cast<::owl::uint>(sourceId),\
1075 (::owl::CheckSignature<TMyClass, WM_NOTIFY, static_cast<::owl::uint>(notificationCode), ::owl::TDispatch>(&TMyClass::method),\
1076 OWL_DISPATCH(::owl::TDispatch<WM_NOTIFY>::TNotificationDispatch<static_cast<::owl::uint>(notificationCode)>::Decode, method))}
1077
1078#else
1079
1080//
1081/// \brief Response table entry macro for WM_NOTIFY messages
1082/// Looks up the correct dispatcher for the given notificationCode.
1083//
1084#define OWL_EV_NOTIFICATION(notificationCode, sourceId, method)\
1085 {{static_cast<::owl::uint>(notificationCode)}, static_cast<::owl::uint>(sourceId),\
1086 OWL_DISPATCH(::owl::TDispatch<WM_NOTIFY>::TNotificationDispatch<static_cast<::owl::uint>(notificationCode)>::Decode, method)}
1087
1088#endif
1089
1090//
1091/// \brief Response table entry macro for WM_NOTIFY messages handled at the child
1092/// Looks up the correct dispatcher for the given notificationCode.
1093//
1094#define OWL_EV_NOTIFICATION_AT_CHILD(notificationCode, method)\
1095 OWL_EV_NOTIFICATION(notificationCode, UINT_MAX, method)
1096
1097//
1098/// void method(TNmChar&)
1099//
1100#define EV_NM_CHAR(id, method) OWL_EV_NOTIFICATION(NM_CHAR, id, method)
1101
1102//
1103/// void method()
1104//
1105#define EV_NM_CLICK(id, method) OWL_EV_NOTIFICATION(NM_CLICK, id, method)
1106
1107//
1108/// int method(TNmCustomDraw&)
1109//
1110#define EV_NM_CUSTOMDRAW(id, method) OWL_EV_NOTIFICATION(NM_CUSTOMDRAW, id, method)
1111
1112//
1113/// void method()
1114//
1115#define EV_NM_DBLCLK(id, method) OWL_EV_NOTIFICATION(NM_DBLCLK, id, method)
1116
1117//
1118/// bool method(TNotify&)
1119//
1120#define EV_NM_HOVER(id, method) OWL_EV_NOTIFICATION(NM_HOVER, id, method)
1121
1122//
1123/// bool method(TNmKey&)
1124//
1125#define EV_NM_KEYDOWN(id, method) OWL_EV_NOTIFICATION(NM_KEYDOWN, id, method)
1126
1127//
1128/// void method()
1129//
1130#define EV_NM_KILLFOCUS(id, method) OWL_EV_NOTIFICATION(NM_KILLFOCUS, id, method)
1131
1132//
1133/// int method(TNmMouse&)
1134//
1135#define EV_NM_NCHITTEST(id, method) OWL_EV_NOTIFICATION(NM_NCHITTEST, id, method)
1136
1137//
1138/// void method()
1139//
1140#define EV_NM_OUTOFMEMORY(id, method) OWL_EV_NOTIFICATION(NM_OUTOFMEMORY, id, method)
1141
1142//
1143/// void method()
1144//
1145#define EV_NM_RCLICK(id, method) OWL_EV_NOTIFICATION(NM_RCLICK, id, method)
1146
1147//
1148/// void method()
1149//
1150#define EV_NM_RDBLCLK(id, method) OWL_EV_NOTIFICATION(NM_RDBLCLK, id, method)
1151
1152//
1153/// void method()
1154//
1155#define EV_NM_RELEASEDCAPTURE(id, method) OWL_EV_NOTIFICATION(NM_RELEASEDCAPTURE, id, method)
1156
1157//
1158/// void method()
1159//
1160#define EV_NM_RETURN(id, method) OWL_EV_NOTIFICATION(NM_RETURN, id, method)
1161
1162//
1163/// int method(TNmMouse&)
1164//
1165#define EV_NM_SETCURSOR(id, method) OWL_EV_NOTIFICATION(NM_SETCURSOR, id, method)
1166
1167//
1168/// void method()
1169//
1170#define EV_NM_SETFOCUS(id, method) OWL_EV_NOTIFICATION(NM_SETFOCUS, id, method)
1171
1172/// @}
1173
1174//----------------------------------------------------------------------------
1175/// \name Animation control notifications
1176/// @{
1177
1178//
1179/// void method()
1180//
1181#define EV_ACN_START(id, method) OWL_EV_NOTIFICATION(ACN_START, id, method)
1182
1183//
1184/// void method()
1185//
1186#define EV_ACN_STOP(id, method) OWL_EV_NOTIFICATION(ACN_STOP, id, method)
1187
1188/// @}
1189
1190//----------------------------------------------------------------------------
1191/// \name Header control notifications
1192/// @{
1193
1194//
1195/// bool method(THdrNotify&)
1196//
1197#define EV_HDN_BEGINDRAG(id, method) OWL_EV_NOTIFICATION(HDN_BEGINDRAG, id, method)
1198
1199//
1200/// bool method(THdrNotify&)
1201//
1202#define EV_HDN_BEGINTRACK(id, method) OWL_EV_NOTIFICATION(HDN_BEGINTRACK, id, method)
1203
1204//
1205/// void method(THdrNotify&)
1206//
1207#define EV_HDN_DIVIDERDBLCLICK(id, method) OWL_EV_NOTIFICATION(HDN_DIVIDERDBLCLICK, id, method)
1208
1209//
1210/// bool method(THdrNotify&)
1211//
1212#define EV_HDN_ENDDRAG(id, method) OWL_EV_NOTIFICATION(HDN_ENDDRAG, id, method)
1213
1214//
1215/// void method(THdrNotify&)
1216//
1217#define EV_HDN_ENDTRACK(id, method) OWL_EV_NOTIFICATION(HDN_ENDTRACK, id, method)
1218
1219
1220//
1221/// bool method(THdrFilterBtnClick&)
1222//
1223#define EV_HDN_FILTERBTNCLICK(id, method) OWL_EV_NOTIFICATION(HDN_FILTERBTNCLICK, id, method)
1224
1225//
1226/// void method(THdrNotify&)
1227//
1228#define EV_HDN_FILTERCHANGE(id, method) OWL_EV_NOTIFICATION(HDN_FILTERCHANGE, id, method)
1229
1230
1231
1232//
1233/// void method(THdrNotify&)
1234//
1235#define EV_HDN_GETDISPINFO(id, method) OWL_EV_NOTIFICATION(HDN_GETDISPINFO, id, method)
1236
1237//
1238/// void method(THdrNotify&)
1239//
1240#define EV_HDN_ITEMCHANGED(id, method) OWL_EV_NOTIFICATION(HDN_ITEMCHANGED, id, method)
1241
1242//
1243/// void method(THdrNotify&)
1244//
1245#define EV_HDN_ITEMCHANGING(id, method) OWL_EV_NOTIFICATION(HDN_ITEMCHANGING, id, method)
1246
1247//
1248/// void method(THdrNotify&)
1249//
1250#define EV_HDN_ITEMCLICK(id, method) OWL_EV_NOTIFICATION(HDN_ITEMCLICK, id, method)
1251
1252//
1253/// void method(THdrNotify&)
1254//
1255#define EV_HDN_ITEMDBLCLICK(id, method) OWL_EV_NOTIFICATION(HDN_ITEMDBLCLICK, id, method)
1256
1257//
1258/// bool method(THdrNotify&)
1259//
1260#define EV_HDN_TRACK(id, method) OWL_EV_NOTIFICATION(HDN_TRACK, id, method)
1261
1262/// @}
1263
1264//----------------------------------------------------------------------------
1265/// \name TDateTimepicker control notifications
1266/// @{
1267
1268//
1269/// void method()
1270//
1271#define EV_DTN_CLOSEUP(id, method) OWL_EV_NOTIFICATION(DTN_CLOSEUP, id, method)
1272
1273//
1274/// int method(TDateTimeChange&)
1275/// The owner of the control must return zero.
1276//
1277#define EV_DTN_DATETIMECHANGE(id, method) OWL_EV_NOTIFICATION(DTN_DATETIMECHANGE, id, method)
1278
1279//
1280/// void method()
1281//
1282#define EV_DTN_DROPDOWN(id, method) OWL_EV_NOTIFICATION(DTN_DROPDOWN, id, method)
1283
1284//
1285/// int method(TDateTimeFormat&)
1286/// The owner of the control must return zero.
1287//
1288#define EV_DTN_FORMAT(id, method) OWL_EV_NOTIFICATION(DTN_FORMAT, id, method)
1289
1290//
1291/// int method(TDateTimeFormat&)
1292/// The owner of the control must return zero.
1293//
1294#define EV_DTN_FORMATQUERY(id, method) OWL_EV_NOTIFICATION(DTN_FORMATQUERY, id, method)
1295
1296//
1297/// int method(TDateTimeString&)
1298/// The owner of the control must return zero.
1299//
1300#define EV_DTN_USERSTRING(id, method) OWL_EV_NOTIFICATION(DTN_USERSTRING, id, method)
1301
1302//
1303/// int method(TDateTimeKeyDown&)
1304/// The owner of the control must return zero.
1305//
1306#define EV_DTN_WMKEYDOWN(id, method) OWL_EV_NOTIFICATION(DTN_WMKEYDOWN, id, method)
1307
1308/// @}
1309
1310//----------------------------------------------------------------------------
1311/// \name Tab control notifications
1312/// @{
1313
1314//
1315/// void method(TNmObjectNotify&)
1316//
1317#define EV_TCN_GETOBJECT(id, method) OWL_EV_NOTIFICATION(TCN_GETOBJECT, id, method)
1318
1319//
1320/// void method(TTabKeyDown&)
1321//
1322#define EV_TCN_KEYDOWN(id, method) OWL_EV_NOTIFICATION(TCN_KEYDOWN, id, method)
1323
1324//
1325/// void method(TNotify&)
1326//
1327#define EV_TCN_SELCHANGE(id, method) OWL_EV_NOTIFICATION(TCN_SELCHANGE, id, method)
1328
1329//
1330/// bool method(TNotify&)
1331//
1332#define EV_TCN_SELCHANGING(id, method) OWL_EV_NOTIFICATION(TCN_SELCHANGING, id, method)
1333
1334/// @}
1335
1336//----------------------------------------------------------------------------
1337/// \name Rich Edit control notifications
1338/// @{
1339
1340//
1341/// bool method(TEnDropFiles&)
1342//
1343#define EV_EN_DROPFILES(id, method) OWL_EV_NOTIFICATION(EN_DROPFILES, id, method)
1344
1345//
1346/// bool method(TMsgFilter&)
1347//
1348#define EV_EN_MSGFILTER(id, method) OWL_EV_NOTIFICATION(EN_MSGFILTER, id, method)
1349
1350//
1351/// bool method(TEnProtected&)
1352//
1353#define EV_EN_PROTECTED(id, method) OWL_EV_NOTIFICATION(EN_PROTECTED, id, method)
1354
1355//
1356/// void method(TReqResize&)
1357//
1358#define EV_EN_REQRESIZE(id, method) OWL_EV_NOTIFICATION(EN_REQUESTRESIZE, id, method)
1359
1360//
1361/// bool method(TSelChange&)
1362//
1363#define EV_EN_SELCHANGE(id, method) OWL_EV_NOTIFICATION(EN_SELCHANGE, id, method)
1364
1365/// @}
1366
1367//----------------------------------------------------------------------------
1368/// \name UpDown control notifications
1369/// @{
1370
1371//
1372/// bool method(TNmUpDown&)
1373//
1374#define EV_UDN_DELTAPOS(id, method) OWL_EV_NOTIFICATION(UDN_DELTAPOS, id, method)
1375
1376/// @}
1377
1378//----------------------------------------------------------------------------
1379/// \name Tool Tip control notifications
1380/// @{
1381
1382//
1383/// void method(TTooltipDispInfo&)
1384//
1385#define EV_TTN_GETDISPINFO(id, method) OWL_EV_NOTIFICATION(TTN_GETDISPINFO, id, method)
1386
1387//
1388/// void method(TTooltipDispInfo&)
1389/// Note: This notification code is identical to TTN_GETDISPINFO.
1390//
1391#define EV_TTN_NEEDTEXT(id, method) EV_TTN_GETDISPINFO(id, method)
1392
1393//
1394/// void method(TNotify&)
1395//
1396#define EV_TTN_POP(id, method) OWL_EV_NOTIFICATION(TTN_POP, id, method)
1397
1398//
1399/// void method(TNotify&)
1400//
1401#define EV_TTN_SHOW(id, method) OWL_EV_NOTIFICATION(TTN_SHOW, id, method)
1402
1403/// @}
1404
1405//----------------------------------------------------------------------------
1406/// \name Tree View control notifications
1407/// @{
1408
1409//
1410/// void method(TTvNotify&)
1411//
1412#define EV_TVN_BEGINDRAG(id, method) OWL_EV_NOTIFICATION(TVN_BEGINDRAG, id, method)
1413
1414//
1415/// bool method(TTvDispInfoNotify&)
1416//
1417#define EV_TVN_BEGINLABELEDIT(id, method) OWL_EV_NOTIFICATION(TVN_BEGINLABELEDIT, id, method)
1418
1419//
1420/// void method(TTvNotify&)
1421//
1422#define EV_TVN_BEGINRDRAG(id, method) OWL_EV_NOTIFICATION(TVN_BEGINRDRAG, id, method)
1423
1424//
1425/// void method(TTvNotify&)
1426//
1427#define EV_TVN_DELETEITEM(id, method) OWL_EV_NOTIFICATION(TVN_DELETEITEM, id, method)
1428
1429//
1430/// void method(TTvDispInfoNotify&)
1431//
1432#define EV_TVN_ENDLABELEDIT(id, method) OWL_EV_NOTIFICATION(TVN_ENDLABELEDIT, id, method)
1433
1434//
1435/// void method(TTvDispInfoNotify&)
1436//
1437#define EV_TVN_GETDISPINFO(id, method) OWL_EV_NOTIFICATION(TVN_GETDISPINFO, id, method)
1438
1439//
1440/// void method(TTvGetInfoTip&)
1441//
1442#define EV_TVN_GETINFOTIP(id, method) OWL_EV_NOTIFICATION(TVN_GETINFOTIP, id, method)
1443
1444//
1445/// void method(TTvNotify&)
1446//
1447#define EV_TVN_ITEMEXPANDED(id, method) OWL_EV_NOTIFICATION(TVN_ITEMEXPANDED, id, method)
1448
1449//
1450/// bool method(TTvNotify&)
1451//
1452#define EV_TVN_ITEMEXPANDING(id, method) OWL_EV_NOTIFICATION(TVN_ITEMEXPANDING, id, method)
1453
1454//
1455/// void method(TTvKeyDownNotify&)
1456//
1457#define EV_TVN_KEYDOWN(id, method) OWL_EV_NOTIFICATION(TVN_KEYDOWN, id, method)
1458
1459//
1460/// void method(TTvNotify&)
1461//
1462#define EV_TVN_SELCHANGED(id, method) OWL_EV_NOTIFICATION(TVN_SELCHANGED, id, method)
1463
1464//
1465/// bool method(TTvNotify&)
1466//
1467#define EV_TVN_SELCHANGING(id, method) OWL_EV_NOTIFICATION(TVN_SELCHANGING, id, method)
1468
1469//
1470/// void method(TTvDispInfoNotify&)
1471//
1472#define EV_TVN_SETDISPINFO(id, method) OWL_EV_NOTIFICATION(TVN_SETDISPINFO, id, method)
1473
1474//
1475/// void method(TTvNotify&)
1476//
1477#define EV_TVN_SINGLEEXPAND(id, method) OWL_EV_NOTIFICATION(TVN_SINGLEEXPAND, id, method)
1478
1479//
1480/// void method(NMTVSTATEIMAGECHANGING&)
1481//
1482#define EV_NM_TVSTATEIMAGECHANGING(id, method) OWL_EV_NOTIFICATION(NM_TVSTATEIMAGECHANGING, id, method)
1483
1484/// @}
1485
1486//----------------------------------------------------------------------------
1487/// \name List View control notifications
1488/// @{
1489
1490//
1491/// void method(TLvNotify&)
1492//
1493#define EV_LVN_BEGINDRAG(id, method) OWL_EV_NOTIFICATION(LVN_BEGINDRAG, id, method)
1494
1495//
1496/// bool method(TLvDispInfoNotify&)
1497//
1498#define EV_LVN_BEGINLABELEDIT(id, method) OWL_EV_NOTIFICATION(LVN_BEGINLABELEDIT, id, method)
1499
1500//
1501/// void method(TLvNotify&)
1502//
1503#define EV_LVN_BEGINRDRAG(id, method) OWL_EV_NOTIFICATION(LVN_BEGINRDRAG, id, method)
1504
1505//
1506/// void method(TLvNotify&)
1507//
1508#define EV_LVN_COLUMNCLICK(id, method) OWL_EV_NOTIFICATION(LVN_COLUMNCLICK, id, method)
1509
1510//
1511/// void method()
1512//
1513#define EV_LVN_DBLCLK(id, method) EV_NM_DBLCLK(id, method)
1514
1515
1516//
1517/// void method(TLvNotify&)
1518//
1519#define EV_LVN_DELETEALLITEMS(id, method) OWL_EV_NOTIFICATION(LVN_DELETEALLITEMS, id, method)
1520
1521//
1522/// void method(TLvNotify&)
1523//
1524#define EV_LVN_DELETEITEM(id, method) OWL_EV_NOTIFICATION(LVN_DELETEITEM, id, method)
1525
1526//
1527/// bool method(TLvDispInfoNotify&)
1528//
1529#define EV_LVN_ENDLABELEDIT(id, method) OWL_EV_NOTIFICATION(LVN_ENDLABELEDIT, id, method)
1530
1531//
1532/// void method(TLvDispInfoNotify&)
1533//
1534#define EV_LVN_GETDISPINFO(id, method) OWL_EV_NOTIFICATION(LVN_GETDISPINFO, id, method)
1535
1536//
1537/// void method(TLvGetInfoTip&)
1538//
1539#define EV_LVN_GETINFOTIP(id, method) OWL_EV_NOTIFICATION(LVN_GETINFOTIP, id, method)
1540
1541//
1542/// bool method(TLvNotify&)
1543//
1544#define EV_LVN_HOTTRACK(id, method) OWL_EV_NOTIFICATION(LVN_HOTTRACK, id, method)
1545
1546//
1547/// void method(TLvNotify&)
1548//
1549#define EV_LVN_INSERTITEM(id, method) OWL_EV_NOTIFICATION(LVN_INSERTITEM, id, method)
1550
1551//
1552/// void method(TLvItemActivate&)
1553//
1554#define EV_LVN_ITEMACTIVATE(id, method) OWL_EV_NOTIFICATION(LVN_ITEMACTIVATE, id, method)
1555
1556//
1557/// void method(TLvNotify&)
1558//
1559#define EV_LVN_ITEMCHANGED(id, method) OWL_EV_NOTIFICATION(LVN_ITEMCHANGED, id, method)
1560
1561//
1562/// bool method(TLvNotify&)
1563//
1564#define EV_LVN_ITEMCHANGING(id, method) OWL_EV_NOTIFICATION(LVN_ITEMCHANGING, id, method)
1565
1566//
1567/// void method(TLvKeyDownNotify&)
1568//
1569#define EV_LVN_KEYDOWN(id, method) OWL_EV_NOTIFICATION(LVN_KEYDOWN, id, method)
1570
1571//
1572/// bool method(TLvNotify&)
1573//
1574#define EV_LVN_MARQUEEBEGIN(id, method) OWL_EV_NOTIFICATION(LVN_MARQUEEBEGIN, id, method)
1575
1576//
1577/// bool method(TLvCacheHint&)
1578//
1579#define EV_LVN_ODCACHEHINT(id, method) OWL_EV_NOTIFICATION(LVN_ODCACHEHINT, id, method)
1580
1581//
1582/// int method(TLvFindItem&)
1583//
1584#define EV_LVN_ODFINDITEM(id, method) OWL_EV_NOTIFICATION(LVN_ODFINDITEM, id, method)
1585
1586//
1587/// bool method(TLvOdStateChanged&)
1588//
1589#define EV_LVN_ODSTATECHANGED(id, method) OWL_EV_NOTIFICATION(LVN_ODSTATECHANGED, id, method)
1590
1591//
1592/// void method(TLvDispInfoNotify&)
1593//
1594#define EV_LVN_SETDISPINFO(id, method) OWL_EV_NOTIFICATION(LVN_SETDISPINFO, id, method)
1595
1596/// @}
1597
1598//----------------------------------------------------------------------------
1599/// \name Rebar control notifications
1600/// @{
1601
1602//
1603/// void method(TNotify&)
1604//
1605#define EV_RBN_AUTOSIZE(id, method) OWL_EV_NOTIFICATION(RBN_AUTOSIZE, id, method)
1606
1607//
1608/// bool method(TNotify&)
1609//
1610#define EV_RBN_BEGINDRAG(id, method) OWL_EV_NOTIFICATION(RBN_BEGINDRAG, id, method)
1611
1612//
1613/// void method(TNotify&)
1614//
1615#define EV_RBN_CHILDSIZE(id, method) OWL_EV_NOTIFICATION(RBN_CHILDSIZE, id, method)
1616
1617//
1618/// void method(TNotify&)
1619//
1620#define EV_RBN_DELETEDBAND(id, method) OWL_EV_NOTIFICATION(RBN_DELETEDBAND, id, method)
1621
1622//
1623/// void method(TNotify&)
1624//
1625#define EV_RBN_DELETINGBAND(id, method) OWL_EV_NOTIFICATION(RBN_DELETINGBAND, id, method)
1626
1627//
1628/// void method(TNotify&)
1629//
1630#define EV_RBN_ENDDRAG(id, method) OWL_EV_NOTIFICATION(RBN_ENDDRAG, id, method)
1631
1632//
1633/// bool method(TNotify&)
1634/// Must return true.
1635//
1636#define EV_RBN_GETOBJECT(id, method) OWL_EV_NOTIFICATION(RBN_GETOBJECT, id, method)
1637
1638//
1639/// void method(TNotify&)
1640//
1641#define EV_RBN_HEIGHTCHANGE(id, method) OWL_EV_NOTIFICATION(RBN_HEIGHTCHANGE, id, method)
1642
1643//
1644/// void method(TNotify&)
1645//
1646#define EV_RBN_LAYOUTCHANGED(id, method) OWL_EV_NOTIFICATION(RBN_LAYOUTCHANGED, id, method)
1647
1648/// @}
1649
1650//----------------------------------------------------------------------------
1651/// \name ComboBoxEx control notifications
1652/// @{
1653
1654//
1655/// void method(TNotify&)
1656//
1657#define EV_CBEN_BEGINEDIT(id, method) OWL_EV_NOTIFICATION(CBEN_BEGINEDIT, id, method)
1658
1659//
1660/// bool method(TCBExItemInfo&)
1661//
1662#define EV_CBEN_DELETEITEM(id, method) OWL_EV_NOTIFICATION(CBEN_DELETEITEM, id, method)
1663
1664//
1665/// void method(TCBExDragInfo&)
1666//
1667#define EV_CBEN_DRAGBEGIN(id, method) OWL_EV_NOTIFICATION(CBEN_DRAGBEGIN, id, method)
1668
1669//
1670/// bool method(TCBExEditInfo&)
1671//
1672#define EV_CBEN_ENDEDIT(id, method) OWL_EV_NOTIFICATION(CBEN_ENDEDIT, id, method)
1673
1674//
1675/// bool method(TCBExItemInfo&)
1676//
1677#define EV_CBEN_GETDISPINFO(id, method) OWL_EV_NOTIFICATION(CBEN_GETDISPINFO, id, method)
1678
1679//
1680/// bool method(TCBExItemInfo&)
1681//
1682#define EV_CBEN_INSERTITEM(id, method) OWL_EV_NOTIFICATION(CBEN_INSERTITEM, id, method)
1683
1684/// @}
1685
1686//----------------------------------------------------------------------------
1687/// \name Month Calendar control notifications
1688/// @{
1689
1690//
1691/// void method(TNmDayState&)
1692//
1693#define EV_MCN_GETDAYSTATE(id, method) OWL_EV_NOTIFICATION(MCN_GETDAYSTATE, id, method)
1694
1695//
1696/// void method(TNmSelChange&)
1697//
1698#define EV_MCN_SELCHANGE(id, method) OWL_EV_NOTIFICATION(MCN_SELCHANGE, id, method)
1699
1700//
1701/// void method(TNmSelChange&)
1702//
1703#define EV_MCN_SELECT(id, method) OWL_EV_NOTIFICATION(MCN_SELECT, id, method)
1704
1705/// @}
1706
1707//----------------------------------------------------------------------------
1708/// \name Pager control notifications
1709/// @{
1710
1711//
1712/// void method(TNmPGCalcSize&)
1713//
1714#define EV_PGN_CALCSIZE(id, method) OWL_EV_NOTIFICATION(PGN_CALCSIZE, id, method)
1715
1716//
1717/// void method(TNmPGScroll&)
1718//
1719#define EV_PGN_SCROLL(id, method) OWL_EV_NOTIFICATION(PGN_SCROLL, id, method)
1720
1721/// @}
1722
1723//----------------------------------------------------------------------------
1724/// \name IP Address control notifications
1725/// @{
1726
1727//
1728/// void method(TNmIPAddress&)
1729//
1730#define EV_IPN_FIELDCHANGED(id, method) OWL_EV_NOTIFICATION(IPN_FIELDCHANGED, id, method)
1731
1732/// @}
1733
1734//----------------------------------------------------------------------------
1735// Inline implemenations
1736//
1737
1738//
1739/// Constructor to create a TNotify object (NMHDR wrapper) from the specified
1740/// window handle, control id and notification code.
1741//
1742inline
1744 hwndFrom = ctl;
1745 idFrom = id;
1746 code = ctlCode;
1747}
1748
1749//
1750/// Constructor to create a TNotify object whose members are initialized to
1751/// zero.
1752//
1753inline
1755 hwndFrom = nullptr;
1756 idFrom = 0;
1757 code = 0;
1758}
1759
1760inline
1762{
1763 iPos = pos;
1764 iDelta = delta;
1765 hdr.hwndFrom = hwnd;
1766 hdr.idFrom = id;
1767 hdr.code = code;
1768}
1769
1770//
1771/// TTabKeyDown contains information about a key press in a tab control.
1772/// This constructor initializes the structure NUL value for the
1773/// virtual wVKey and flags members.
1774//
1775inline
1777 wVKey = 0;
1778 flags = 0;
1779}
1780
1781//
1782/// TTabKeyDown contains information about a key press in a tab control.
1783/// This constructor initializes the members to the specified parameters.
1784//
1785inline
1787{
1788 hdr.hwndFrom = ctl;
1789 hdr.idFrom = id;
1790 hdr.code = code;
1791 wVKey = vk;
1792 flags = flg;
1793}
1794
1795
1796inline void
1802
1803inline HIMAGELIST
1805{
1806 return himl;
1807}
1808
1809} // OWL namespace
1810
1812
1813#endif // OWL_COMMCTRL_H
1814
#define PRECONDITION(condition)
Definition checks.h:227
Class wrapper for management of color values.
Definition color.h:245
TColor BtnHighlight()
Definition commctrl.h:611
void BtnShadow(const TColor &clr)
Definition commctrl.h:614
void BtnHighlight(const TColor &clr)
Definition commctrl.h:612
TColorScheme(const TColor &btn, const TColor &shad)
Definition commctrl.h:604
TColor BtnShadow()
Definition commctrl.h:613
Structure sent with EN_DROPFILES notification.
Definition commctrl.h:274
Structure sent with EN_PROTECTED notification.
Definition commctrl.h:300
THdrNotify encapsulates the 'HD_NOTIFY' structure which is sent with the WM_NOTIFY messages sent by t...
Definition commctrl.h:200
TColor GetBkColor() const
Definition commctrl.h:407
int GetSubItem() const
Definition commctrl.h:408
TColor GetTextColor() const
Definition commctrl.h:406
A TListViewCtrl notification to repaint an item.
Definition commctrl.h:358
A TListViewCtrl notification that a key has been pressed.
Definition commctrl.h:369
Basic TListViewCtrl notification.
Definition commctrl.h:347
MonthCalendar Control notifications.
Definition commctrl.h:650
Structure sent with EN_MSGFILTER notification.
Definition commctrl.h:287
IP Address control notifications.
Definition commctrl.h:692
Pager Control notifications.
Definition commctrl.h:678
TNmUpDown is a wrapper of the NM_UPDOWN structure sent with notifications from an 'UpDown' control.
Definition commctrl.h:107
TNmUpDown(HWND hwnd, uint id, uint code, int pos, int delta)
Definition commctrl.h:1761
TNotify is a thin wrapper around the NMHDR structure.
Definition commctrl.h:91
TNotify()
Constructor to create a TNotify object whose members are initialized to zero.
Definition commctrl.h:1754
TPoint is a support class, derived from tagPOINT.
Definition geometry.h:87
TRbHitTestInfo(const TPoint &point)
Definition commctrl.h:623
HIMAGELIST GetImageList()
Definition commctrl.h:1804
void SetImageList(HIMAGELIST Images)
Definition commctrl.h:1797
Structure sent with EN_REQUESTRESIZE notification.
Definition commctrl.h:313
Structure sent with EN_SELCHANGE notification.
Definition commctrl.h:326
Wrapper of the TC_KEYDOWN structure sent to the parent of a tabcontrol to notify that a key has been ...
Definition commctrl.h:130
TTabKeyDown()
TTabKeyDown contains information about a key press in a tab control.
Definition commctrl.h:1776
TTooltipText identifies a tool for which text is to be displayed.
Definition commctrl.h:153
void CopyText(const tstring &s)
Definition commctrl.h:162
TColor GetTextColor() const
Definition commctrl.h:517
int GetLevel() const
Definition commctrl.h:519
TColor GetBkColor() const
Definition commctrl.h:518
A TTreeViewCtrl notification to repaint an item.
Definition commctrl.h:481
A TTreeViewCtrl notification for hit-testing.
Definition commctrl.h:503
A TTreeViewCtrl notification that a key has been pressed.
Definition commctrl.h:492
Basic TTreeViewCtrl notification.
Definition commctrl.h:470
Exception object thrown by the Common Control wrappers of ObjectWindows.
Definition commctrl.h:77
TXOwl is root class of the ObjectWindows exception hierarchy.
Definition except.h:38
Definition of classes for CommonControl encapsulation.
Definition of class TControl.
Definition of class TModule.
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
TLvFindItem TLwFindItem
Definition commctrl.h:422
void InitializeCommonControls(uint controlFlags)
Wrapper for the Windows API function InitCommmonControlsEx.
Definition commctrl.cpp:19
TTvDispInfoNotify TTwDispInfoNotify
Definition commctrl.h:485
TLvOdStateChanged TLwOdStateChanged
Definition commctrl.h:434
UINT TMsgId
Message ID type.
Definition dispatch.h:53
TLvCacheHint TLwCacheHint
Definition commctrl.h:394
TLvGetInfoTip TLwGetInfoTip
Definition commctrl.h:446
TTvKeyDownNotify TTwKeyDownNotify
Definition commctrl.h:496
tstring CopyText(int size, TGetText get_text)
Copies text from a C-string (null-terminated character array) into a string object,...
Definition defs.h:317
auto GetCommCtrlVersion() -> DWORD
Returns the version number of the Common Control library (ComCtl32.dll).
Definition commctrl.cpp:26
TLvCustomDraw TLwCustomDraw
Definition commctrl.h:410
TTvNotify TTwNotify
Definition commctrl.h:474
TLvDispInfoNotify TLwDispInfoNotify
Definition commctrl.h:362
TTvCustomDraw TTwCustomDraw
Definition commctrl.h:521
LRESULT TResult
Result type.
Definition dispatch.h:52
TLvBkImage TLwBkImage
Definition commctrl.h:383
TTvHitTestInfo TTwHitTestInfo
Definition commctrl.h:506
unsigned short uint16
Definition number.h:33
std::string tstring
Definition defs.h:79
TTvGetInfoTip TTwGetInfoTip
Definition commctrl.h:531
unsigned int uint
Definition number.h:25
TLvKeyDownNotify TLwKeyDownNotify
Definition commctrl.h:373
TLvNotify TLwNotify
Definition commctrl.h:351
TLvItemActivate TLwItemActivate
Definition commctrl.h:458
#define OWL_DISABLE_WARNING_POP
Definition defs.h:156
#define _OWLCLASS
Definition defs.h:338
#define OWL_DISABLE_WARNING_PUSH
Definition defs.h:155
#define OWL_DISABLE_WARNING_OLD_STYLE_CAST
Definition defs.h:161
Definition of class TRichEdit.
Definitions of Windows light-weight utility APIs: TSHReg, TSHPath.
static THandlerResult Encode(F sendMessage, HWND wnd, TNmParam &n)
Definition commctrl.h:794
static TResult Decode(void *i, TParam1 p1, TParam2 p2)
Definition commctrl.h:734
static THandlerResult Encode(F sendMessage, HWND wnd, NMHDR &nmhdr)
Definition commctrl.h:721
Undefined default template for dispatchers Template specialization is used to allow the compiler to l...
Definition dispatch.h:258