Merge branch 'master' of git.ucc.asn.au:/matches/honours
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / include / controls.h
1 // Win32++   Version 7.3\r
2 // Released: 30th November 2011\r
3 //\r
4 //      David Nash\r
5 //      email: [email protected]\r
6 //      url: https://sourceforge.net/projects/win32-framework\r
7 //\r
8 //\r
9 // Copyright (c) 2005-2011  David Nash\r
10 //\r
11 // Permission is hereby granted, free of charge, to\r
12 // any person obtaining a copy of this software and\r
13 // associated documentation files (the "Software"),\r
14 // to deal in the Software without restriction, including\r
15 // without limitation the rights to use, copy, modify,\r
16 // merge, publish, distribute, sublicense, and/or sell\r
17 // copies of the Software, and to permit persons to whom\r
18 // the Software is furnished to do so, subject to the\r
19 // following conditions:\r
20 //\r
21 // The above copyright notice and this permission notice\r
22 // shall be included in all copies or substantial portions\r
23 // of the Software.\r
24 //\r
25 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF\r
26 // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\r
27 // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\r
28 // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\r
29 // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
30 // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
31 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
32 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE\r
33 // OR OTHER DEALINGS IN THE SOFTWARE.\r
34 //\r
35 ////////////////////////////////////////////////////////\r
36 \r
37 \r
38 ////////////////////////////////////////////////////////\r
39 // controls.h\r
40 //  Declaration of the following classes:\r
41 //  CAnimation, CComboBox, CComboBoxEx, CDateTime, CIPAddress,\r
42 //  CHeader, CHotKey, CMonthCalendar, CProgressBar, CScrollBar,\r
43 //  CSlider, CSpinButton, and CToolTip.\r
44 \r
45 \r
46 #ifndef _WIN32XX_CONTROLS_H_\r
47 #define _WIN32XX_CONTROLS_H_\r
48 \r
49 #include "wincore.h"\r
50 #include "stdcontrols.h"\r
51 \r
52 namespace Win32xx\r
53 {\r
54 \r
55         // Forward declarations\r
56         class CMonthCalendar;\r
57         class CToolTip;\r
58 \r
59         class CAnimation : public CWnd\r
60         {\r
61         public:\r
62                 CAnimation() {}\r
63                 virtual ~CAnimation() {}\r
64 \r
65                 BOOL Close() const;\r
66                 BOOL Open(LPTSTR lpszName) const;\r
67                 BOOL Play(UINT wFrom, UINT wTo, UINT cRepeat) const;\r
68                 BOOL Seek(UINT wFrame) const;\r
69                 BOOL Stop() const;\r
70 \r
71         protected:\r
72                 // Overridables\r
73                 virtual void PreRegisterClass(WNDCLASS &wc) { wc.lpszClassName = ANIMATE_CLASS; }\r
74         };\r
75 \r
76 \r
77         class CComboBox : public CWnd\r
78         {\r
79         public:\r
80                 CComboBox() {}\r
81                 virtual ~CComboBox() { ::InitCommonControls(); }\r
82 \r
83                 int   AddString(LPCTSTR lpszString) const;\r
84                 void  Clear() const;\r
85                 void  Copy() const;\r
86                 void  Cut() const;\r
87                 int   DeleteString(int nIndex) const;\r
88                 int   Dir(UINT attr, LPCTSTR lpszWildCard ) const;\r
89                 int   FindString(int nIndexStart, LPCTSTR lpszString) const;\r
90                 int   FindStringExact(int nIndexStart, LPCTSTR lpszString) const;\r
91                 int   GetCount() const;\r
92                 int   GetCurSel() const;\r
93                 CRect GetDroppedControlRect() const;\r
94                 BOOL  GetDroppedState() const;\r
95                 int   GetDroppedWidth() const;\r
96                 DWORD GetEditSel() const;\r
97                 BOOL  GetExtendedUI() const;\r
98                 int   GetHorizontalExtent() const;\r
99                 DWORD GetItemData(int nIndex) const;\r
100                 int   GetItemHeight(int nIndex) const;\r
101                 int   GetLBText(int nIndex, LPTSTR lpszText) const;\r
102                 int   GetLBTextLen(int nIndex) const;\r
103                 LCID  GetLocale() const;\r
104                 int   GetTopIndex() const;\r
105                 int   InitStorage(int nItems, int nBytes) const;\r
106                 int   InsertString(int nIndex, LPCTSTR lpszString) const;\r
107                 void  LimitText(int nMaxChars) const;\r
108                 void  Paste() const;\r
109                 void  ResetContent() const;\r
110                 int   SelectString(int nStartAfter, LPCTSTR lpszString) const;\r
111                 int   SetCurSel(int nIndex) const;\r
112                 int   SetDroppedWidth(int nWidth) const;\r
113                 BOOL  SetEditSel(int nStartChar, int nEndChar) const;\r
114                 int   SetExtendedUI(BOOL bExtended = TRUE) const;\r
115                 void  SetHorizontalExtent(UINT nExtent ) const;\r
116                 int   SetItemData(int nIndex, DWORD dwItemData) const;\r
117                 int   SetItemHeight(int nIndex, UINT cyItemHeight) const;\r
118                 LCID  SetLocale( LCID NewLocale ) const;\r
119                 int   SetTopIndex(int nIndex) const;\r
120                 void  ShowDropDown(BOOL bShow = TRUE) const;\r
121 \r
122         protected:\r
123                 // Overridables\r
124                 virtual void PreRegisterClass(WNDCLASS &wc) { wc.lpszClassName = _T("ComboBox"); }\r
125         };\r
126 \r
127 \r
128         class CComboBoxEx : public CComboBox\r
129         {\r
130         public:\r
131                 CComboBoxEx() \r
132                 {\r
133                         INITCOMMONCONTROLSEX icce;\r
134                         icce.dwSize = sizeof(INITCOMMONCONTROLSEX);\r
135                         icce.dwICC = ICC_USEREX_CLASSES;\r
136                         ::InitCommonControlsEx(&icce);          \r
137                 }\r
138                 virtual ~CComboBoxEx() {}\r
139 \r
140                 int     DeleteItem(int nIndex ) const;\r
141                 CWnd*   GetComboBoxCtrl() const;\r
142                 CEdit*  GetEditCtrl() const;\r
143                 DWORD   GetExtendedStyle() const;\r
144                 HIMAGELIST GetImageList() const;\r
145                 BOOL    GetItem(COMBOBOXEXITEM* pCBItem) const;\r
146                 BOOL    HasEditChanged () const;\r
147                 int     InsertItem(COMBOBOXEXITEM* lpcCBItem) const;\r
148                 DWORD   SetExtendedStyle(DWORD dwExMask, DWORD dwExStyles ) const;\r
149                 HIMAGELIST SetImageList(HIMAGELIST himl) const;\r
150                 BOOL    SetItem(PCOMBOBOXEXITEM lpcCBItem) const;\r
151 \r
152         protected:\r
153                 // Overridables\r
154                 virtual void PreRegisterClass(WNDCLASS &wc) { wc.lpszClassName = WC_COMBOBOXEX; }\r
155         };\r
156 \r
157 \r
158         class CDateTime : public CWnd\r
159         {\r
160         public:\r
161                 CDateTime()\r
162                 {\r
163                         INITCOMMONCONTROLSEX icce;\r
164                         icce.dwSize = sizeof(INITCOMMONCONTROLSEX);\r
165                         icce.dwICC = ICC_DATE_CLASSES;\r
166                         ::InitCommonControlsEx(&icce);\r
167                 }\r
168                 virtual ~CDateTime() {}\r
169 \r
170                 COLORREF GetMonthCalColor(int iColor) const;\r
171                 COLORREF SetMonthCalColor(int iColor, COLORREF ref);\r
172                 BOOL SetFormat(LPCTSTR pstrFormat);\r
173                 CMonthCalendar* GetMonthCalCtrl() const;\r
174                 CFont* GetMonthCalFont() const;\r
175                 void SetMonthCalFont(HFONT hFont, BOOL bRedraw = TRUE);\r
176                 DWORD GetRange(LPSYSTEMTIME lpSysTimeArray) const;\r
177                 BOOL SetRange(DWORD flags, LPSYSTEMTIME lpSysTimeArray);\r
178                 DWORD GetTime(LPSYSTEMTIME pTimeDest) const;\r
179                 BOOL SetTime(DWORD flag, LPSYSTEMTIME pTimeNew = NULL);\r
180 \r
181         protected:\r
182                 // Overridables\r
183                 virtual void PreRegisterClass(WNDCLASS &wc) { wc.lpszClassName = DATETIMEPICK_CLASS; }\r
184         };\r
185 \r
186         class CHeader : public CWnd\r
187         {\r
188         public:\r
189                 CHeader()\r
190                 {\r
191                         INITCOMMONCONTROLSEX icex;\r
192                         icex.dwSize = sizeof(INITCOMMONCONTROLSEX);\r
193                         icex.dwICC = ICC_WIN95_CLASSES;\r
194                         ::InitCommonControlsEx(&icex);\r
195                 }\r
196                 virtual ~CHeader() {}\r
197 \r
198                 // Attributes\r
199                 HIMAGELIST GetImageList() const;\r
200                 BOOL GetItem(int nPos, HDITEM* pHeaderItem) const;\r
201                 int GetItemCount() const;\r
202                 CRect GetItemRect(int nIndex) const;\r
203                 BOOL GetOrderArray(LPINT piArray, int iCount);\r
204                 int OrderToIndex(int nOrder) const;\r
205                 HIMAGELIST SetImageList(HIMAGELIST himl);\r
206                 BOOL SetItem(int nPos, HDITEM* pHeaderItem);\r
207                 BOOL SetOrderArray(int iCount, LPINT piArray);\r
208                 int GetBitmapMargin() const;\r
209                 int SetBitmapMargin(int nWidth);\r
210 \r
211                 // Operations\r
212                 HIMAGELIST CreateDragImage(int nIndex);\r
213                 BOOL DeleteItem(int nPos);\r
214                 int InsertItem(int nPos, HDITEM* phdi);\r
215                 BOOL Layout(HDLAYOUT* pHeaderLayout);\r
216 #ifdef Header_SetHotDivider\r
217                 int SetHotDivider(CPoint pt);\r
218                 int SetHotDivider(int nIndex);\r
219 #endif\r
220 #ifdef Header_ClearFilter\r
221                 int ClearAllFilters();\r
222                 int ClearFilter(int nColumn);\r
223                 int EditFilter(int nColumn, BOOL bDiscardChanges);\r
224                 int SetFilterChangeTimeout(DWORD dwTimeOut);\r
225 #endif\r
226 \r
227         protected:\r
228                 // Overridables\r
229                 virtual void PreRegisterClass(WNDCLASS &wc) { wc.lpszClassName = WC_HEADER ; }\r
230         };\r
231 \r
232         class CHotKey : public CWnd\r
233         {\r
234         public:\r
235                 CHotKey() { ::InitCommonControls(); }\r
236                 virtual ~CHotKey() {}\r
237 \r
238                 DWORD GetHotKey() const;\r
239                 CString GetKeyName(UINT vk, BOOL fExtended) const;\r
240                 void SetHotKey(DWORD dwKey);\r
241                 void SetRules(WORD wInvalidComb, WORD wModifiers);\r
242 \r
243         protected:\r
244                 // Overridables\r
245                 virtual void PreRegisterClass(WNDCLASS &wc) { wc.lpszClassName = HOTKEY_CLASS; }\r
246         };\r
247 \r
248         class CIPAddress : public CWnd\r
249         {\r
250         public:\r
251                 CIPAddress()\r
252                 {\r
253                         INITCOMMONCONTROLSEX icex;\r
254                         icex.dwSize = sizeof(INITCOMMONCONTROLSEX);\r
255                         icex.dwICC = ICC_INTERNET_CLASSES;\r
256                         ::InitCommonControlsEx(&icex);\r
257                 }\r
258                 virtual ~CIPAddress() {}\r
259 \r
260                 void ClearAddress();\r
261                 int GetAddress(BYTE& nField0, BYTE& nField1, BYTE& nField2, BYTE& nField3);\r
262                 int GetAddress(DWORD* dwAddress);\r
263                 BOOL IsBlank() const;\r
264                 void SetAddress(BYTE nField0, BYTE nField1, BYTE nField2, BYTE nField3);\r
265                 void SetAddress(DWORD dwAddress);\r
266                 void SetFieldFocus(WORD nField);\r
267                 void SetFieldRange(int nField, BYTE nLower, BYTE nUpper);\r
268 \r
269         protected:\r
270                 // Overridables\r
271                 virtual void PreRegisterClass(WNDCLASS &wc) { wc.lpszClassName = WC_IPADDRESS; }\r
272 \r
273         };\r
274 \r
275         class CMonthCalendar : public CWnd\r
276         {\r
277         public:\r
278                 CMonthCalendar()\r
279                 {\r
280                         INITCOMMONCONTROLSEX icex;\r
281                         icex.dwSize = sizeof(icex);\r
282                         icex.dwICC  = ICC_DATE_CLASSES;\r
283                         InitCommonControlsEx(&icex);\r
284                 }\r
285                 virtual ~CMonthCalendar() {}\r
286 \r
287                 // Attributes\r
288                 COLORREF GetColor(int nRegion) const;\r
289                 int GetFirstDayOfWeek(BOOL* pbLocal = NULL) const;\r
290                 CRect GetMinReqRect() const;\r
291                 int GetMonthDelta() const;\r
292                 COLORREF SetColor(int nRegion, COLORREF ref);\r
293                 BOOL SetFirstDayOfWeek(int iDay, int* lpnOld = NULL);\r
294                 int SetMonthDelta(int iDelta);\r
295 \r
296                 // Operations\r
297                 BOOL GetCurSel(LPSYSTEMTIME pDateTime) const;\r
298                 int GetMaxSelCount() const;\r
299                 int GetMonthRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange, DWORD dwFlags) const;\r
300                 DWORD GetRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange) const;\r
301                 BOOL GetSelRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange) const;\r
302                 BOOL GetToday(LPSYSTEMTIME pDateTime) const;\r
303                 DWORD HitTest(PMCHITTESTINFO pMCHitTest);\r
304                 BOOL SetCurSel(const LPSYSTEMTIME pDateTime);\r
305                 BOOL SetDayState(int nMonths, LPMONTHDAYSTATE pStates);\r
306                 BOOL SetMaxSelCount(int nMax);\r
307                 BOOL SetRange(const LPSYSTEMTIME pMinRange, const LPSYSTEMTIME pMaxRange);\r
308                 BOOL SetSelRange(const LPSYSTEMTIME pMinRange, const LPSYSTEMTIME pMaxRange);\r
309                 void SetToday(const LPSYSTEMTIME pDateTime);\r
310 \r
311         protected:\r
312                 // Overridables\r
313                 virtual void PreRegisterClass(WNDCLASS &wc) { wc.lpszClassName = MONTHCAL_CLASS; }\r
314         };\r
315 \r
316         class CProgressBar : public CWnd\r
317         {\r
318         public:\r
319                 CProgressBar() { ::InitCommonControls(); }\r
320                 virtual ~CProgressBar() {}\r
321 \r
322                 int  GetPos() const;\r
323                 int  GetRange(BOOL fWhichLimit, PPBRANGE ppBRange) const;\r
324                 int  OffsetPos(int nIncrement) const;\r
325                 int  SetPos(int nNewPos) const;\r
326                 int  SetRange(short nMinRange, short nMaxRange) const;\r
327                 int  SetStep(int nStepInc) const;\r
328                 int  StepIt() const;\r
329 \r
330         protected:\r
331                 // Overridables\r
332                 virtual void PreRegisterClass(WNDCLASS &wc) { wc.lpszClassName = PROGRESS_CLASS; }\r
333         };\r
334 \r
335         class CScrollBar : public CWnd\r
336         {\r
337         public:\r
338                 CScrollBar() {}\r
339                 virtual ~CScrollBar() {}\r
340 \r
341                 BOOL EnableScrollBar( UINT nArrowFlags = ESB_ENABLE_BOTH )  const;\r
342                 BOOL GetScrollInfo(LPSCROLLINFO lpsi)  const;\r
343                 int  GetScrollPos()  const;\r
344                 BOOL GetScrollRange(LPINT lpMinPos, LPINT lpMaxPos )  const;\r
345                 BOOL SetScrollInfo(LPSCROLLINFO lpsi, BOOL bRedraw = TRUE )  const;\r
346                 int  SetScrollPos(int nPos, BOOL bRedraw)  const;\r
347                 BOOL SetScrollRange( int nMinPos, int nMaxPos, BOOL bRedraw = TRUE )  const;\r
348                 BOOL ShowScrollBar(BOOL bShow)  const;\r
349 \r
350         protected:\r
351                 // Overridables\r
352                 virtual void PreRegisterClass(WNDCLASS &wc) { wc.lpszClassName = _T("SCROLLBAR"); ; }\r
353         };\r
354 \r
355         class CSlider : public CWnd\r
356         {\r
357         public:\r
358                 CSlider() { ::InitCommonControls(); }\r
359                 virtual ~CSlider() {}\r
360 \r
361                 void ClearSel() const;\r
362                 void ClearTics(BOOL bRedraw = FALSE ) const;\r
363                 CWnd* GetBuddy(BOOL fLocation = TRUE ) const;\r
364                 CRect GetChannelRect() const;\r
365                 int  GetLineSize() const;\r
366                 int  GetNumTics() const;\r
367                 int  GetPageSize() const;\r
368                 int  GetPos() const;\r
369                 int  GetRangeMax() const;\r
370                 int  GetRangeMin() const;\r
371                 int  GetSelEnd() const;\r
372                 int  GetSelStart() const;\r
373                 int  GetThumbLength() const;\r
374                 CRect GetThumbRect() const;\r
375                 int  GetTic(int nTic ) const;\r
376                 int  GetTicPos(int nTic) const;\r
377                 CToolTip* GetToolTips() const;\r
378                 CWnd* SetBuddy(CWnd* pBuddy, BOOL fLocation = TRUE ) const;\r
379                 int  SetLineSize(int nSize) const;\r
380                 int  SetPageSize(int nSize) const;\r
381                 void SetPos(int nPos, BOOL bRedraw = FALSE) const;\r
382                 void SetRangeMax(int nMax, BOOL bRedraw = FALSE) const;\r
383                 void SetRangeMin(int nMax, BOOL bRedraw = FALSE) const;\r
384                 void SetSelection(int nMin, int nMax, BOOL bRedraw = FALSE) const;\r
385                 BOOL SetTic(int nTic) const;\r
386                 void SetTicFreq(int nFreq)  const;\r
387                 int  SetTipSide(int nLocation) const;\r
388                 void SetToolTips(CToolTip* pToolTip) const;\r
389 \r
390         protected:\r
391                 // Overridables\r
392                 virtual void PreRegisterClass(WNDCLASS &wc) { wc.lpszClassName = TRACKBAR_CLASS; }\r
393         };\r
394 \r
395 \r
396         // Also known as an Up/Down control\r
397         class CSpinButton : public CWnd\r
398         {\r
399         public:\r
400                 CSpinButton() { ::InitCommonControls(); }\r
401                 virtual ~CSpinButton() {}\r
402 \r
403                 int  GetAccel(int cAccels, LPUDACCEL paAccels) const;\r
404                 int  GetBase() const;\r
405                 CWnd* GetBuddy() const;\r
406                 int  GetPos() const;\r
407                 DWORD GetRange() const;\r
408                 BOOL SetAccel(int cAccels, LPUDACCEL paAccels) const;\r
409                 int  SetBase(int nBase) const;\r
410                 CWnd* SetBuddy(CWnd* hwndBuddy) const;\r
411                 int  SetPos(int nPos) const;\r
412                 void SetRange(int nLower, int nUpper) const;\r
413 \r
414         protected:\r
415                 // Overridables\r
416                 virtual void PreCreate(CREATESTRUCT &cs);\r
417                 virtual void PreRegisterClass(WNDCLASS &wc);\r
418         };\r
419 \r
420         class CToolTip : public CWnd\r
421         {\r
422         public:\r
423                 CToolTip();\r
424                 virtual ~CToolTip();\r
425 \r
426                 //Attributes\r
427                 int GetDelayTime(DWORD dwDuration) const;\r
428                 void GetMargin(LPRECT lprc) const;\r
429                 int GetMaxTipWidth() const;\r
430                 void GetText(CString& str, CWnd* pWnd, UINT_PTR nIDTool = 0) const;\r
431                 COLORREF GetTipBkColor() const;\r
432                 COLORREF GetTipTextColor() const;\r
433                 int GetToolCount() const;\r
434                 BOOL GetToolInfo(TOOLINFO& ToolInfo, CWnd* pWnd, UINT_PTR nIDTool = 0) const;\r
435                 void SetDelayTime(UINT nDelay);\r
436                 void SetDelayTime(DWORD dwDuration, int iTime);\r
437                 void SetMargin(LPRECT lprc);\r
438                 int SetMaxTipWidth(int iWidth);\r
439                 void SetTipBkColor(COLORREF clr);\r
440                 void SetTipTextColor(COLORREF clr);\r
441                 void SetToolInfo(LPTOOLINFO lpToolInfo);\r
442 #if (defined TTM_SETTITLE) && (_WIN32_IE >=0x0500)\r
443                 CSize GetBubbleSize(LPTOOLINFO lpToolInfo) const;\r
444 #endif\r
445 \r
446                 //Operations\r
447                 void Activate(BOOL bActivate);\r
448                 BOOL AddTool(CWnd* pWnd, UINT nIDText, LPCRECT lpRectTool = NULL, UINT_PTR nIDTool = 0);\r
449                 BOOL AddTool(CWnd* pWnd, LPCTSTR lpszText = LPSTR_TEXTCALLBACK, LPCRECT lpRectTool = NULL, UINT_PTR nIDTool = 0);\r
450                 void DelTool(CWnd* pWnd, UINT_PTR nIDTool = 0);\r
451                 BOOL HitTest(CWnd* pWnd, CPoint pt, LPTOOLINFO lpToolInfo) const;\r
452                 void Pop();\r
453                 void RelayEvent(LPMSG lpMsg);\r
454 \r
455                 void SetToolRect(CWnd* pWnd, UINT_PTR nIDTool, LPCRECT lpRect);\r
456                 void Update();\r
457                 void UpdateTipText(LPCTSTR lpszText, CWnd* pWnd, UINT_PTR nIDTool = 0);\r
458                 void UpdateTipText(UINT nIDText, CWnd* pWnd, UINT_PTR nIDTool = 0);\r
459 \r
460 #if (defined TTM_SETTITLE) && (_WIN32_IE >=0x0500)\r
461                 BOOL AdjustRect(LPRECT lprc, BOOL bLarger = TRUE);\r
462                 BOOL SetTitle(UINT uIcon, LPCTSTR lpstrTitle);\r
463 #endif\r
464 #if (defined TTM_SETWINDOWTHEME) && (WINVER >= 0x0501)\r
465                 HRESULT SetWindowTheme(LPCWSTR lpstrTheme);\r
466 #endif\r
467 \r
468         protected:\r
469                 // Overridables\r
470                 virtual void PreRegisterClass(WNDCLASS &wc) { wc.lpszClassName = TOOLTIPS_CLASS; ; }\r
471                 virtual void PreCreate(CREATESTRUCT &cs) \r
472                 { \r
473                         cs.dwExStyle = WS_EX_TOOLWINDOW; \r
474                         cs.style = WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP;\r
475                 }\r
476 \r
477         private:\r
478                 void LoadToolInfo(TOOLINFO& ti, CWnd* pWnd, UINT_PTR nIDTool) const;\r
479         };\r
480 \r
481 \r
482 } // namespace Win32xx\r
483 \r
484 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
485 \r
486 namespace Win32xx\r
487 {\r
488 \r
489         ////////////////////////////////////////\r
490         // Definitions for the CAnimation class\r
491         //\r
492         inline BOOL CAnimation::Close() const\r
493         // Closes an AVI clip.\r
494         {\r
495                 assert(IsWindow());\r
496                 return Animate_Close(m_hWnd);\r
497         }\r
498 \r
499         inline BOOL CAnimation::Open(LPTSTR lpszName) const\r
500         // Opens an AVI clip and displays its first frame in an animation control.\r
501         {\r
502                 assert(IsWindow());\r
503                 return Animate_Open(m_hWnd, lpszName);\r
504         }\r
505 \r
506         inline BOOL CAnimation::Play(UINT wFrom, UINT wTo, UINT cRepeat) const\r
507         // Plays an AVI clip in an animation control. The control plays the clip\r
508         //      in the background while the thread continues executing.\r
509         {\r
510                 assert(IsWindow());\r
511                 return Animate_Play(m_hWnd, wFrom, wTo, cRepeat);\r
512         }\r
513 \r
514         inline BOOL CAnimation::Seek(UINT wFrame) const\r
515         // Directs an animation control to display a particular frame of an AVI clip.\r
516         // The control displays the clip in the background while the thread continues executing.\r
517         {\r
518                 assert(IsWindow());\r
519                 return Animate_Seek(m_hWnd, wFrame);\r
520         }\r
521 \r
522         inline BOOL CAnimation::Stop() const\r
523         // Stops playing an AVI clip in an animation control.\r
524         {\r
525                 assert(IsWindow());\r
526                 return Animate_Stop(m_hWnd);\r
527         }\r
528 \r
529 \r
530         ////////////////////////////////////////\r
531         // Definitions for the CComboBox class\r
532         //\r
533         inline int  CComboBox::AddString(LPCTSTR lpszString) const\r
534         // Adds a string to the list box of a combo box. If the combo box does not\r
535         // have the CBS_SORT style, the string is added to the end of the list.\r
536         // Otherwise, the string is inserted into the list, and the list is sorted.\r
537         {\r
538                 assert(IsWindow());\r
539                 return (int)SendMessage(CB_ADDSTRING, 0, (LPARAM)lpszString);\r
540         }\r
541 \r
542         inline void CComboBox::Clear() const\r
543         // Deletes the current selection, if any, from the combo box's edit control.\r
544         {\r
545                 assert(IsWindow());\r
546                 SendMessage(WM_CLEAR, 0, 0);\r
547         }\r
548 \r
549         inline void CComboBox::Copy() const\r
550         // Copies the current selection to the clipboard in CF_TEXT format.\r
551         {\r
552                 assert(IsWindow());\r
553                 SendMessage(WM_COPY, 0, 0);\r
554         }\r
555 \r
556         inline void CComboBox::Cut() const\r
557         // Deletes the current selection, if any, in the edit control and copies\r
558         // the deleted text to the clipboard in CF_TEXT format.\r
559         {\r
560                 assert(IsWindow());\r
561                 SendMessage(WM_CUT, 0, 0);\r
562         }\r
563 \r
564         inline int  CComboBox::DeleteString(int nIndex) const\r
565         // Deletes a string in the list box of a combo box.\r
566         {\r
567                 assert(IsWindow());\r
568                 return (int)SendMessage(CB_DELETESTRING, (WPARAM)nIndex, 0);\r
569         }\r
570 \r
571         inline int  CComboBox::Dir(UINT attr, LPCTSTR lpszWildCard ) const\r
572         // Adds the names of directories and files that match a specified string\r
573         // and set of file attributes.\r
574         {\r
575                 assert(IsWindow());\r
576                 return (int)SendMessage(CB_DIR, (WPARAM)attr, (LPARAM)lpszWildCard);\r
577         }\r
578 \r
579         inline int  CComboBox::FindString(int nIndexStart, LPCTSTR lpszString) const\r
580         // Search the list box of a combo box for an item beginning with the\r
581         // characters in a specified string.\r
582         {\r
583                 assert(IsWindow());\r
584                 return (int)SendMessage(CB_FINDSTRING, (WPARAM)nIndexStart, (LPARAM)lpszString);\r
585         }\r
586 \r
587         inline int  CComboBox::FindStringExact(int nIndexStart, LPCTSTR lpszString) const\r
588         // Find the first list box string in a combo box that matches the string specified in lpszString.\r
589         {\r
590                 assert(IsWindow());\r
591                 return (int)SendMessage(CB_FINDSTRINGEXACT, (WPARAM)nIndexStart, (LPARAM)lpszString);\r
592         }\r
593 \r
594         inline int  CComboBox::GetCount() const\r
595         // Retrieves the number of items in the list box of the combo box.\r
596         {\r
597                 assert(IsWindow());\r
598                 return (int)SendMessage(CB_GETCOUNT, 0,0);\r
599         }\r
600 \r
601         inline int  CComboBox::GetCurSel() const\r
602         // Retrieves the index of the currently selected item, if any, in the list box of the combo box.\r
603         {\r
604                 assert(IsWindow());\r
605                 return (int)SendMessage(CB_GETCURSEL, 0,0);\r
606         }\r
607 \r
608         inline CRect CComboBox::GetDroppedControlRect() const\r
609         // Retrieves the screen coordinates of the combo box in its dropped-down state.\r
610         {\r
611                 assert(IsWindow());\r
612                 CRect rc;\r
613                 SendMessage(CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&rc);\r
614                 return rc;\r
615         }\r
616 \r
617         inline BOOL CComboBox::GetDroppedState() const\r
618         // Determines whether the list box of the combo box is dropped down.\r
619         {\r
620                 assert(IsWindow());\r
621                 return (BOOL)SendMessage(CB_GETDROPPEDSTATE, 0, 0);\r
622         }\r
623 \r
624         inline int  CComboBox::GetDroppedWidth() const\r
625         // Retrieves the minimum allowable width, in pixels, of the list box of the combo box\r
626         // with the CBS_DROPDOWN or CBS_DROPDOWNLIST style.\r
627         {\r
628                 assert(IsWindow());\r
629                 return (int)SendMessage(CB_GETDROPPEDWIDTH, 0, 0);\r
630         }\r
631 \r
632         inline DWORD CComboBox::GetEditSel() const\r
633         // Gets the starting and ending character positions of the current selection\r
634         // in the edit control of the combo box.\r
635         {\r
636                 assert(IsWindow());\r
637                 return (int)SendMessage(CB_GETEDITSEL, 0, 0);\r
638         }\r
639 \r
640         inline BOOL CComboBox::GetExtendedUI() const\r
641         // Determines whether the combo box has the default user interface or the extended user interface.\r
642         {\r
643                 assert(IsWindow());\r
644                 return (BOOL)SendMessage(CB_GETEXTENDEDUI, 0, 0);\r
645         }\r
646 \r
647         inline int  CComboBox::GetHorizontalExtent() const\r
648         // Retrieve from the combo box the width, in pixels, by which the list box can\r
649         // be scrolled horizontally (the scrollable width).\r
650         {\r
651                 assert(IsWindow());\r
652                 return (int)SendMessage(CB_GETHORIZONTALEXTENT, 0, 0);\r
653         }\r
654 \r
655         inline DWORD CComboBox::GetItemData(int nIndex) const\r
656         // Retrieves the application-supplied value associated with the specified item in the combo box.\r
657         {\r
658                 assert(IsWindow());\r
659                 return (DWORD)SendMessage(CB_GETITEMDATA, (WPARAM)nIndex, 0);\r
660         }\r
661 \r
662         inline int  CComboBox::GetItemHeight(int nIndex) const\r
663         // Determines the height of list items or the selection field in the combo box.\r
664         {\r
665                 assert(IsWindow());\r
666                 return (int)SendMessage(CB_GETITEMHEIGHT, (WPARAM)nIndex, 0);\r
667         }\r
668 \r
669         inline int  CComboBox::GetLBText(int nIndex, LPTSTR lpszText) const\r
670         //  Retrieves a string from the list of the combo box.\r
671         {\r
672                 assert(IsWindow());\r
673                 return (int)SendMessage(CB_GETLBTEXT, (WPARAM)nIndex, (LPARAM)lpszText);\r
674         }\r
675 \r
676         inline int  CComboBox::GetLBTextLen(int nIndex) const\r
677         // Retrieves the length, in characters, of a string in the list of the combo box.\r
678         {\r
679                 assert(IsWindow());\r
680                 return (int)SendMessage(CB_GETLBTEXTLEN, (WPARAM)nIndex, 0);\r
681         }\r
682 \r
683         inline LCID CComboBox::GetLocale() const\r
684         // Retrieves the current locale of the combo box.\r
685         {\r
686                 assert(IsWindow());\r
687                 return (LCID)SendMessage(CB_GETLOCALE, 0, 0);\r
688         }\r
689 \r
690         inline int  CComboBox::GetTopIndex() const\r
691         // Retrieves the zero-based index of the first visible item in the list box portion of the combo box.\r
692         {\r
693                 assert(IsWindow());\r
694                 return (int)SendMessage(CB_GETTOPINDEX, 0, 0);\r
695         }\r
696 \r
697         inline int  CComboBox::InitStorage(int nItems, int nBytes) const\r
698         // Allocates memory for storing list box items. Use this before adding a\r
699         // large number of items to the list box portion of a combo box.\r
700         {\r
701                 assert(IsWindow());\r
702                 return (int)SendMessage(CB_INITSTORAGE, (WPARAM)nItems, (LPARAM)nBytes);\r
703         }\r
704 \r
705         inline int  CComboBox::InsertString(int nIndex, LPCTSTR lpszString) const\r
706         // Inserts a string into the list box of the combo box. Unlike the AddString,\r
707         // a list with the CBS_SORT style is not sorted.\r
708         {\r
709                 assert(IsWindow());\r
710                 return (int)SendMessage(CB_INSERTSTRING, (WPARAM)nIndex, (LPARAM)lpszString);\r
711         }\r
712 \r
713         inline void CComboBox::Paste() const\r
714         // Copies the current content of the clipboard to the combo box's edit control at the current caret position.\r
715         {\r
716                 assert(IsWindow());\r
717                 SendMessage(WM_PASTE, 0, 0);\r
718         }\r
719 \r
720         inline void CComboBox::LimitText(int nMaxChars) const\r
721         // Limits the length of the text the user may type into the edit control of the combo box.\r
722         {\r
723                 assert(IsWindow());\r
724                 SendMessage(CB_LIMITTEXT, (WPARAM)nMaxChars, 0);\r
725         }\r
726 \r
727         inline void CComboBox::ResetContent() const\r
728         // Removes all items from the list box and edit control of the combo box.\r
729         {\r
730                 assert(IsWindow());\r
731                 SendMessage(CB_RESETCONTENT, 0, 0);\r
732         }\r
733 \r
734         inline int  CComboBox::SelectString(int nStartAfter, LPCTSTR lpszString) const\r
735         // Searches the list of a combo box for an item that begins with the characters in a\r
736         // specified string. If a matching item is found, it is selected and copied to the edit control.\r
737         {\r
738                 assert(IsWindow());\r
739                 return (int)SendMessage(CB_SELECTSTRING, (WPARAM)nStartAfter, (LPARAM)lpszString);\r
740         }\r
741 \r
742         inline int  CComboBox::SetCurSel(int nIndex) const\r
743         // Selects a string in the list of the combo box. If necessary, the list scrolls the string into view.\r
744         {\r
745                 assert(IsWindow());\r
746                 return (int)SendMessage(CB_SETCURSEL, (WPARAM)nIndex, 0);\r
747         }\r
748 \r
749         inline int  CComboBox::SetDroppedWidth(int nWidth) const\r
750         // Sets the maximum allowable width, in pixels, of the list box of the combo box with\r
751         // the CBS_DROPDOWN or CBS_DROPDOWNLIST style.\r
752         {\r
753                 assert(IsWindow());\r
754                 return (int)SendMessage(CB_SETDROPPEDWIDTH, (WPARAM)nWidth, 0);\r
755         }\r
756 \r
757         inline BOOL CComboBox::SetEditSel(int nStartChar, int nEndChar) const\r
758         // Selects characters in the edit control of the combo box.\r
759         {\r
760                 assert(IsWindow());\r
761                 return (BOOL)SendMessage(CB_SETEDITSEL, 0, (LPARAM)MAKELONG(nStartChar,nEndChar));\r
762         }\r
763 \r
764         inline int  CComboBox::SetExtendedUI(BOOL bExtended) const\r
765         // Selects either the default user interface or the extended user interface for the combo box that\r
766         // has the CBS_DROPDOWN or CBS_DROPDOWNLIST style.\r
767         {\r
768                 assert(IsWindow());\r
769                 return (int)SendMessage(CB_SETEXTENDEDUI, (WPARAM)bExtended, 0);\r
770         }\r
771 \r
772         inline void CComboBox::SetHorizontalExtent(UINT nExtent ) const\r
773         // Sets the width, in pixels, by which the list box can be scrolled horizontally (the scrollable width).\r
774         {\r
775                 assert(IsWindow());\r
776                 SendMessage(CB_SETHORIZONTALEXTENT, (WPARAM)nExtent, 0);\r
777         }\r
778 \r
779         inline int  CComboBox::SetItemData(int nIndex, DWORD dwItemData) const\r
780         // Sets the value associated with the specified item in the combo box.\r
781         {\r
782                 assert(IsWindow());\r
783                 return (int)SendMessage(CB_SETITEMDATA, (WPARAM)nIndex, (LPARAM)dwItemData);\r
784         }\r
785 \r
786         inline int  CComboBox::SetItemHeight(int nIndex, UINT cyItemHeight) const\r
787         // Sets the height of list items or the selection field in the combo box.\r
788         {\r
789                 assert(IsWindow());\r
790                 return (int)SendMessage(CB_SETITEMHEIGHT, (WPARAM)nIndex, (LPARAM)cyItemHeight);\r
791         }\r
792 \r
793         inline LCID CComboBox::SetLocale( LCID NewLocale ) const\r
794         // Sets the current locale of the combo box.\r
795         {\r
796                 assert(IsWindow());\r
797                 return (LCID)SendMessage(CB_SETLOCALE, (WPARAM)NewLocale, 0);\r
798         }\r
799 \r
800         inline int  CComboBox::SetTopIndex(int nIndex) const\r
801         // Ensure that a particular item is visible in the list box of the combo box.\r
802         {\r
803                 assert(IsWindow());\r
804                 return (int)SendMessage(CB_SETTOPINDEX, (WPARAM)nIndex, 0);\r
805         }\r
806 \r
807         inline void CComboBox::ShowDropDown(BOOL bShow) const\r
808         // Shows or hides the list box of the combo box that has the CBS_DROPDOWN or CBS_DROPDOWNLIST style.\r
809         {\r
810                 assert(IsWindow());\r
811                 SendMessage(CB_SHOWDROPDOWN, (WPARAM)bShow, 0);\r
812         }\r
813 \r
814 \r
815         ////////////////////////////////////////\r
816         // Definitions for the CComboBoxEx class\r
817         //\r
818         inline int  CComboBoxEx::DeleteItem(int nIndex ) const\r
819         // Removes an item from the ComboBoxEx control.\r
820         {\r
821                 assert(IsWindow());\r
822                 return (int)SendMessage(CBEM_DELETEITEM, (WPARAM)nIndex, 0);\r
823         }\r
824 \r
825         inline CWnd* CComboBoxEx::GetComboBoxCtrl() const\r
826         // Retrieves the handle to the child combo box control.\r
827         {\r
828                 assert(IsWindow());\r
829                 return FromHandle((HWND)SendMessage(CBEM_GETCOMBOCONTROL, 0, 0));\r
830         }\r
831 \r
832         inline CEdit* CComboBoxEx::GetEditCtrl() const\r
833         // Retrieves the handle to the edit control portion of the ComboBoxEx control.\r
834         {\r
835                 assert(IsWindow());\r
836                 return (CEdit*)FromHandle((HWND)SendMessage(CBEM_GETEDITCONTROL, 0, 0));\r
837         }\r
838 \r
839         inline DWORD CComboBoxEx::GetExtendedStyle() const\r
840         // Retrieves the extended styles that are in use for the ComboBoxEx control.\r
841         {\r
842                 assert(IsWindow());\r
843                 return (DWORD)SendMessage(CBEM_GETEXTENDEDSTYLE, 0, 0);\r
844         }\r
845 \r
846         inline HIMAGELIST CComboBoxEx::GetImageList() const\r
847         // Retrieves the handle to an image list assigned to the ComboBoxEx control.\r
848         {\r
849                 assert(IsWindow());\r
850                 return (HIMAGELIST)SendMessage(CBEM_GETIMAGELIST, 0, 0);\r
851         }\r
852 \r
853         inline BOOL CComboBoxEx::GetItem(COMBOBOXEXITEM* pCBItem) const\r
854         // Retrieves item information for the given ComboBoxEx item.\r
855         {\r
856                 assert(IsWindow());\r
857                 return (BOOL)SendMessage(CBEM_GETITEM, 0, (LPARAM)pCBItem);\r
858         }\r
859 \r
860         inline BOOL CComboBoxEx::HasEditChanged () const\r
861         // Determines whether or not the user has changed the text of the ComboBoxEx edit control.\r
862         {\r
863                 assert(IsWindow());\r
864                 return (BOOL)SendMessage(CBEM_HASEDITCHANGED, 0, 0);\r
865         }\r
866 \r
867         inline int CComboBoxEx::InsertItem(COMBOBOXEXITEM* lpcCBItem) const\r
868         // Inserts a new item in the ComboBoxEx control.\r
869         {\r
870                 assert(IsWindow());\r
871                 return (int)SendMessage(CBEM_INSERTITEM, 0, (LPARAM)lpcCBItem);\r
872         }\r
873 \r
874         inline DWORD CComboBoxEx::SetExtendedStyle(DWORD dwExMask, DWORD dwExStyles ) const\r
875         // Sets extended styles within the ComboBoxEx control.\r
876         {\r
877                 assert(IsWindow());\r
878                 return (DWORD)SendMessage(CBEM_SETEXTENDEDSTYLE, (WPARAM)dwExMask, (LPARAM)dwExStyles);\r
879         }\r
880 \r
881         inline HIMAGELIST CComboBoxEx::SetImageList(HIMAGELIST himl) const\r
882         // Sets an image list for the ComboBoxEx control.\r
883         {\r
884                 assert(IsWindow());\r
885                 return (HIMAGELIST)SendMessage(CBEM_SETIMAGELIST, 0, (LPARAM)himl);\r
886         }\r
887 \r
888         inline BOOL CComboBoxEx::SetItem(PCOMBOBOXEXITEM lpcCBItem) const\r
889         // Sets the attributes for an item in the ComboBoxEx control.\r
890         {\r
891                 assert(IsWindow());\r
892                 return (BOOL)SendMessage(CBEM_SETITEM, 0, (LPARAM)lpcCBItem);\r
893         }\r
894 \r
895         ////////////////////////////////////////\r
896         // Definitions for the CDateTime class\r
897         //\r
898         inline COLORREF CDateTime::GetMonthCalColor(int iColor) const\r
899         {\r
900                 assert(IsWindow());\r
901                 return (COLORREF)DateTime_GetMonthCalColor(m_hWnd, iColor);\r
902         }\r
903 \r
904         inline COLORREF CDateTime::SetMonthCalColor(int iColor, COLORREF clr)\r
905         {\r
906                 assert(IsWindow());\r
907                 return (COLORREF)DateTime_SetMonthCalColor(m_hWnd, iColor, clr);\r
908         }\r
909 \r
910         inline BOOL CDateTime::SetFormat(LPCTSTR pszFormat)\r
911         {\r
912                 assert(IsWindow());\r
913                 return DateTime_SetFormat(m_hWnd, pszFormat);\r
914         }\r
915 \r
916         inline CMonthCalendar* CDateTime::GetMonthCalCtrl() const\r
917         {\r
918                 assert(IsWindow());\r
919                 return (CMonthCalendar*)FromHandle((HWND)DateTime_GetMonthCal(m_hWnd));\r
920         }\r
921 \r
922         inline CFont* CDateTime::GetMonthCalFont() const\r
923         {\r
924                 assert(IsWindow());\r
925                 return FromHandle((HFONT)DateTime_GetMonthCalFont(m_hWnd));\r
926         }\r
927 \r
928         inline void CDateTime::SetMonthCalFont(HFONT hFont, BOOL bRedraw /*= TRUE*/)\r
929         {\r
930                 assert(IsWindow());\r
931                 DateTime_SetMonthCalFont(m_hWnd, hFont, MAKELONG(bRedraw, 0));\r
932         }\r
933 \r
934         inline DWORD CDateTime::GetRange(LPSYSTEMTIME lpSysTimeArray) const\r
935         {\r
936                 assert(IsWindow());\r
937                 return DateTime_GetRange(m_hWnd, lpSysTimeArray);\r
938         }\r
939 \r
940         inline BOOL CDateTime::SetRange(DWORD flags, LPSYSTEMTIME lpSysTimeArray)\r
941         {\r
942                 assert(IsWindow());\r
943                 return DateTime_SetRange(m_hWnd, flags, lpSysTimeArray);\r
944         }\r
945 \r
946         inline DWORD CDateTime::GetTime(LPSYSTEMTIME pTimeDest) const\r
947         {\r
948                 assert(IsWindow());\r
949                 return DateTime_GetSystemtime(m_hWnd, pTimeDest);\r
950         }\r
951 \r
952         inline BOOL CDateTime::SetTime(DWORD flag, LPSYSTEMTIME pTimeNew /*= NULL*/)\r
953         {\r
954                 assert(IsWindow());\r
955                 return DateTime_SetSystemtime(m_hWnd, flag, pTimeNew);\r
956         }\r
957 \r
958 \r
959         ////////////////////////////////////////\r
960         // Definitions for the CHotKey class\r
961         //\r
962         inline DWORD CHotKey::GetHotKey() const\r
963         {\r
964                 assert(IsWindow());\r
965                 return (DWORD)SendMessage(HKM_GETHOTKEY, 0, 0);\r
966         }\r
967 \r
968         inline CString CHotKey::GetKeyName(UINT vk, BOOL fExtended) const\r
969         {\r
970                 // Translate the virtual-key code to a scan code\r
971                 LONG lScan = MapVirtualKey(vk, 0);\r
972 \r
973                 // Construct an LPARAM with the scan code in Bits 16-23, and an extended flag in bit 24\r
974                 LPARAM lParam = lScan << 16;\r
975                 if (fExtended)\r
976                         lParam |= 0x01000000L;\r
977 \r
978                 CString str;\r
979                 int nBufferLen = 64;\r
980                 int nStrLen = nBufferLen;\r
981 \r
982                 // Loop until we have retrieved the entire string\r
983                 while(nStrLen == nBufferLen)\r
984                 {\r
985                         nBufferLen *= 4;\r
986                         LPTSTR pszStr = str.GetBuffer(nBufferLen);\r
987                         nStrLen = ::GetKeyNameText((LONG)lParam, pszStr, nBufferLen + 1);\r
988                         str.ReleaseBuffer();\r
989                 }\r
990 \r
991                 return str;\r
992         }\r
993 \r
994         inline void CHotKey::SetHotKey(DWORD dwKey)\r
995         {\r
996                 assert(IsWindow());\r
997                 SendMessage(HKM_SETHOTKEY, (WPARAM)dwKey, 0);\r
998         }\r
999 \r
1000         inline void CHotKey::SetRules(WORD wInvalidComb, WORD wModifiers)\r
1001         {\r
1002                 assert(IsWindow());\r
1003                 SendMessage(HKM_SETRULES, wInvalidComb, wModifiers);\r
1004         }\r
1005 \r
1006 \r
1007         ////////////////////////////////////////\r
1008         // Definitions for the CHeader class\r
1009         //\r
1010         inline HIMAGELIST CHeader::CreateDragImage(int nIndex)\r
1011         {\r
1012                 assert(IsWindow());\r
1013                 return Header_CreateDragImage(m_hWnd, nIndex);\r
1014         }\r
1015 \r
1016         inline BOOL CHeader::DeleteItem(int nPos)\r
1017         {\r
1018                 assert(IsWindow());\r
1019                 return Header_DeleteItem(m_hWnd, nPos);\r
1020         }\r
1021 \r
1022         inline HIMAGELIST CHeader::GetImageList() const\r
1023         {\r
1024                 assert(IsWindow());\r
1025                 return Header_GetImageList(m_hWnd);\r
1026         }\r
1027 \r
1028         inline BOOL CHeader::GetItem(int nPos, HDITEM* pHeaderItem) const\r
1029         {\r
1030                 assert(IsWindow());\r
1031                 return Header_GetItem(m_hWnd, nPos, pHeaderItem);\r
1032         }\r
1033 \r
1034         inline int CHeader::GetItemCount() const\r
1035         {\r
1036                 assert(IsWindow());\r
1037                 return Header_GetItemCount(m_hWnd);\r
1038         }\r
1039 \r
1040         inline CRect CHeader::GetItemRect(int nIndex) const\r
1041         {\r
1042                 assert(IsWindow());\r
1043                 RECT rc;\r
1044                 Header_GetItemRect(m_hWnd, nIndex, &rc);\r
1045                 return rc;\r
1046         }\r
1047 \r
1048         inline BOOL CHeader::GetOrderArray(LPINT piArray, int iCount)\r
1049         {\r
1050                 assert(IsWindow());\r
1051                 return Header_GetOrderArray(m_hWnd, piArray, iCount);\r
1052         }\r
1053 \r
1054         inline int CHeader::InsertItem(int nPos, HDITEM* phdi)\r
1055         {\r
1056                 assert(IsWindow());\r
1057                 return Header_InsertItem(m_hWnd, nPos, phdi);\r
1058         }\r
1059 \r
1060         inline BOOL CHeader::Layout(HDLAYOUT* pHeaderLayout)\r
1061         {\r
1062                 assert(IsWindow());\r
1063                 return Header_Layout(m_hWnd, pHeaderLayout);\r
1064         }\r
1065 \r
1066         inline int CHeader::OrderToIndex(int nOrder) const\r
1067         {\r
1068                 assert(IsWindow());\r
1069                 return Header_OrderToIndex( m_hWnd, nOrder);\r
1070         }\r
1071 \r
1072 #ifdef Header_SetHotDivider\r
1073         inline int CHeader::SetHotDivider(CPoint pt)\r
1074         {\r
1075                 assert(IsWindow());\r
1076                 return Header_SetHotDivider(m_hWnd, TRUE, MAKELPARAM(pt.x, pt.y));\r
1077         }\r
1078 \r
1079         inline int CHeader::SetHotDivider(int nIndex)\r
1080         {\r
1081                 assert(IsWindow());\r
1082                 return Header_SetHotDivider(m_hWnd, FALSE, nIndex);\r
1083         }\r
1084 #endif\r
1085 \r
1086         inline HIMAGELIST CHeader::SetImageList(HIMAGELIST himl)\r
1087         {\r
1088                 assert(IsWindow());\r
1089                 return Header_SetImageList(m_hWnd, himl);\r
1090         }\r
1091 \r
1092         inline BOOL CHeader::SetItem(int nPos, HDITEM* pHeaderItem)\r
1093         {\r
1094                 assert(IsWindow());\r
1095                 return Header_SetItem(m_hWnd, nPos, pHeaderItem);\r
1096         }\r
1097 \r
1098         inline BOOL CHeader::SetOrderArray(int iCount, LPINT piArray)\r
1099         {\r
1100                 assert(IsWindow());\r
1101                 return Header_SetOrderArray(m_hWnd, iCount, piArray);\r
1102         }\r
1103 \r
1104 #ifdef Header_ClearFilter\r
1105         inline int CHeader::ClearFilter(int nColumn)\r
1106         {\r
1107                 assert(IsWindow());\r
1108                 return Header_ClearFilter(m_hWnd, nColumn);\r
1109         }\r
1110 \r
1111         inline int CHeader::ClearAllFilters()\r
1112         {\r
1113                 assert(IsWindow());\r
1114                 return Header_ClearAllFilters(m_hWnd);\r
1115         }\r
1116 \r
1117         inline int CHeader::EditFilter(int nColumn, BOOL bDiscardChanges)\r
1118         {\r
1119                 assert(IsWindow());\r
1120                 return Header_EditFilter(m_hWnd, nColumn, LPARAM MAKELPARAM(bDiscardChanges, 0));\r
1121         }\r
1122 \r
1123         inline int CHeader::GetBitmapMargin() const\r
1124         {\r
1125                 assert(IsWindow());\r
1126                 return Header_GetBitmapMargin(m_hWnd);\r
1127         }\r
1128 \r
1129         inline int CHeader::SetBitmapMargin(int nWidth)\r
1130         {\r
1131                 assert(IsWindow());\r
1132                 return Header_SetBitmapMargin(m_hWnd, nWidth);\r
1133         }\r
1134 \r
1135         inline int CHeader::SetFilterChangeTimeout(DWORD dwTimeOut)\r
1136         {\r
1137                 assert(IsWindow());\r
1138                 return Header_SetFilterChangeTimeout(m_hWnd, dwTimeOut);\r
1139         }\r
1140 #endif\r
1141 \r
1142         ////////////////////////////////////////\r
1143         // Definitions for the CIPAddress class\r
1144         //\r
1145         inline void CIPAddress::ClearAddress()\r
1146         {\r
1147                 assert(IsWindow());\r
1148                 SendMessage(IPM_CLEARADDRESS, 0, 0);\r
1149         }\r
1150 \r
1151         inline int CIPAddress::GetAddress(BYTE& nField0, BYTE& nField1, BYTE& nField2, BYTE& nField3)\r
1152         {\r
1153                 DWORD dwAddr;\r
1154                 int iValue = GetAddress(&dwAddr);\r
1155                 nField0 = (BYTE)FIRST_IPADDRESS(dwAddr);\r
1156                 nField1 = (BYTE)SECOND_IPADDRESS(dwAddr);\r
1157                 nField2 = (BYTE)THIRD_IPADDRESS(dwAddr);\r
1158                 nField3 = (BYTE)FOURTH_IPADDRESS(dwAddr);\r
1159                 return iValue;\r
1160         }\r
1161 \r
1162         inline int CIPAddress::GetAddress(DWORD* dwAddress)\r
1163         {\r
1164                 assert(IsWindow());\r
1165                 return (int)SendMessage(IPM_GETADDRESS, 0, (LPARAM)&dwAddress);\r
1166         }\r
1167 \r
1168         inline BOOL CIPAddress::IsBlank() const\r
1169         {\r
1170                 assert(IsWindow());\r
1171                 return (BOOL)SendMessage(IPM_ISBLANK, 0, 0);\r
1172         }\r
1173 \r
1174         inline void CIPAddress::SetAddress(BYTE nField0, BYTE nField1, BYTE nField2, BYTE nField3)\r
1175         {\r
1176                 assert(IsWindow());\r
1177                 SendMessage(IPM_SETADDRESS, 0, (LPARAM)MAKEIPADDRESS(nField0, nField1, nField2, nField3));\r
1178         }\r
1179 \r
1180         inline void CIPAddress::SetAddress(DWORD dwAddress)\r
1181         {\r
1182                 assert(IsWindow());\r
1183                 SendMessage(IPM_SETADDRESS, 0, (LPARAM)dwAddress);\r
1184         }\r
1185 \r
1186         inline void CIPAddress::SetFieldFocus(WORD nField)\r
1187         {\r
1188                 assert(IsWindow());\r
1189                 SendMessage(IPM_SETFOCUS, nField, 0);\r
1190         }\r
1191 \r
1192         inline void CIPAddress::SetFieldRange(int nField, BYTE nLower, BYTE nUpper)\r
1193         {\r
1194                 assert(IsWindow());\r
1195                 SendMessage(IPM_SETRANGE, MAKEIPRANGE(nLower, nUpper), nField);\r
1196         }\r
1197 \r
1198 \r
1199         ///////////////////////////////////////////\r
1200         // Definitions for the CMonthCalendar class\r
1201         //\r
1202         inline COLORREF CMonthCalendar::GetColor(int nRegion) const\r
1203         {\r
1204                 assert(IsWindow());\r
1205                 return (COLORREF)MonthCal_GetColor(m_hWnd, nRegion);\r
1206         }\r
1207 \r
1208         inline BOOL CMonthCalendar::GetCurSel(LPSYSTEMTIME pDateTime) const\r
1209         {\r
1210                 assert(IsWindow());\r
1211                 return MonthCal_GetCurSel(m_hWnd, pDateTime);\r
1212         }\r
1213 \r
1214         inline int CMonthCalendar::GetFirstDayOfWeek(BOOL* pbLocal /*= NULL*/) const\r
1215         {\r
1216                 assert(IsWindow());\r
1217                 DWORD dwValue = MonthCal_GetFirstDayOfWeek(m_hWnd);\r
1218 \r
1219                 if (pbLocal)\r
1220                         *pbLocal = HIWORD(dwValue);\r
1221 \r
1222                 return LOWORD(dwValue);\r
1223         }\r
1224 \r
1225         inline int CMonthCalendar::GetMaxSelCount() const\r
1226         {\r
1227                 assert(IsWindow());\r
1228                 return MonthCal_GetMaxSelCount(m_hWnd);\r
1229         }\r
1230 \r
1231         inline CRect CMonthCalendar::GetMinReqRect() const\r
1232         {\r
1233                 assert(IsWindow());\r
1234                 RECT rc;\r
1235                 MonthCal_GetMinReqRect(m_hWnd, &rc);\r
1236                 return rc;\r
1237         }\r
1238 \r
1239         inline int CMonthCalendar::GetMonthDelta() const\r
1240         {\r
1241                 assert(IsWindow());\r
1242                 return MonthCal_GetMonthDelta(m_hWnd);\r
1243         }\r
1244 \r
1245         inline int CMonthCalendar::GetMonthRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange, DWORD dwFlags) const\r
1246         {\r
1247                 assert(IsWindow());\r
1248                 SYSTEMTIME MinMax[2];\r
1249                 memcpy(&MinMax[0], pMinRange, sizeof(SYSTEMTIME));\r
1250                 memcpy(&MinMax[1], pMaxRange, sizeof(SYSTEMTIME));\r
1251                 int nCount = MonthCal_GetMonthRange(m_hWnd, dwFlags, MinMax);\r
1252                 return nCount;\r
1253         }\r
1254 \r
1255         inline DWORD CMonthCalendar::GetRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange) const\r
1256         {\r
1257                 assert(IsWindow());\r
1258                 SYSTEMTIME MinMax[2];\r
1259                 DWORD dwValue = MonthCal_GetRange(m_hWnd, &MinMax);\r
1260                 memcpy(pMinRange, &MinMax[0], sizeof(SYSTEMTIME));\r
1261                 memcpy(pMaxRange, &MinMax[1], sizeof(SYSTEMTIME));\r
1262                 return dwValue;\r
1263         }\r
1264 \r
1265         inline BOOL CMonthCalendar::GetSelRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange) const\r
1266         {\r
1267                 assert(IsWindow());\r
1268                 SYSTEMTIME MinMax[2];\r
1269                 memcpy(&MinMax[0], pMinRange, sizeof(SYSTEMTIME));\r
1270                 memcpy(&MinMax[1], pMaxRange, sizeof(SYSTEMTIME));\r
1271                 return (BOOL)MonthCal_GetSelRange(m_hWnd, &MinMax);\r
1272         }\r
1273 \r
1274         inline BOOL CMonthCalendar::GetToday(LPSYSTEMTIME pDateTime) const\r
1275         {\r
1276                 assert(IsWindow());\r
1277                 return MonthCal_GetToday(m_hWnd, pDateTime);\r
1278         }\r
1279 \r
1280         inline DWORD CMonthCalendar::HitTest(PMCHITTESTINFO pMCHitTest)\r
1281         {\r
1282                 assert(IsWindow());\r
1283                 return (DWORD)MonthCal_HitTest(m_hWnd, pMCHitTest);\r
1284         }\r
1285 \r
1286         inline COLORREF CMonthCalendar::SetColor(int nRegion, COLORREF clr)\r
1287         {\r
1288                 assert(IsWindow());\r
1289                 return (COLORREF)MonthCal_SetColor(m_hWnd, nRegion, clr);\r
1290         }\r
1291 \r
1292         inline BOOL CMonthCalendar::SetCurSel(const LPSYSTEMTIME pDateTime)\r
1293         {\r
1294                 assert(IsWindow());\r
1295                 return MonthCal_SetCurSel(m_hWnd, pDateTime);\r
1296         }\r
1297 \r
1298         inline BOOL CMonthCalendar::SetDayState(int nMonths, LPMONTHDAYSTATE pStates)\r
1299         {\r
1300                 assert(IsWindow());\r
1301                 return (BOOL)MonthCal_SetDayState(m_hWnd, nMonths, pStates);\r
1302         }\r
1303 \r
1304         inline BOOL CMonthCalendar::SetFirstDayOfWeek(int iDay, int* pnOld/* = NULL*/)\r
1305         {\r
1306                 assert(IsWindow());\r
1307                 DWORD dwValue = (DWORD)MonthCal_SetFirstDayOfWeek(m_hWnd, iDay);\r
1308 \r
1309                 if(pnOld)\r
1310                         *pnOld = LOWORD(dwValue);\r
1311 \r
1312                 return (BOOL)HIWORD(dwValue);\r
1313         }\r
1314 \r
1315         inline BOOL CMonthCalendar::SetMaxSelCount(int nMax)\r
1316         {\r
1317                 assert(IsWindow());\r
1318                 return MonthCal_SetMaxSelCount(m_hWnd, nMax);\r
1319         }\r
1320 \r
1321         inline int CMonthCalendar::SetMonthDelta(int iDelta)\r
1322         {\r
1323                 assert(IsWindow());\r
1324                 return MonthCal_SetMonthDelta(m_hWnd, iDelta);\r
1325         }\r
1326 \r
1327         inline BOOL CMonthCalendar::SetRange(const LPSYSTEMTIME pMinRange, const LPSYSTEMTIME pMaxRange)\r
1328         {\r
1329 \r
1330                 SYSTEMTIME MinMax[2];\r
1331                 DWORD dwLimit;\r
1332 \r
1333                 if (pMinRange != NULL)\r
1334                 {\r
1335                         memcpy(&MinMax[0], pMinRange, sizeof(SYSTEMTIME));\r
1336                         dwLimit = GDTR_MIN;\r
1337                 }\r
1338 \r
1339                 if (pMaxRange)\r
1340                 {\r
1341                         memcpy(&MinMax[1], pMaxRange, sizeof(SYSTEMTIME));\r
1342                         dwLimit |= GDTR_MAX;\r
1343                 }\r
1344 \r
1345                 return (BOOL)MonthCal_SetRange(m_hWnd, dwLimit, &MinMax);\r
1346         }\r
1347 \r
1348         inline BOOL CMonthCalendar::SetSelRange(const LPSYSTEMTIME pMinRange, const LPSYSTEMTIME pMaxRange)\r
1349         {\r
1350                 SYSTEMTIME MinMax[2];\r
1351                 memcpy(&MinMax[0], pMinRange, sizeof(SYSTEMTIME));\r
1352                 memcpy(&MinMax[1], pMaxRange, sizeof(SYSTEMTIME));\r
1353                 return (BOOL)MonthCal_SetSelRange(m_hWnd, &MinMax);\r
1354         }\r
1355 \r
1356         inline void CMonthCalendar::SetToday(const LPSYSTEMTIME pDateTime)\r
1357         {\r
1358                 assert(IsWindow());\r
1359                 MonthCal_SetToday(m_hWnd, pDateTime);\r
1360         }\r
1361 \r
1362 \r
1363         ////////////////////////////////////////\r
1364         // Definitions for the CProgressBar class\r
1365         //\r
1366         inline int CProgressBar::GetPos() const\r
1367         // Retrieves the current position of the progress bar.\r
1368         {\r
1369                 assert(IsWindow());\r
1370                 return (int)SendMessage(PBM_GETPOS, 0, 0);\r
1371         }\r
1372 \r
1373         inline int CProgressBar::GetRange(BOOL fWhichLimit, PPBRANGE ppBRange) const\r
1374         // Retrieves information about the current high and low limits of the progress bar control.\r
1375         {\r
1376                 assert(IsWindow());\r
1377                 return (int)SendMessage(PBM_GETRANGE, (WPARAM)fWhichLimit, (LPARAM) (PPBRANGE) ppBRange);\r
1378         }\r
1379 \r
1380         inline int CProgressBar::OffsetPos(int nIncrement) const\r
1381         // Advances the current position of the progress bar by a specified increment and redraws\r
1382         // the bar to reflect the new position.\r
1383         {\r
1384                 assert(IsWindow());\r
1385                 return (int)SendMessage(PBM_DELTAPOS, (WPARAM)nIncrement, 0);\r
1386         }\r
1387 \r
1388         inline int CProgressBar::SetPos(int nNewPos) const\r
1389         // Sets the current position for the progress bar and redraws the bar to reflect the new position.\r
1390         {\r
1391                 assert(IsWindow());\r
1392                 return (int)SendMessage(PBM_SETPOS, (WPARAM)nNewPos, 0);\r
1393         }\r
1394 \r
1395         inline int CProgressBar::SetRange(short nMinRange, short nMaxRange) const\r
1396         // Sets the minimum and maximum values for the progress bar and redraws the bar to reflect the new range.\r
1397         {\r
1398                 assert(IsWindow());\r
1399                 return (int)SendMessage(PBM_SETRANGE, 0, (LPARAM) MAKELPARAM (nMinRange, nMaxRange));\r
1400         }\r
1401 \r
1402         inline int CProgressBar::SetStep(int nStepInc) const\r
1403         // Specifies the step increment for the progress bar.\r
1404         {\r
1405                 assert(IsWindow());\r
1406                 return (int)SendMessage(PBM_SETSTEP, (WPARAM)nStepInc, 0);\r
1407         }\r
1408 \r
1409         inline int CProgressBar::StepIt() const\r
1410         // Advances the current position for a progress bar by the step increment and\r
1411         // redraws the bar to reflect the new position.\r
1412         {\r
1413                 assert(IsWindow());\r
1414                 return (int)SendMessage(PBM_STEPIT, 0, 0);\r
1415         }\r
1416 \r
1417 \r
1418         ////////////////////////////////////////\r
1419         // Definitions for the CScrollBar class\r
1420         //\r
1421         inline BOOL CScrollBar::EnableScrollBar( UINT nArrowFlags )  const\r
1422         // Enables or disables the scroll bar arrows.\r
1423         {\r
1424                 assert(IsWindow());\r
1425                 return ::EnableScrollBar(m_hWnd, SB_CTL, nArrowFlags);\r
1426         }\r
1427 \r
1428         inline BOOL CScrollBar::GetScrollInfo(LPSCROLLINFO lpsi)  const\r
1429         // Retrieves the parameters of a scroll bar, including the minimum and maximum\r
1430         // scrolling positions, the page size, and the position of the scroll box (thumb).\r
1431         {\r
1432                 assert(IsWindow());\r
1433                 return ::GetScrollInfo(m_hWnd, SB_CTL, lpsi);\r
1434         }\r
1435 \r
1436         inline int CScrollBar::GetScrollPos()  const\r
1437         // Retrieves the current position of the scroll box (thumb) in the scroll bar.\r
1438         {\r
1439                 assert(IsWindow());\r
1440                 return ::GetScrollPos(m_hWnd, SB_CTL);\r
1441         }\r
1442 \r
1443         inline BOOL CScrollBar::GetScrollRange(LPINT lpMinPos, LPINT lpMaxPos )  const\r
1444         // Retrieves the current minimum and maximum scroll box (thumb) positions for the scroll bar.\r
1445         {\r
1446                 assert(IsWindow());\r
1447                 return ::GetScrollRange(m_hWnd, SB_CTL, lpMinPos, lpMaxPos);\r
1448         }\r
1449 \r
1450         inline BOOL CScrollBar::SetScrollInfo(LPSCROLLINFO lpsi, BOOL bRedraw )  const\r
1451         // Sets the parameters of the scroll bar, including the minimum and maximum scrolling positions,\r
1452         // the page size, and the position of the scroll box (thumb).\r
1453         {\r
1454                 assert(IsWindow());\r
1455                 return ::SetScrollInfo(m_hWnd, SB_CTL, lpsi, bRedraw);\r
1456         }\r
1457 \r
1458         inline int CScrollBar::SetScrollPos(int nPos, BOOL bRedraw)  const\r
1459         // Sets the position of the scroll box (thumb) in the scroll bar and, if requested,\r
1460         // redraws the scroll bar to reflect the new position of the scroll box.\r
1461         {\r
1462                 assert(IsWindow());\r
1463                 return ::SetScrollPos(m_hWnd, SB_CTL, nPos, bRedraw);\r
1464         }\r
1465 \r
1466         inline BOOL CScrollBar::SetScrollRange( int nMinPos, int nMaxPos, BOOL bRedraw )  const\r
1467         // Sets the minimum and maximum scroll box positions for the scroll bar.\r
1468         {\r
1469                 assert(IsWindow());\r
1470                 return ::SetScrollRange(m_hWnd, SB_CTL, nMinPos, nMaxPos, bRedraw);\r
1471         }\r
1472 \r
1473         inline BOOL CScrollBar::ShowScrollBar(BOOL bShow)  const\r
1474         // Shows or hides the scroll bar.\r
1475         {\r
1476                 assert(IsWindow());\r
1477                 return ::ShowScrollBar(m_hWnd, SB_CTL, bShow);\r
1478         }\r
1479 \r
1480         ////////////////////////////////////////\r
1481         // Definitions for the CSlider class\r
1482         //\r
1483         inline void CSlider::ClearSel() const\r
1484         // Clears the current selection range in the trackbar.\r
1485         {\r
1486                 assert(IsWindow());\r
1487                 SendMessage(TBM_CLEARSEL, 0, 0);\r
1488         }\r
1489 \r
1490         inline void CSlider::ClearTics(BOOL bRedraw) const\r
1491         // Removes the current tick marks from the trackbar.\r
1492         {\r
1493                 assert(IsWindow());\r
1494                 SendMessage(TBM_CLEARTICS, (WPARAM)bRedraw, 0);\r
1495         }\r
1496 \r
1497         inline CWnd* CSlider::GetBuddy(BOOL fLocation) const\r
1498         // Retrieves the handle to the trackbar control buddy window at a given location.\r
1499         {\r
1500                 assert(IsWindow());\r
1501                 return FromHandle((HWND)SendMessage(TBM_GETBUDDY, (WPARAM)fLocation, 0));\r
1502         }\r
1503 \r
1504         inline CRect CSlider::GetChannelRect() const\r
1505         // Retrieves the size and position of the bounding rectangle for the trackbar's channel.\r
1506         {\r
1507                 assert(IsWindow());\r
1508                 CRect rc;\r
1509                 SendMessage(TBM_GETCHANNELRECT, 0, (LPARAM)&rc);\r
1510                 return rc;\r
1511         }\r
1512 \r
1513         inline int  CSlider::GetLineSize() const\r
1514         // Retrieves the number of logical positions the trackbar's slider moves in response\r
1515         // to keyboard input from the arrow keys.\r
1516         {\r
1517                 assert(IsWindow());\r
1518                 return (int)SendMessage(TBM_GETLINESIZE, 0, 0);\r
1519         }\r
1520 \r
1521         inline int  CSlider::GetNumTics() const\r
1522         // Retrieves the number of tick marks in the trackbar.\r
1523         {\r
1524                 assert(IsWindow());\r
1525                 return (int)SendMessage(TBM_GETNUMTICS, 0, 0);\r
1526         }\r
1527 \r
1528         inline int  CSlider::GetPageSize() const\r
1529         // Retrieves the number of logical positions the trackbar's slider moves in response to\r
1530         // keyboard input, or mouse input, such as clicks in the trackbar's channel.\r
1531         {\r
1532                 assert(IsWindow());\r
1533                 return (int)SendMessage(TBM_GETPAGESIZE, 0, 0);\r
1534         }\r
1535 \r
1536         inline int  CSlider::GetPos() const\r
1537         // Retrieves the current logical position of the slider in the trackbar.\r
1538         {\r
1539                 assert(IsWindow());\r
1540                 return (int)SendMessage(TBM_GETPOS, 0, 0);\r
1541         }\r
1542 \r
1543         inline int  CSlider::GetRangeMax() const\r
1544         // Retrieves the maximum position for the slider in the trackbar.\r
1545         {\r
1546                 assert(IsWindow());\r
1547                 return (int)SendMessage(TBM_GETRANGEMAX, 0, 0);\r
1548         }\r
1549 \r
1550         inline int  CSlider::GetRangeMin() const\r
1551         // Retrieves the minimum position for the slider in the trackbar.\r
1552         {\r
1553                 assert(IsWindow());\r
1554                 return (int)SendMessage(TBM_GETRANGEMIN, 0, 0);\r
1555         }\r
1556 \r
1557         inline int  CSlider::GetSelEnd() const\r
1558         // Retrieves the ending position of the current selection range in the trackbar.\r
1559         {\r
1560                 assert(IsWindow());\r
1561                 return (int)SendMessage(TBM_GETSELEND, 0, 0);\r
1562         }\r
1563 \r
1564         inline int  CSlider::GetSelStart() const\r
1565         // Retrieves the starting position of the current selection range in the trackbar.\r
1566         {\r
1567                 assert(IsWindow());\r
1568                 return (int)SendMessage(TBM_GETSELSTART, 0, 0);\r
1569         }\r
1570 \r
1571         inline int  CSlider::GetThumbLength() const\r
1572         // Retrieves the length of the slider in the trackbar.\r
1573         {\r
1574                 assert(IsWindow());\r
1575                 return (int)SendMessage(TBM_GETTHUMBLENGTH, 0, 0);\r
1576         }\r
1577 \r
1578         inline CRect CSlider::GetThumbRect() const\r
1579         // Retrieves the size and position of the bounding rectangle for the slider in the trackbar.\r
1580         {\r
1581                 CRect rc;\r
1582                 SendMessage(TBM_GETTHUMBRECT, 0, (LPARAM)&rc);\r
1583                 return rc;\r
1584         }\r
1585 \r
1586         inline int CSlider::GetTic(int nTic ) const\r
1587         // Retrieves the logical position of a tick mark in the trackbar.\r
1588         {\r
1589                 assert(IsWindow());\r
1590                 return (int)SendMessage(TBM_GETTIC, (WPARAM)nTic, 0);\r
1591         }\r
1592 \r
1593         inline int  CSlider::GetTicPos(int nTic) const\r
1594         // Retrieves the current physical position of a tick mark in the trackbar.\r
1595         {\r
1596                 assert(IsWindow());\r
1597                 return (int)SendMessage(TBM_GETTICPOS, (WPARAM)nTic, 0);\r
1598         }\r
1599 \r
1600         inline CToolTip* CSlider::GetToolTips() const\r
1601         // Retrieves the handle to the ToolTip control assigned to the trackbar, if any.\r
1602         {\r
1603                 assert(IsWindow());\r
1604                 return (CToolTip*)FromHandle((HWND)SendMessage(TBM_GETTOOLTIPS, 0, 0));\r
1605         }\r
1606 \r
1607         inline CWnd* CSlider::SetBuddy(CWnd* pBuddy, BOOL fLocation /*= TRUE*/ ) const\r
1608         // Assigns a window as the buddy window for the trackbar control.\r
1609         {\r
1610                 assert(IsWindow());\r
1611                 return FromHandle((HWND)SendMessage(TBM_SETBUDDY, (WPARAM)fLocation, (LPARAM)pBuddy->GetHwnd()));\r
1612         }\r
1613 \r
1614         inline int  CSlider::SetLineSize(int nSize) const\r
1615         // Sets the number of logical positions the trackbar's slider moves in response to\r
1616         // keyboard input from the arrow keys.\r
1617         {\r
1618                 assert(IsWindow());\r
1619                 return(int)SendMessage(TBM_SETLINESIZE, 0, (LPARAM)nSize);\r
1620         }\r
1621 \r
1622         inline int  CSlider::SetPageSize(int nSize) const\r
1623         // Sets the number of logical positions the trackbar's slider moves in response to\r
1624         // keyboard input, or mouse input such as clicks in the trackbar's channel.\r
1625         {\r
1626                 assert(IsWindow());\r
1627                 return(int)SendMessage(TBM_SETPAGESIZE, 0, (LPARAM)nSize);\r
1628         }\r
1629 \r
1630         inline void CSlider::SetPos(int nPos, BOOL bRedraw) const\r
1631         // Sets the current logical position of the slider in the trackbar.\r
1632         {\r
1633                 assert(IsWindow());\r
1634                 SendMessage(TBM_SETPOS, (WPARAM)bRedraw, (LPARAM)nPos);\r
1635         }\r
1636 \r
1637         inline void CSlider::SetRangeMax(int nMax, BOOL bRedraw) const\r
1638         // Sets the maximum logical position for the slider in the trackbar.\r
1639         {\r
1640                 assert(IsWindow());\r
1641                 SendMessage(TBM_SETRANGEMAX, (WPARAM)bRedraw, (LPARAM)nMax);\r
1642         }\r
1643 \r
1644         inline void CSlider::SetRangeMin(int nMax, BOOL bRedraw) const\r
1645         // Sets the minimum logical position for the slider in the trackbar.\r
1646         {\r
1647                 assert(IsWindow());\r
1648                 SendMessage(TBM_SETRANGEMIN, (WPARAM)bRedraw, (LPARAM)nMax);\r
1649         }\r
1650 \r
1651         inline void CSlider::SetSelection(int nMin, int nMax, BOOL bRedraw) const\r
1652         // Sets the starting and ending positions for the available selection range in the trackbar.\r
1653         {\r
1654                 assert(IsWindow());\r
1655                 SendMessage(TBM_SETSEL, (WPARAM)bRedraw, (LPARAM)MAKELONG(nMax, nMin));\r
1656         }\r
1657 \r
1658         inline BOOL CSlider::SetTic(int nTic) const\r
1659         // Sets a tick mark in the trackbar at the specified logical position.\r
1660         {\r
1661                 assert(IsWindow());\r
1662                 return (BOOL)SendMessage(TBM_SETTIC, 0, nTic);\r
1663         }\r
1664 \r
1665         inline void CSlider::SetTicFreq(int nFreq)  const\r
1666         // Sets the interval frequency for tick marks in the trackbar.\r
1667         {\r
1668                 assert(IsWindow());\r
1669                 SendMessage(TBM_SETTICFREQ, (WPARAM)nFreq, 0);\r
1670         }\r
1671 \r
1672         inline int  CSlider::SetTipSide(int nLocation) const\r
1673         // Positions a ToolTip control used by the trackbar control.\r
1674         {\r
1675                 assert(IsWindow());\r
1676                 return (int)SendMessage(TBM_SETTIPSIDE, (WPARAM)nLocation, 0);\r
1677         }\r
1678 \r
1679         inline void CSlider::SetToolTips(CToolTip* pToolTip) const\r
1680         // Assigns a ToolTip control to the trackbar control.\r
1681         {\r
1682                 assert(IsWindow());\r
1683                 HWND hToolTip = pToolTip? pToolTip->GetHwnd() : 0;\r
1684                 SendMessage(TBM_SETTOOLTIPS, (WPARAM)hToolTip, 0);\r
1685         }\r
1686 \r
1687         ////////////////////////////////////////\r
1688         // Definitions for the CSpinButton class\r
1689         //\r
1690         inline int CSpinButton::GetAccel(int cAccels, LPUDACCEL paAccels) const\r
1691         // Retrieves acceleration information for the up-down control.\r
1692         {\r
1693                 assert(IsWindow());\r
1694                 return (int)SendMessage(UDM_GETACCEL, (WPARAM)cAccels, (LPARAM)paAccels);\r
1695         }\r
1696 \r
1697         inline int CSpinButton::GetBase() const\r
1698         // Retrieves the current radix base (that is, either base 10 or 16) for the up-down control.\r
1699         {\r
1700                 assert(IsWindow());\r
1701                 return (int)SendMessage(UDM_GETBASE, 0, 0);\r
1702         }\r
1703 \r
1704         inline CWnd* CSpinButton::GetBuddy() const\r
1705         // Retrieves the handle to the current buddy window.\r
1706         {\r
1707                 assert(IsWindow());\r
1708                 return FromHandle((HWND)SendMessage(UDM_GETBUDDY, 0, 0));\r
1709         }\r
1710 \r
1711         inline int CSpinButton::GetPos() const\r
1712         // Retrieves the current position of the up-down control with 16-bit precision.\r
1713         {\r
1714                 assert(IsWindow());\r
1715                 return (int)SendMessage(UDM_GETPOS, 0, 0);\r
1716         }\r
1717 \r
1718         inline DWORD CSpinButton::GetRange() const\r
1719         // Retrieves the minimum and maximum positions (range) for the up-down control.\r
1720         {\r
1721                 assert(IsWindow());\r
1722                 return (DWORD)SendMessage(UDM_GETRANGE, 0, 0);\r
1723         }\r
1724 \r
1725         inline void CSpinButton::PreCreate(CREATESTRUCT &cs)\r
1726     {\r
1727                 cs.style = WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VISIBLE |UDS_SETBUDDYINT;\r
1728         }\r
1729 \r
1730         inline void CSpinButton::PreRegisterClass(WNDCLASS &wc)\r
1731         {\r
1732                 wc.lpszClassName = UPDOWN_CLASS;\r
1733         }\r
1734 \r
1735         inline BOOL CSpinButton::SetAccel(int cAccels, LPUDACCEL paAccels) const\r
1736         // Sets the acceleration for the up-down control.\r
1737         {\r
1738                 assert(IsWindow());\r
1739                 return (BOOL)SendMessage(UDM_SETACCEL, (WPARAM)cAccels, (LPARAM)paAccels);\r
1740         }\r
1741 \r
1742         inline int CSpinButton::SetBase(int nBase) const\r
1743         // Sets the radix base for the up-down control.\r
1744         {\r
1745                 assert(IsWindow());\r
1746                 return (int)SendMessage(UDM_SETBASE, (WPARAM)nBase, 0);\r
1747         }\r
1748 \r
1749         inline CWnd* CSpinButton::SetBuddy(CWnd* pBuddy) const\r
1750         // Sets the buddy window for the up-down control.\r
1751         {\r
1752                 assert(IsWindow());\r
1753                 return FromHandle((HWND)SendMessage(UDM_SETBUDDY, (WPARAM)pBuddy->GetHwnd(), 0));\r
1754         }\r
1755 \r
1756         inline int CSpinButton::SetPos(int nPos) const\r
1757         // Sets the current position for the up-down control with 16-bit precision.\r
1758         {\r
1759                 assert(IsWindow());\r
1760                 return (int)SendMessage(UDM_SETPOS, 0, (LPARAM)MAKELONG ((short) nPos, 0));\r
1761         }\r
1762 \r
1763         inline void CSpinButton::SetRange(int nLower, int nUpper) const\r
1764         // Sets the minimum and maximum positions (range) for the up-down control.\r
1765         {\r
1766                 assert(IsWindow());\r
1767                 SendMessage(UDM_SETRANGE, 0, (LPARAM)MAKELONG(nUpper, nLower));\r
1768         }\r
1769 \r
1770         ////////////////////////////////////////\r
1771         // Definitions for the CToolTip class\r
1772         //\r
1773 \r
1774         inline CToolTip::CToolTip()\r
1775         {}\r
1776 \r
1777         inline CToolTip::~CToolTip()\r
1778         {}\r
1779 \r
1780         inline void CToolTip::Activate(BOOL bActivate)\r
1781         // Activates or deactivates a ToolTip control.\r
1782         {\r
1783                 assert(IsWindow());\r
1784                 SendMessage(TTM_ACTIVATE, bActivate, 0);\r
1785         }\r
1786 \r
1787         inline BOOL CToolTip::AddTool(CWnd* pWnd, UINT nIDText, LPCRECT lpRectTool /*= NULL*/, UINT_PTR nIDTool /*= 0*/)\r
1788         // Registers a tool with a ToolTip control.\r
1789         {\r
1790                 assert(IsWindow());\r
1791                 assert(pWnd);\r
1792                 TOOLINFO ti;\r
1793                 LoadToolInfo(ti, pWnd, nIDTool);\r
1794                 ti.hinst = GetApp()->GetResourceHandle();\r
1795                 ti.lpszText = (LPTSTR)MAKEINTRESOURCE(nIDText);\r
1796                 if (lpRectTool)\r
1797                         ti.rect = *lpRectTool;\r
1798                 return (BOOL)SendMessage(TTM_ADDTOOL, 0, (LPARAM)&ti);\r
1799         }\r
1800 \r
1801         inline BOOL CToolTip::AddTool(CWnd* pWnd, LPCTSTR lpszText /*= LPSTR_TEXTCALLBACK*/, LPCRECT lpRectTool /*= NULL*/, UINT_PTR nIDTool /*= 0*/)\r
1802         // Registers a tool with a ToolTip control.\r
1803         {\r
1804                 assert(IsWindow());\r
1805                 assert(pWnd);\r
1806                 TOOLINFO ti;\r
1807                 LoadToolInfo(ti, pWnd, nIDTool);\r
1808                 ti.lpszText = (LPTSTR)lpszText;\r
1809                 if (lpRectTool)\r
1810                         ti.rect = *lpRectTool;\r
1811                 return (BOOL)SendMessage(TTM_ADDTOOL, 0, (LPARAM)&ti);\r
1812         }\r
1813 \r
1814         inline void CToolTip::DelTool(CWnd* pWnd, UINT_PTR nIDTool /*= 0*/)\r
1815         // Removes a tool from a ToolTip control.\r
1816         {\r
1817                 assert(IsWindow());\r
1818                 TOOLINFO ti;\r
1819                 LoadToolInfo(ti, pWnd, nIDTool);\r
1820                 SendMessage(TTM_DELTOOL, 0, (LPARAM)&ti);\r
1821         }\r
1822 \r
1823         inline int CToolTip::GetDelayTime(DWORD dwDuration) const\r
1824         // Retrieves the initial, pop-up, and reshow durations currently set for a ToolTip control.\r
1825         {\r
1826                 assert(IsWindow());\r
1827                 return (int)SendMessage(TTM_GETDELAYTIME, dwDuration, 0);\r
1828         }\r
1829 \r
1830         inline void CToolTip::GetMargin(LPRECT lprc) const\r
1831         // Retrieves the top, left, bottom, and right margins set for a ToolTip window.\r
1832         {\r
1833                 assert(IsWindow());\r
1834                 SendMessage(TTM_GETMARGIN, 0, (LPARAM)lprc);\r
1835         }\r
1836 \r
1837         inline int CToolTip::GetMaxTipWidth() const\r
1838         // Retrieves the maximum width for a ToolTip window.\r
1839         {\r
1840                 assert(IsWindow());\r
1841                 return (int)SendMessage(TTM_GETMAXTIPWIDTH, 0, 0);\r
1842         }\r
1843 \r
1844         inline void CToolTip::GetText(CString& str, CWnd* pWnd, UINT_PTR nIDTool /*= 0*/) const\r
1845         // Retrieves the information a ToolTip control maintains about a tool.\r
1846         {\r
1847                 assert(IsWindow());\r
1848                 assert(pWnd);\r
1849                 LPTSTR pszText = str.GetBuffer(80);     // Maximum allowed Tooltip is 80 characters for Windows XP and below\r
1850                 TOOLINFO ti;\r
1851                 LoadToolInfo(ti, pWnd, nIDTool);\r
1852                 ti.lpszText = pszText;\r
1853                 SendMessage(TTM_GETTEXT, 0, (LPARAM)&ti);\r
1854                 str.ReleaseBuffer();\r
1855         }\r
1856 \r
1857         inline COLORREF CToolTip::GetTipBkColor() const\r
1858         // Retrieves the background color in a ToolTip window.\r
1859         {\r
1860                 assert(IsWindow());\r
1861                 return (COLORREF)SendMessage(TTM_GETTIPBKCOLOR, 0,0);\r
1862         }\r
1863 \r
1864         inline COLORREF CToolTip::GetTipTextColor() const\r
1865         // Retrieves the text color in a ToolTip window.\r
1866         {\r
1867                 assert(IsWindow());\r
1868                 return (COLORREF)SendMessage(TTM_GETTIPTEXTCOLOR, 0, 0);\r
1869         }\r
1870 \r
1871         inline int CToolTip::GetToolCount() const\r
1872         // Retrieves a count of the tools maintained by a ToolTip control.\r
1873         {\r
1874                 assert(IsWindow());\r
1875                 return (int)SendMessage(TTM_GETTOOLCOUNT, 0, 0);\r
1876         }\r
1877 \r
1878         inline BOOL CToolTip::GetToolInfo(TOOLINFO& ToolInfo, CWnd* pWnd, UINT_PTR nIDTool /*= 0*/) const\r
1879         // Retrieves the information that a ToolTip control maintains about a tool.\r
1880         {\r
1881                 assert(IsWindow());\r
1882                 assert(pWnd);\r
1883                 LoadToolInfo(ToolInfo, pWnd, nIDTool);\r
1884                 return (BOOL)SendMessage(TTM_GETTOOLINFO, 0, (LPARAM)&ToolInfo);\r
1885         }\r
1886 \r
1887         inline BOOL CToolTip::HitTest(CWnd* pWnd, CPoint pt, LPTOOLINFO lpToolInfo) const\r
1888         // Tests a point to determine whether it is within the bounding rectangle of the \r
1889         //  specified tool and, if it is, retrieves information about the tool.\r
1890         {\r
1891                 assert(IsWindow());\r
1892                 assert(pWnd);\r
1893                 assert(lpToolInfo);\r
1894                 TTHITTESTINFO hti = {0};\r
1895                 hti.hwnd = pWnd->GetHwnd();\r
1896                 hti.pt = pt;\r
1897                 hti.ti = *lpToolInfo;\r
1898                 return (BOOL)SendMessage(TTM_HITTEST, 0, (LPARAM)&hti);\r
1899         }\r
1900 \r
1901         inline void CToolTip::LoadToolInfo(TOOLINFO& ti, CWnd* pWnd, UINT_PTR nIDTool) const\r
1902         {\r
1903                 ZeroMemory(&ti, sizeof(TOOLINFO));\r
1904                 ti.cbSize = sizeof(TOOLINFO);\r
1905                 HWND hWnd = pWnd->GetHwnd();\r
1906                 if (nIDTool == 0)\r
1907                 {\r
1908                         ti.hwnd = ::GetParent(hWnd);\r
1909                         ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS;\r
1910                         ti.uId = (UINT)hWnd;\r
1911                 }\r
1912                 else\r
1913                 {\r
1914                         ti.hwnd = hWnd;\r
1915                         ti.uId = nIDTool;\r
1916                 }\r
1917         }\r
1918 \r
1919         inline void CToolTip::Pop()\r
1920         // Removes a displayed ToolTip window from view.\r
1921         {\r
1922                 assert(IsWindow());\r
1923                 SendMessage(TTM_POP, 0, 0);\r
1924         }\r
1925 \r
1926         inline void CToolTip::RelayEvent(LPMSG lpMsg)\r
1927         // Passes a mouse message to a ToolTip control for processing.\r
1928         {\r
1929                 assert(IsWindow());\r
1930                 SendMessage(TTM_RELAYEVENT, 0, (LPARAM)lpMsg);\r
1931         }\r
1932 \r
1933         inline void CToolTip::SetDelayTime(UINT nDelay)\r
1934         // Sets the initial delay for a ToolTip control.\r
1935         {\r
1936                 assert(IsWindow());\r
1937                 SendMessage(TTM_SETDELAYTIME, TTDT_INITIAL, nDelay);\r
1938         }\r
1939 \r
1940         inline void CToolTip::SetDelayTime(DWORD dwDuration, int iTime)\r
1941         // Sets the initial, pop-up, and reshow durations for a ToolTip control.\r
1942         {\r
1943                 assert(IsWindow());\r
1944                 SendMessage(TTM_SETDELAYTIME, dwDuration, iTime);\r
1945         }\r
1946 \r
1947         inline void CToolTip::SetMargin(LPRECT lprc)\r
1948         // Sets the top, left, bottom, and right margins for a ToolTip window.\r
1949         {\r
1950                 assert(IsWindow());\r
1951                 assert(lprc);\r
1952                 SendMessage(TTM_SETMARGIN, 0, (LPARAM)lprc);\r
1953         }\r
1954 \r
1955         inline int CToolTip::SetMaxTipWidth(int iWidth)\r
1956         // Sets the maximum width for a ToolTip window.\r
1957         {\r
1958                 assert(IsWindow());\r
1959                 return (int)SendMessage(TTM_SETMAXTIPWIDTH, 0, iWidth);\r
1960         }\r
1961 \r
1962         inline void CToolTip::SetTipBkColor(COLORREF clr)\r
1963         // Sets the background color in a ToolTip window.\r
1964         // Ignored when XP themes are active.\r
1965         {\r
1966                 assert(IsWindow());\r
1967                 SendMessage(TTM_SETTIPBKCOLOR, clr, 0);\r
1968         }\r
1969 \r
1970         inline void CToolTip::SetTipTextColor(COLORREF clr)\r
1971         // Sets the text color in a ToolTip window.\r
1972         // Ignored when XP themes are active.\r
1973         {\r
1974                 assert(IsWindow());\r
1975                 SendMessage(TTM_SETTIPTEXTCOLOR, clr, 0);\r
1976         }\r
1977 \r
1978         inline void CToolTip::SetToolInfo(LPTOOLINFO lpToolInfo)\r
1979         // Sets the information that a ToolTip control maintains for a tool.\r
1980         {\r
1981                 assert(IsWindow());\r
1982                 SendMessage(TTM_SETTOOLINFO, 0, (LPARAM)lpToolInfo);\r
1983         }\r
1984 \r
1985         inline void CToolTip::SetToolRect(CWnd* pWnd, UINT_PTR nIDTool, LPCRECT lpRect)\r
1986         // Sets a new bounding rectangle for a tool.\r
1987         {\r
1988                 assert(IsWindow());\r
1989                 assert(pWnd);\r
1990                 assert(lpRect);\r
1991                 TOOLINFO ti;\r
1992                 LoadToolInfo(ti, pWnd, nIDTool);\r
1993                 ti.rect = *lpRect;\r
1994                 SendMessage(TTM_NEWTOOLRECT, 0, (LPARAM)&ti);\r
1995         }\r
1996 \r
1997         inline void CToolTip::Update()\r
1998         // Forces the current tool to be redrawn.\r
1999         {\r
2000                 assert(IsWindow());\r
2001                 SendMessage(TTM_UPDATE, 0, 0);\r
2002         }\r
2003 \r
2004         inline void CToolTip::UpdateTipText(LPCTSTR lpszText, CWnd* pWnd, UINT_PTR nIDTool /*= 0*/)\r
2005         // Sets the ToolTip text for a tool.\r
2006         {\r
2007                 assert(IsWindow());\r
2008                 assert(pWnd);\r
2009                 TOOLINFO ti;\r
2010                 LoadToolInfo(ti, pWnd, nIDTool);\r
2011                 ti.lpszText = (LPTSTR)lpszText;\r
2012                 SendMessage(TTM_UPDATETIPTEXT, 0, (LPARAM)&ti);\r
2013         }\r
2014 \r
2015         inline void CToolTip::UpdateTipText(UINT nIDText, CWnd* pWnd, UINT_PTR nIDTool /*= 0*/)\r
2016         // Sets the ToolTip text for a tool.\r
2017         {\r
2018                 assert(IsWindow());\r
2019                 assert(pWnd);\r
2020                 TOOLINFO ti;\r
2021                 LoadToolInfo(ti, pWnd, nIDTool);\r
2022                 ti.hinst = GetApp()->GetResourceHandle();\r
2023                 ti.lpszText = (LPTSTR)MAKEINTRESOURCE(nIDText);\r
2024                 SendMessage(TTM_UPDATETIPTEXT, 0, (LPARAM)&ti);\r
2025         }\r
2026 \r
2027 #if (defined TTM_SETTITLE) && (_WIN32_IE >=0x0500)\r
2028         inline BOOL CToolTip::AdjustRect(LPRECT lprc, BOOL bLarger /*= TRUE*/)\r
2029         // Calculates a ToolTip control's text display rectangle from its window rectangle, or the \r
2030         //  ToolTip window rectangle needed to display a specified text display rectangle.\r
2031         {\r
2032                 assert(IsWindow());\r
2033                 return (BOOL)SendMessage(TTM_ADJUSTRECT, bLarger, (LPARAM)lprc);\r
2034         }\r
2035 \r
2036         inline CSize CToolTip::GetBubbleSize(LPTOOLINFO lpToolInfo) const\r
2037         // Returns the width and height of a ToolTip control.\r
2038         {\r
2039                 assert(IsWindow());\r
2040                 LRESULT lr = SendMessage(TTM_GETBUBBLESIZE, (LPARAM)lpToolInfo);\r
2041                 CSize sz(LOWORD(lr), HIWORD(lr));\r
2042                 return sz;\r
2043         }\r
2044 \r
2045         inline BOOL CToolTip::SetTitle(UINT uIcon, LPCTSTR lpstrTitle)\r
2046         // Adds a standard icon and title string to a ToolTip.\r
2047         {\r
2048                 assert(IsWindow());\r
2049                 return (BOOL)SendMessage(TTM_SETTITLE, uIcon, (LPARAM)lpstrTitle);\r
2050         }\r
2051 #endif\r
2052 \r
2053 #if (defined TTM_SETWINDOWTHEME) && (WINVER >= 0x0501)\r
2054         inline HRESULT CToolTip::SetWindowTheme(LPCWSTR lpstrTheme)\r
2055         // Sets the visual style of a ToolTip control.\r
2056         {\r
2057                 assert(IsWindow());\r
2058                 SendMessage(TTM_SETWINDOWTHEME, 0, (LPARAM)lpstrTheme);\r
2059         }\r
2060 #endif\r
2061 \r
2062 \r
2063 } // namespace Win32xx\r
2064 \r
2065 #endif //  define _WIN32XX_CONTROLS_H_\r
2066 \r

UCC git Repository :: git.ucc.asn.au