|
|
1.1 root 1: // Microsoft Foundation Classes C++ library.
2: // Copyright (C) 1992 Microsoft Corporation,
3: // All rights reserved.
4:
5: // This source code is only intended as a supplement to the
6: // Microsoft Foundation Classes Reference and Microsoft
7: // QuickHelp documentation provided with the library.
8: // See these sources for detailed information regarding the
9: // Microsoft Foundation Classes product.
10:
11: #ifndef __AFXWIN_INL__
12: #define __AFXWIN_INL__
13:
14: #ifdef _DEBUG
15: extern char BASED_CODE _afxSzAfxWinInl[]; // defined in dumpcont.cpp
16: #undef THIS_FILE
17: #define THIS_FILE _afxSzAfxWinInl
18: #endif
19:
20: // Global helper functions
21: inline CWinApp* AfxGetApp()
22: { return afxCurrentWinApp; }
23: inline HINSTANCE AfxGetInstanceHandle()
24: { ASSERT(afxCurrentInstanceHandle != NULL);
25: return (HINSTANCE)afxCurrentInstanceHandle; }
26: inline HINSTANCE AfxGetResourceHandle()
27: { ASSERT(afxCurrentResourceHandle != NULL);
28: return (HINSTANCE)afxCurrentResourceHandle; }
29: inline const char* AfxGetAppName()
30: { ASSERT(afxCurrentAppName != NULL); return afxCurrentAppName; }
31:
32: // CSize inline functions
33: inline CSize::CSize()
34: { /* random filled */ }
35: inline CSize::CSize(int initCX, int initCY)
36: { cx = initCX; cy = initCY; }
37: inline CSize::CSize(SIZE initSize)
38: { *(SIZE*)this = initSize; }
39: inline CSize::CSize(POINT initPt)
40: { *(POINT*)this = initPt; }
41: inline CSize::CSize(DWORD dwSize)
42: #ifdef _NTWIN
1.1.1.2 root 43: { cx = (short)LOWORD(dwSize); cy = (short)HIWORD(dwSize); }
1.1 root 44: #else
45: { *(DWORD*)this = dwSize; }
46: #endif
47: inline BOOL CSize::operator==(SIZE size) const
48: { return (cx == size.cx && cy == size.cy); }
49: inline BOOL CSize::operator!=(SIZE size) const
50: { return (cx != size.cx || cy != size.cy); }
51: inline void CSize::operator+=(SIZE size)
52: { cx += size.cx; cy += size.cy; }
53: inline void CSize::operator-=(SIZE size)
54: { cx -= size.cx; cy -= size.cy; }
55: inline CSize CSize::operator+(SIZE size) const
56: { return CSize(cx + size.cx, cy + size.cy); }
57: inline CSize CSize::operator-(SIZE size) const
58: { return CSize(cx - size.cx, cy - size.cy); }
59:
60: // CPoint inline functions
61: inline CPoint::CPoint()
62: { /* random filled */ }
63: inline CPoint::CPoint(int initX, int initY)
64: { x = initX; y = initY; }
65: inline CPoint::CPoint(POINT initPt)
66: { *(POINT*)this = initPt; }
67: inline CPoint::CPoint(SIZE initSize)
68: { *(SIZE*)this = initSize; }
69: inline CPoint::CPoint(DWORD dwPoint)
70: #ifdef _NTWIN
1.1.1.2 root 71: { x = (short)LOWORD(dwPoint); y = (short)HIWORD(dwPoint); }
1.1 root 72: #else
73: { *(DWORD*)this = dwPoint; }
74: #endif
75: inline void CPoint::Offset(int xOffset, int yOffset)
76: { x += xOffset; y += yOffset; }
77: inline void CPoint::Offset(POINT point)
78: { x += point.x; y += point.y; }
79: inline void CPoint::Offset(SIZE size)
80: { x += size.cx; y += size.cy; }
81: inline BOOL CPoint::operator==(POINT point) const
82: { return (x == point.x && y == point.y); }
83: inline BOOL CPoint::operator!=(POINT point) const
84: { return (x != point.x || y != point.y); }
85: inline void CPoint::operator+=(SIZE size)
86: { x += size.cx; y += size.cy; }
87: inline void CPoint::operator-=(SIZE size)
88: { x -= size.cx; y -= size.cy; }
89: inline CPoint CPoint::operator+(SIZE size) const
90: { return CPoint(x + size.cx, y + size.cy); }
91: inline CPoint CPoint::operator-(SIZE size) const
92: { return CPoint(x - size.cx, y - size.cy); }
93: inline CSize CPoint::operator-(POINT point) const
94: { return CSize(x - point.x, y - point.y); }
95:
96:
97: // CRect inline functions
98: inline CRect::CRect()
99: { /* random filled */ }
100: inline CRect::CRect(int l, int t, int r, int b)
101: { left = l; top = t; right = r; bottom = b; }
102: inline CRect::CRect(const RECT& srcRect)
103: { ::CopyRect((LPRECT)this, (LPRECT)&srcRect); }
104: inline CRect::CRect(LPRECT lpSrcRect)
105: { ::CopyRect((LPRECT)this, lpSrcRect); }
106: inline CRect::CRect(POINT point, SIZE size)
107: { left = point.x; top = point.y;
108: right = point.x + size.cx; bottom = point.y + size.cy; }
109: inline int CRect::Width() const
110: { return right - left; }
111: inline int CRect::Height() const
112: { return bottom - top; }
113: inline CSize CRect::Size() const
114: { return CSize(right - left, bottom - top); }
115: inline CPoint& CRect::TopLeft()
116: { return *((CPoint*)this); }
117: inline CPoint& CRect::BottomRight()
118: { return *((CPoint*)this+1); }
119: inline CRect::operator LPRECT()
120: { return (LPRECT)this; }
121: inline BOOL CRect::IsRectEmpty() const
122: { return ::IsRectEmpty((LPRECT)this); }
123: inline BOOL CRect::IsRectNull() const
124: { return (left == 0 && right == 0 && top == 0 && bottom == 0); }
125: inline BOOL CRect::PtInRect(POINT point) const
126: { return ::PtInRect((LPRECT)this, point); }
127: inline void CRect::SetRect(int x1, int y1, int x2, int y2)
128: { ::SetRect((LPRECT)this, x1, y1, x2, y2); }
129: inline void CRect::SetRectEmpty()
130: { ::SetRectEmpty((LPRECT)this); }
131: inline void CRect::CopyRect(LPRECT lpSrcRect)
132: { ::CopyRect((LPRECT)this, lpSrcRect); }
133: inline BOOL CRect::EqualRect(LPRECT lpRect) const
134: { return ::EqualRect((LPRECT)this, lpRect); }
135: inline void CRect::InflateRect(int x, int y)
136: { ::InflateRect((LPRECT)this, x, y); }
137: inline void CRect::InflateRect(SIZE size)
138: { ::InflateRect((LPRECT)this, size.cx, size.cy); }
139: inline void CRect::OffsetRect(int x, int y)
140: { ::OffsetRect((LPRECT)this, x, y); }
141: inline void CRect::OffsetRect(POINT point)
142: { ::OffsetRect((LPRECT)this, point.x, point.y); }
143: inline void CRect::OffsetRect(SIZE size)
144: { ::OffsetRect((LPRECT)this, size.cx, size.cy); }
145: inline int CRect::IntersectRect(LPRECT lpRect1, LPRECT lpRect2)
146: { return ::IntersectRect((LPRECT)this, lpRect1, lpRect2);}
147: inline int CRect::UnionRect(LPRECT lpRect1, LPRECT lpRect2)
148: { return ::UnionRect((LPRECT)this, lpRect1, lpRect2); }
149: inline void CRect::operator=(const RECT& srcRect)
150: { ::CopyRect((LPRECT)this, (LPRECT)&srcRect); }
151: inline BOOL CRect::operator==(const RECT& rect) const
152: { return ::EqualRect((LPRECT)this, (LPRECT)&rect); }
153: inline BOOL CRect::operator!=(const RECT& rect) const
154: { return !::EqualRect((LPRECT)this, (LPRECT)&rect); }
155: inline void CRect::operator+=(POINT point)
156: { ::OffsetRect((LPRECT)this, point.x, point.y); }
157: inline void CRect::operator-=(POINT point)
158: { ::OffsetRect((LPRECT)this, -point.x, -point.y); }
159: inline void CRect::operator&=(const RECT& rect)
160: { ::IntersectRect((LPRECT)this, this, (LPRECT)&rect); }
161: inline void CRect::operator|=(const RECT& rect)
162: { ::UnionRect((LPRECT)this, this, (LPRECT)&rect); }
163: inline CRect CRect::operator+(POINT pt) const
164: { CRect rect(*this); ::OffsetRect(&rect, pt.x, pt.y); return rect; }
165: inline CRect CRect::operator-(POINT pt) const
166: { CRect rect(*this); ::OffsetRect(&rect, -pt.x, -pt.y); return rect; }
167: inline CRect CRect::operator&(const RECT& rect2) const
168: { CRect rect; ::IntersectRect(&rect, (LPRECT)this, (LPRECT)&rect2);
169: return rect; }
170: inline CRect CRect::operator|(const RECT& rect2) const
171: { CRect rect; ::UnionRect(&rect, (LPRECT)this, (LPRECT)&rect2);
172: return rect; }
173: #if (WINVER >= 0x030a)
174: inline BOOL CRect::SubtractRect(LPRECT lpRectSrc1, LPRECT lpRectSrc2)
175: { return ::SubtractRect((LPRECT)this, lpRectSrc1, lpRectSrc2); }
176: #endif /* WINVER >= 0x030a */
177:
178: inline CArchive& operator<<(CArchive& ar, SIZE size)
179: { ar.Write(&size, sizeof(SIZE));
180: return ar; }
181: inline CArchive& operator<<(CArchive& ar, POINT point)
182: { ar.Write(&point, sizeof(POINT));
183: return ar; }
184: inline CArchive& operator<<(CArchive& ar, const RECT& rect)
185: { ar.Write(&rect, sizeof(RECT));
186: return ar; }
187: inline CArchive& operator>>(CArchive& ar, SIZE& size)
188: { ar.Read(&size, sizeof(SIZE));
189: return ar; }
190: inline CArchive& operator>>(CArchive& ar, POINT& point)
191: { ar.Read(&point, sizeof(POINT));
192: return ar; }
193: inline CArchive& operator>>(CArchive& ar, RECT& rect)
194: { ar.Read(&rect, sizeof(RECT));
195: return ar; }
196:
197:
198: // CResourceException inline functions
199: inline CResourceException::CResourceException()
200: { }
201:
202: // CGdiObject inline functions
203: inline HANDLE CGdiObject::GetSafeHandle() const
204: { return this == NULL ? NULL : m_hObject; }
205: inline CGdiObject::CGdiObject()
206: { m_hObject = NULL; }
207: inline int CGdiObject::GetObject(int nCount, void FAR* lpObject) const
208: { return ::GetObject(m_hObject, nCount, lpObject); }
209: inline BOOL CGdiObject::CreateStockObject(int nIndex)
210: { return Attach(::GetStockObject(nIndex)); }
211: inline BOOL CGdiObject::UnrealizeObject()
212: #ifdef _NTWIN
213: { return TRUE; }
214: #else
215: { return ::UnrealizeObject(m_hObject); }
216: #endif
217:
218: // CPen inline functions
219: inline CPen* CPen::FromHandle(HPEN hPen)
220: { return (CPen*) CGdiObject::FromHandle(hPen); }
221: inline CPen::CPen()
222: { }
223: inline BOOL CPen::CreatePen(int nPenStyle, int nWidth, DWORD crColor)
224: { return Attach(::CreatePen(nPenStyle, nWidth, crColor)); }
225: inline BOOL CPen::CreatePenIndirect(LPLOGPEN lpLogPen)
226: { return Attach(::CreatePenIndirect(lpLogPen)); }
227:
228: // CBrush inline functions
229: inline CBrush* CBrush::FromHandle(HBRUSH hBrush)
230: { return (CBrush*) CGdiObject::FromHandle(hBrush); }
231: inline CBrush::CBrush()
232: { }
233: inline BOOL CBrush::CreateSolidBrush(DWORD crColor)
234: { return Attach(::CreateSolidBrush(crColor)); }
235: inline BOOL CBrush::CreateHatchBrush(int nIndex, DWORD crColor)
236: { return Attach(::CreateHatchBrush(nIndex, crColor)); }
237: inline BOOL CBrush::CreateBrushIndirect(LPLOGBRUSH lpLogBrush)
238: { return Attach(::CreateBrushIndirect(lpLogBrush)); }
239: inline BOOL CBrush::CreateDIBPatternBrush(GLOBALHANDLE hPackedDIB, UINT nUsage)
240: { return Attach(::CreateDIBPatternBrush(hPackedDIB, nUsage)); }
241: inline BOOL CBrush::CreatePatternBrush(CBitmap* pBitmap)
242: { return Attach(::CreatePatternBrush((HBITMAP)pBitmap->m_hObject)); }
243:
244: // CFont inline functions
245: inline CFont* CFont::FromHandle(HFONT hFont)
246: { return (CFont*) CGdiObject::FromHandle(hFont); }
247: inline CFont::CFont()
248: { }
249: inline BOOL CFont::CreateFontIndirect(LPLOGFONT lpLogFont)
250: { return Attach(::CreateFontIndirect(lpLogFont)); }
251: inline BOOL CFont::CreateFont(int nHeight, int nWidth, int nEscapement,
252: int nOrientation, int nWeight, BYTE bItalic, BYTE bUnderline,
253: BYTE cStrikeOut, BYTE nCharSet, BYTE nOutPrecision,
254: BYTE nClipPrecision, BYTE nQuality, BYTE nPitchAndFamily,
255: LPCSTR lpFacename)
256: { return Attach(::CreateFont(nHeight, nWidth, nEscapement,
257: nOrientation, nWeight, bItalic, bUnderline, cStrikeOut,
258: nCharSet, nOutPrecision, nClipPrecision, nQuality,
259: nPitchAndFamily, lpFacename)); }
260:
261: // CBitmap inline functions
262: inline CBitmap* CBitmap::FromHandle(HBITMAP hBitmap)
263: { return (CBitmap*) CGdiObject::FromHandle(hBitmap); }
264: inline CBitmap::CBitmap()
265: { }
266: inline BOOL CBitmap::CreateBitmap(int nWidth, int nHeight, BYTE nPlanes,
267: BYTE nBitcount, const void FAR* lpBits)
268: { return Attach(::CreateBitmap(nWidth, nHeight, nPlanes, nBitcount, lpBits)); }
269: inline BOOL CBitmap::CreateBitmapIndirect(LPBITMAP lpBitmap)
270: { return Attach(::CreateBitmapIndirect(lpBitmap)); }
271:
272: inline DWORD CBitmap::SetBitmapBits(DWORD dwCount, const void FAR* lpBits)
273: { return ::SetBitmapBits((HBITMAP)m_hObject, dwCount, (const BYTE*)lpBits); }
274: inline DWORD CBitmap::GetBitmapBits(DWORD dwCount, void FAR* lpBits) const
275: { return ::GetBitmapBits((HBITMAP)m_hObject, dwCount, lpBits); }
276: inline CSize CBitmap::SetBitmapDimension(int nWidth, int nHeight)
277: #ifdef _NTWIN
278: { SIZE size;
279: VERIFY(::SetBitmapDimensionEx((HBITMAP)m_hObject, nWidth, nHeight, &size));
280: return size; }
281: #else
282: { return ::SetBitmapDimension((HBITMAP)m_hObject, nWidth, nHeight); }
283: #endif
284:
285: inline CSize CBitmap::GetBitmapDimension() const
286: #ifdef _NTWIN
287: { SIZE size;
288: VERIFY(::GetBitmapDimensionEx((HBITMAP)m_hObject, &size));
289: return size; }
290: #else
291: { return ::GetBitmapDimension((HBITMAP)m_hObject); }
292: #endif
293: inline BOOL CBitmap::LoadBitmap(LPCSTR lpBitmapName)
294: { return Attach(::LoadBitmap(AfxGetResourceHandle(), lpBitmapName));}
295: inline BOOL CBitmap::LoadBitmap(UINT nIDBitmap)
296: { return Attach(::LoadBitmap(AfxGetResourceHandle(),
297: MAKEINTRESOURCE(nIDBitmap))); }
298: inline BOOL CBitmap::LoadOEMBitmap(UINT nIDBitmap)
299: { return Attach(::LoadBitmap(NULL, MAKEINTRESOURCE(nIDBitmap))); }
300: inline BOOL CBitmap::CreateCompatibleBitmap(CDC* pDC, int nWidth, int nHeight)
301: { return Attach(::CreateCompatibleBitmap(pDC->m_hDC, nWidth, nHeight)); }
302: inline BOOL CBitmap::CreateDiscardableBitmap(CDC* pDC, int nWidth, int nHeight)
303: { return Attach(::CreateDiscardableBitmap(pDC->m_hDC, nWidth, nHeight)); }
304:
305: // CPalette inline functions
306: inline CPalette* CPalette::FromHandle(HPALETTE hPalette)
307: { return (CPalette*) CGdiObject::FromHandle(hPalette); }
308: inline CPalette::CPalette()
309: { }
310: inline BOOL CPalette::CreatePalette(LPLOGPALETTE lpLogPalette)
311: { return Attach(::CreatePalette(lpLogPalette)); }
312: inline UINT CPalette::GetPaletteEntries(UINT nStartIndex, UINT nNumEntries,
313: LPPALETTEENTRY lpPaletteColors) const
314: { return ::GetPaletteEntries((HPALETTE)m_hObject, nStartIndex,
315: nNumEntries, lpPaletteColors); }
316: inline UINT CPalette::SetPaletteEntries(UINT nStartIndex, UINT nNumEntries,
317: LPPALETTEENTRY lpPaletteColors)
318: { return ::SetPaletteEntries((HPALETTE)m_hObject, nStartIndex,
319: nNumEntries, lpPaletteColors); }
320: inline void CPalette::AnimatePalette(UINT nStartIndex, UINT nNumEntries,
321: LPPALETTEENTRY lpPaletteColors)
322: { ::AnimatePalette((HPALETTE)m_hObject, nStartIndex, nNumEntries,
323: lpPaletteColors); }
324: inline UINT CPalette::GetNearestPaletteIndex(DWORD crColor) const
325: { return ::GetNearestPaletteIndex((HPALETTE)m_hObject, crColor); }
326: inline BOOL CPalette::ResizePalette(UINT nNumEntries)
327: { return ::ResizePalette((HPALETTE)m_hObject, nNumEntries); }
328:
329:
330: // CRgn inline functions
331: inline CRgn* CRgn::FromHandle(HRGN hRgn)
332: { return (CRgn*) CGdiObject::FromHandle(hRgn); }
333: inline CRgn::CRgn()
334: { }
335: inline BOOL CRgn::CreateRectRgn(int x1, int y1, int x2, int y2)
336: { return Attach(::CreateRectRgn(x1, y1, x2, y2)); }
337: inline BOOL CRgn::CreateRectRgnIndirect(LPRECT lpRect)
338: { return Attach(::CreateRectRgnIndirect(lpRect)); }
339: inline BOOL CRgn::CreateEllipticRgn(int x1, int y1, int x2, int y2)
340: { return Attach(::CreateEllipticRgn(x1, y1, x2, y2)); }
341: inline BOOL CRgn::CreateEllipticRgnIndirect(LPRECT lpRect)
342: { return Attach(::CreateEllipticRgnIndirect(lpRect)); }
343: inline BOOL CRgn::CreatePolygonRgn(LPPOINT lpPoints, int nCount, int nMode)
344: { return Attach(::CreatePolygonRgn(lpPoints, nCount, nMode)); }
345: inline BOOL CRgn::CreatePolyPolygonRgn(LPPOINT lpPoints, LPINT lpPolyCounts, int nCount, int nPolyFillMode)
346: { return Attach(::CreatePolyPolygonRgn(lpPoints, lpPolyCounts, nCount, nPolyFillMode)); }
347: inline BOOL CRgn::CreateRoundRectRgn(int x1, int y1, int x2, int y2, int x3, int y3)
348: { return Attach(::CreateRoundRectRgn(x1, y1, x2, y2, x3, y3)); }
349: inline void CRgn::SetRectRgn(int x1, int y1, int x2, int y2)
350: { ::SetRectRgn((HRGN)m_hObject, x1, y1, x2, y2); }
351: inline void CRgn::SetRectRgn(LPRECT lpRect)
352: { ::SetRectRgn((HRGN)m_hObject, lpRect->left, lpRect->top, lpRect->right, lpRect->bottom); }
353: inline int CRgn::CombineRgn(CRgn* pRgn1, CRgn* pRgn2, int nCombineMode)
354: { return ::CombineRgn((HRGN)m_hObject, (HRGN)pRgn1->m_hObject,
355: (HRGN)pRgn2->GetSafeHandle(), nCombineMode); }
356: inline int CRgn::CopyRgn(CRgn* pRgnSrc)
357: { return ::CombineRgn((HRGN)m_hObject, (HRGN)pRgnSrc->m_hObject, NULL, RGN_COPY); }
358: inline BOOL CRgn::EqualRgn(CRgn* pRgn) const
359: { return ::EqualRgn((HRGN)m_hObject, (HRGN)pRgn->m_hObject); }
360: inline int CRgn::OffsetRgn(int x, int y)
361: { return ::OffsetRgn((HRGN)m_hObject, x, y); }
362: inline int CRgn::OffsetRgn(POINT point)
363: { return ::OffsetRgn((HRGN)m_hObject, point.x, point.y); }
364: inline int CRgn::GetRgnBox(LPRECT lpRect) const
365: { return ::GetRgnBox((HRGN)m_hObject, lpRect); }
366: inline BOOL CRgn::PtInRegion(int x, int y) const
367: { return ::PtInRegion((HRGN)m_hObject, x, y); }
368: inline BOOL CRgn::PtInRegion(POINT point) const
369: { return ::PtInRegion((HRGN)m_hObject, point.x, point.y); }
370: inline BOOL CRgn::RectInRegion(LPRECT lpRect) const
371: { return ::RectInRegion((HRGN)m_hObject, lpRect); }
372:
373: // CDC inline functions
374: inline HDC CDC::GetSafeHdc() const
375: { return this == NULL ? NULL : m_hDC; }
376: inline CDC::CDC()
377: { m_hDC = NULL; }
378: #ifdef _NTWIN
379: inline BOOL CDC::CreateDC(LPCSTR lpDriverName,
380: LPCSTR lpDeviceName, LPCSTR lpOutput,
381: const void FAR* lpInitData)
382: { return Attach(::CreateDC(lpDriverName,
383: lpDeviceName, lpOutput, (const DEVMODE*)lpInitData)); }
384: inline BOOL CDC::CreateIC(LPCSTR lpDriverName,
385: LPCSTR lpDeviceName, LPCSTR lpOutput,
386: const void FAR* lpInitData)
387: { return Attach(::CreateIC(lpDriverName,
1.1.1.2 root 388: lpDeviceName, lpOutput, (const DEVMODE*)lpInitData)); }
1.1 root 389: #else
390: inline BOOL CDC::CreateIC(LPCSTR lpDriverName,
391: LPCSTR lpDeviceName, LPCSTR lpOutput,
392: const void FAR* lpInitData)
393: { return Attach(::CreateIC(lpDriverName,
394: lpDeviceName, lpOutput, lpInitData)); }
395: inline BOOL CDC::CreateDC(LPCSTR lpDriverName,
396: LPCSTR lpDeviceName, LPCSTR lpOutput,
397: const void FAR* lpInitData)
398: { return Attach(::CreateDC(lpDriverName,
399: lpDeviceName, lpOutput, lpInitData)); }
400: #endif
401: inline BOOL CDC::CreateCompatibleDC(CDC* pDC)
402: { return Attach(::CreateCompatibleDC(pDC->GetSafeHdc())); }
403: inline int CDC::ExcludeUpdateRgn(CWnd* pWnd)
404: { return ::ExcludeUpdateRgn(m_hDC, pWnd->m_hWnd); }
405: inline CPoint CDC::GetDCOrg() const
1.1.1.3 ! root 406: #ifdef _NTWIN
! 407: { POINT point;
! 408: VERIFY(::GetDCOrgEx(m_hDC, &point));
! 409: return point; }
! 410: #else
1.1 root 411: { return ::GetDCOrg(m_hDC); }
412: #endif
1.1.1.3 ! root 413:
1.1 root 414: inline int CDC::SaveDC() const
415: { return ::SaveDC(m_hDC); }
416: inline BOOL CDC::RestoreDC(int nSavedDC)
417: { return ::RestoreDC(m_hDC, nSavedDC); }
418: inline int CDC::GetDeviceCaps(int nIndex) const
419: { return ::GetDeviceCaps(m_hDC, nIndex); }
420:
421: inline CPoint CDC::GetBrushOrg() const
422: #ifdef _NTWIN
423: { POINT point;
424: VERIFY(::GetBrushOrgEx(m_hDC, &point));
425: return point; }
426: #else
427: { return ::GetBrushOrg(m_hDC); }
428: #endif
429:
430: inline CPoint CDC::SetBrushOrg(int x, int y)
431: #ifdef _NTWIN
432: { POINT point;
433: VERIFY(::SetBrushOrgEx(m_hDC, x, y, &point));
434: return point; }
435: #else
436: { return ::SetBrushOrg(m_hDC, x, y); }
437: #endif
438:
439: inline CPoint CDC::SetBrushOrg(POINT point)
440: #ifdef _NTWIN
441: { VERIFY(::SetBrushOrgEx(m_hDC, point.x, point.y, &point));
442: return point; }
443: #else
444: { return ::SetBrushOrg(m_hDC, point.x, point.y); }
445: #endif
446:
447: inline int CDC::EnumObjects(int nObjectType,
448: int (FAR PASCAL EXPORT* lpfn)(LPSTR, LPSTR), LPSTR lpData)
449: #ifdef STRICT
450: { return ::EnumObjects(m_hDC, nObjectType, (GOBJENUMPROC)lpfn, (LPARAM)lpData); }
451: #else
452: { return ::EnumObjects(m_hDC, nObjectType, (GOBJENUMPROC)lpfn, lpData); }
453: #endif
454: inline CGdiObject* CDC::SelectObject(CGdiObject* pObject)
455: { return SelectGdiObject(m_hDC, pObject->m_hObject); }
456: inline CGdiObject* CDC::SelectStockObject(int nIndex)
457: { ASSERT(::GetStockObject(nIndex) != NULL);
458: return SelectGdiObject(m_hDC, ::GetStockObject(nIndex)); }
459: inline CPen* CDC::SelectObject(CPen* pPen)
460: { return (CPen*) SelectGdiObject(m_hDC, pPen->m_hObject); }
461: inline CBrush* CDC::SelectObject(CBrush* pBrush)
462: { return (CBrush*) SelectGdiObject(m_hDC, pBrush->m_hObject); }
463: inline CFont* CDC::SelectObject(CFont* pFont)
464: { return (CFont*) SelectGdiObject(m_hDC, pFont->m_hObject); }
465: inline CBitmap* CDC::SelectObject(CBitmap* pBitmap)
466: { return (CBitmap*) SelectGdiObject(m_hDC, pBitmap->m_hObject);}
467: inline int CDC::SelectObject(CRgn* pRgn)
468: { return (int)::SelectObject(m_hDC, pRgn->m_hObject); }
469: inline DWORD CDC::GetNearestColor(DWORD crColor) const
470: { return ::GetNearestColor(m_hDC, crColor); }
471: inline UINT CDC::RealizePalette()
472: { return ::RealizePalette(m_hDC); }
473: inline void CDC::UpdateColors()
474: { ::UpdateColors(m_hDC); }
475: inline DWORD CDC::GetBkColor() const
476: { return ::GetBkColor(m_hDC); }
477: inline DWORD CDC::SetBkColor(DWORD crColor)
478: { return ::SetBkColor(m_hDC, crColor); }
479: inline int CDC::GetBkMode() const
480: { return ::GetBkMode(m_hDC); }
481: inline int CDC::SetBkMode(int nBkMode)
482: { return ::SetBkMode(m_hDC, nBkMode); }
483: inline int CDC::GetPolyFillMode() const
484: { return ::GetPolyFillMode(m_hDC); }
485: inline int CDC::SetPolyFillMode(int nPolyFillMode)
486: { return ::SetPolyFillMode(m_hDC, nPolyFillMode); }
487: inline int CDC::GetROP2() const
488: { return ::GetROP2(m_hDC); }
489: inline int CDC::SetROP2(int nDrawMode)
490: { return ::SetROP2(m_hDC, nDrawMode); }
491: inline int CDC::GetStretchBltMode() const
492: { return ::GetStretchBltMode(m_hDC); }
493: inline int CDC::SetStretchBltMode(int nStretchMode)
494: { return ::SetStretchBltMode(m_hDC, nStretchMode); }
495: inline DWORD CDC::GetTextColor() const
496: { return ::GetTextColor(m_hDC); }
497: inline DWORD CDC::SetTextColor(DWORD crColor)
498: { return ::SetTextColor(m_hDC, crColor); }
499: inline int CDC::GetMapMode() const
500: { return ::GetMapMode(m_hDC); }
501: inline int CDC::SetMapMode(int nMapMode)
502: { return ::SetMapMode(m_hDC, nMapMode); }
503: inline CPoint CDC::GetViewportOrg() const
504: #ifdef _NTWIN
505: { POINT point;
506: VERIFY(::GetViewportOrgEx(m_hDC, &point));
507: return point; }
508: #else
509: { return ::GetViewportOrg(m_hDC); }
510: #endif
511: inline CPoint CDC::SetViewportOrg(int x, int y)
512: #ifdef _NTWIN
513: { POINT point;
514: VERIFY(::SetViewportOrgEx(m_hDC, x, y, &point));
515: return point; }
516: #else
517: { return ::SetViewportOrg(m_hDC, x, y); }
518: #endif
519: inline CPoint CDC::SetViewportOrg(POINT point)
520: #ifdef _NTWIN
521: { VERIFY(::SetViewportOrgEx(m_hDC, point.x, point.y, &point));
522: return point; }
523: #else
524: { return ::SetViewportOrg(m_hDC, point.x, point.y); }
525: #endif
526: inline CPoint CDC::OffsetViewportOrg(int nWidth, int nHeight)
527: #ifdef _NTWIN
528: { POINT point;
529: VERIFY(::OffsetViewportOrgEx(m_hDC, nWidth, nHeight, &point));
530: return point; }
531: #else
532: { return ::OffsetViewportOrg(m_hDC, nWidth, nHeight); }
533: #endif
534: inline CSize CDC::GetViewportExt() const
535: #ifdef _NTWIN
536: { SIZE size;
537: VERIFY(::GetViewportExtEx(m_hDC, &size));
538: return size; }
539: #else
540: { return ::GetViewportExt(m_hDC); }
541: #endif
542: inline CSize CDC::SetViewportExt(int x, int y)
543: #ifdef _NTWIN
544: { SIZE size;
545: VERIFY(::SetViewportExtEx(m_hDC, x, y, &size));
546: return size; }
547: #else
548: { return ::SetViewportExt(m_hDC, x, y); }
549: #endif
550: inline CSize CDC::SetViewportExt(SIZE size)
551: #ifdef _NTWIN
552: { VERIFY(::SetViewportExtEx(m_hDC, size.cx, size.cy, &size));
553: return size; }
554: #else
555: { return ::SetViewportExt(m_hDC, size.cx, size.cy); }
556: #endif
557: inline CSize CDC::ScaleViewportExt(int xNum, int xDenom, int yNum, int yDenom)
558: #ifdef _NTWIN
559: { SIZE size;
560: VERIFY(::ScaleViewportExtEx(m_hDC, xNum, xDenom, yNum, yDenom, &size));
561: return size; }
562: #else
563: { return ::ScaleViewportExt(m_hDC, xNum, xDenom, yNum, yDenom);}
564: #endif
565: inline CPoint CDC::GetWindowOrg() const
566: #ifdef _NTWIN
567: { POINT point;
568: VERIFY(::GetWindowOrgEx(m_hDC, &point));
569: return point; }
570: #else
571: { return ::GetWindowOrg(m_hDC); }
572: #endif
573: inline CPoint CDC::SetWindowOrg(int x, int y)
574: #ifdef _NTWIN
575: { POINT point;
576: VERIFY(::SetWindowOrgEx(m_hDC, x, y, &point));
577: return point; }
578: #else
579: { return ::SetWindowOrg(m_hDC, x, y); }
580: #endif
581: inline CPoint CDC::SetWindowOrg(POINT point)
582: #ifdef _NTWIN
583: { VERIFY(::SetWindowOrgEx(m_hDC, point.x, point.y, &point));
584: return point; }
585: #else
586: { return ::SetWindowOrg(m_hDC, point.x, point.y); }
587: #endif
588: inline CPoint CDC::OffsetWindowOrg(int nWidth, int nHeight)
589: #ifdef _NTWIN
590: { POINT point;
591: VERIFY(::OffsetWindowOrgEx(m_hDC, nWidth, nHeight, &point));
592: return point; }
593: #else
594: { return ::OffsetWindowOrg(m_hDC, nWidth, nHeight); }
595: #endif
596: inline CSize CDC::SetWindowExt(SIZE size)
597: #ifdef _NTWIN
598: { VERIFY(::SetWindowExtEx(m_hDC, size.cx, size.cy, &size));
599: return size; }
600: #else
601: { return ::SetWindowExt(m_hDC, size.cx, size.cy); }
602: #endif
603: inline CSize CDC::ScaleWindowExt(int xNum, int xDenom, int yNum, int yDenom)
604: #ifdef _NTWIN
605: { SIZE size;
606: VERIFY(::ScaleWindowExtEx(m_hDC, xNum, xDenom, yNum, yDenom, &size));
607: return size; }
608: #else
609: { return ::ScaleWindowExt(m_hDC, xNum, xDenom, yNum, yDenom);}
610: #endif
611:
612: inline void CDC::DPtoLP(LPPOINT lpPoints, int nCount /* = 1 */) const
613: { VERIFY(::DPtoLP(m_hDC, lpPoints, nCount)); }
614: inline void CDC::DPtoLP(LPRECT lpRect) const
615: { VERIFY(::DPtoLP(m_hDC, (LPPOINT)lpRect, 2)); }
616: inline void CDC::LPtoDP(LPPOINT lpPoints, int nCount /* = 1 */) const
617: { VERIFY(::LPtoDP(m_hDC, lpPoints, nCount)); }
618: inline void CDC::LPtoDP(LPRECT lpRect) const
619: { VERIFY(::LPtoDP(m_hDC, (LPPOINT)lpRect, 2)); }
620: inline BOOL CDC::FillRgn(CRgn* pRgn, CBrush* pBrush)
621: { return ::FillRgn(m_hDC, (HRGN)pRgn->m_hObject, (HBRUSH)pBrush->m_hObject); }
622: inline BOOL CDC::FrameRgn(CRgn* pRgn, CBrush* pBrush, int nWidth, int nHeight)
623: { return ::FrameRgn(m_hDC, (HRGN)pRgn->m_hObject, (HBRUSH)pBrush->m_hObject,
624: nWidth, nHeight); }
625: inline BOOL CDC::InvertRgn(CRgn* pRgn)
626: { return ::InvertRgn(m_hDC, (HRGN)pRgn->m_hObject); }
627: inline BOOL CDC::PaintRgn(CRgn* pRgn)
628: { return ::PaintRgn(m_hDC, (HRGN)pRgn->m_hObject); }
629: inline int CDC::GetClipBox(LPRECT lpRect) const
630: { return ::GetClipBox(m_hDC, lpRect); }
631: inline int CDC::SelectClipRgn(CRgn* pRgn)
632: { return ::SelectClipRgn(m_hDC, (HRGN)pRgn->GetSafeHandle()); }
633: inline int CDC::ExcludeClipRect(int x1, int y1, int x2, int y2)
634: { return ::ExcludeClipRect(m_hDC, x1, y1, x2, y2); }
635: inline int CDC::ExcludeClipRect(LPRECT lpRect)
636: { return ::ExcludeClipRect(m_hDC, lpRect->left, lpRect->top,
637: lpRect->right, lpRect->bottom); }
638: inline int CDC::IntersectClipRect(int x1, int y1, int x2, int y2)
639: { return ::IntersectClipRect(m_hDC, x1, y1, x2, y2); }
640: inline int CDC::IntersectClipRect(LPRECT lpRect)
641: { return ::IntersectClipRect(m_hDC, lpRect->left, lpRect->top,
642: lpRect->right, lpRect->bottom); }
643: inline int CDC::OffsetClipRgn(int x, int y)
644: { return ::OffsetClipRgn(m_hDC, x, y); }
645: inline int CDC::OffsetClipRgn(SIZE size)
646: { return ::OffsetClipRgn(m_hDC, size.cx, size.cy); }
647: inline BOOL CDC::PtVisible(int x, int y) const
648: { return ::PtVisible(m_hDC, x, y); }
649: inline BOOL CDC::PtVisible(POINT point) const
650: { return ::PtVisible(m_hDC, point.x, point.y); }
651: inline BOOL CDC::RectVisible(LPRECT lpRect) const
652: { return ::RectVisible(m_hDC, lpRect); }
653: inline CPoint CDC::GetCurrentPosition() const
654: #ifdef _NTWIN
655: { POINT point;
656: VERIFY(::GetCurrentPositionEx(m_hDC, &point));
657: return point; }
658: #else
659: { return ::GetCurrentPosition(m_hDC); }
660: #endif
661: inline CPoint CDC::MoveTo(int x, int y)
662: #ifdef _NTWIN
663: { POINT point;
664: VERIFY(::MoveToEx(m_hDC, x, y, &point));
665: return point; }
666: #else
667: { return ::MoveTo(m_hDC, x, y); }
668: #endif
669: inline CPoint CDC::MoveTo(POINT point)
670: #ifdef _NTWIN
671: { VERIFY(::MoveToEx(m_hDC, point.x, point.y, &point));
672: return point; }
673: #else
674: { return ::MoveTo(m_hDC, point.x, point.y); }
675: #endif
676: inline BOOL CDC::LineTo(int x, int y)
677: { return ::LineTo(m_hDC, x, y); }
678: inline BOOL CDC::LineTo(POINT point)
679: { return ::LineTo(m_hDC, point.x, point.y); }
680: inline BOOL CDC::Arc(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
681: { return ::Arc(m_hDC, x1, y1, x2, y2, x3, y3, x4, y4); }
682: inline BOOL CDC::Arc(LPRECT lpRect, POINT ptStart, POINT ptEnd)
683: { return ::Arc(m_hDC, lpRect->left, lpRect->top,
684: lpRect->right, lpRect->bottom, ptStart.x, ptStart.y,
685: ptEnd.x, ptEnd.y); }
686: inline BOOL CDC::Polyline(LPPOINT lpPoints, int nCount)
687: { return ::Polyline(m_hDC, lpPoints, nCount); }
688: inline void CDC::FillRect(LPRECT lpRect, CBrush* pBrush)
689: { ::FillRect(m_hDC, lpRect, (HBRUSH)pBrush->m_hObject); }
690: inline void CDC::FrameRect(LPRECT lpRect, CBrush* pBrush)
691: { ::FrameRect(m_hDC, lpRect, (HBRUSH)pBrush->m_hObject); }
692: inline void CDC::InvertRect(LPRECT lpRect)
693: { ::InvertRect(m_hDC, lpRect); }
694: inline BOOL CDC::DrawIcon(int x, int y, HICON hIcon)
695: { return ::DrawIcon(m_hDC, x, y, hIcon); }
696: inline BOOL CDC::DrawIcon(POINT point, HICON hIcon)
697: { return ::DrawIcon(m_hDC, point.x, point.y, hIcon); }
698: inline BOOL CDC::Chord(int x1, int y1, int x2, int y2, int x3, int y3,
699: int x4, int y4)
700: { return ::Chord(m_hDC, x1, y1, x2, y2, x3, y3, x4, y4); }
701: inline BOOL CDC::Chord(LPRECT lpRect, POINT ptStart, POINT ptEnd)
702: { return ::Chord(m_hDC, lpRect->left, lpRect->top,
703: lpRect->right, lpRect->bottom, ptStart.x, ptStart.y,
704: ptEnd.x, ptEnd.y); }
705: inline void CDC::DrawFocusRect(LPRECT lpRect)
706: { ::DrawFocusRect(m_hDC, lpRect); }
707: inline BOOL CDC::Ellipse(int x1, int y1, int x2, int y2)
708: { return ::Ellipse(m_hDC, x1, y1, x2, y2); }
709: inline BOOL CDC::Ellipse(LPRECT lpRect)
710: { return ::Ellipse(m_hDC, lpRect->left, lpRect->top,
711: lpRect->right, lpRect->bottom); }
712: inline BOOL CDC::Pie(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
713: { return ::Pie(m_hDC, x1, y1, x2, y2, x3, y3, x4, y4); }
714: inline BOOL CDC::Pie(LPRECT lpRect, POINT ptStart, POINT ptEnd)
715: { return ::Pie(m_hDC, lpRect->left, lpRect->top,
716: lpRect->right, lpRect->bottom, ptStart.x, ptStart.y,
717: ptEnd.x, ptEnd.y); }
718: inline BOOL CDC::Polygon(LPPOINT lpPoints, int nCount)
719: { return ::Polygon(m_hDC, lpPoints, nCount); }
720: inline BOOL CDC::PolyPolygon(LPPOINT lpPoints, LPINT lpPolyCounts, int nCount)
721: { return ::PolyPolygon(m_hDC, lpPoints, lpPolyCounts, nCount); }
722: inline BOOL CDC::Rectangle(int x1, int y1, int x2, int y2)
723: { return ::Rectangle(m_hDC, x1, y1, x2, y2); }
724: inline BOOL CDC::Rectangle(LPRECT lpRect)
725: { return ::Rectangle(m_hDC, lpRect->left, lpRect->top,
726: lpRect->right, lpRect->bottom); }
727: inline BOOL CDC::RoundRect(int x1, int y1, int x2, int y2, int x3, int y3)
728: { return ::RoundRect(m_hDC, x1, y1, x2, y2, x3, y3); }
729: inline BOOL CDC::RoundRect(LPRECT lpRect, POINT point)
730: { return ::RoundRect(m_hDC, lpRect->left, lpRect->top,
731: lpRect->right, lpRect->bottom, point.x, point.y); }
732: inline BOOL CDC::PatBlt(int x, int y, int nWidth, int nHeight, DWORD dwRop)
733: { return ::PatBlt(m_hDC, x, y, nWidth, nHeight, dwRop); }
734: inline BOOL CDC::BitBlt(int x, int y, int nWidth, int nHeight, CDC* pSrcDC,
735: int xSrc, int ySrc, DWORD dwRop)
736: { return ::BitBlt(m_hDC, x, y, nWidth, nHeight,
737: pSrcDC->GetSafeHdc(), xSrc, ySrc, dwRop); }
738: inline BOOL CDC::StretchBlt(int x, int y, int nWidth, int nHeight, CDC* pSrcDC,
739: int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, DWORD dwRop)
740: { return ::StretchBlt(m_hDC, x, y, nWidth, nHeight,
741: pSrcDC->GetSafeHdc(), xSrc, ySrc, nSrcWidth, nSrcHeight,
742: dwRop); }
743: inline DWORD CDC::GetPixel(int x, int y) const
744: { return ::GetPixel(m_hDC, x, y); }
745: inline DWORD CDC::GetPixel(POINT point) const
746: { return ::GetPixel(m_hDC, point.x, point.y); }
747: inline DWORD CDC::SetPixel(int x, int y, DWORD crColor)
748: { return ::SetPixel(m_hDC, x, y, crColor); }
749: inline DWORD CDC::SetPixel(POINT point, DWORD crColor)
750: { return ::SetPixel(m_hDC, point.x, point.y, crColor); }
751: inline BOOL CDC::FloodFill(int x, int y, DWORD crColor)
752: { return ::FloodFill(m_hDC, x, y, crColor); }
753: inline BOOL CDC::ExtFloodFill(int x, int y, DWORD crColor, UINT nFillType)
754: { return ::ExtFloodFill(m_hDC, x, y, crColor, nFillType); }
755: inline BOOL CDC::TextOut(int x, int y, const CString& str)
756: { return ::TextOut(m_hDC, x, y, (const char*)str, str.GetLength()); }
757: inline BOOL CDC::TextOut(int x, int y, LPCSTR lpString, int nCount)
758: { return ::TextOut(m_hDC, x, y, lpString, nCount); }
759: inline BOOL CDC::ExtTextOut(int x, int y, UINT nOptions, LPRECT lpRect,
760: LPCSTR lpString, UINT nCount, LPINT lpDxWidths)
761: { return ::ExtTextOut(m_hDC, x, y, nOptions, lpRect,
762: lpString, nCount, lpDxWidths); }
763: inline CSize CDC::TabbedTextOut(int x, int y, LPCSTR lpString, int nCount,
764: int nTabPositions, LPINT lpnTabStopPositions, int nTabOrigin)
765: { return ::TabbedTextOut(m_hDC, x, y, (LPSTR)lpString, nCount,
766: nTabPositions, lpnTabStopPositions, nTabOrigin); }
767: inline int CDC::DrawText(LPCSTR lpString, int nCount, LPRECT lpRect,
768: UINT nFormat)
1.1.1.2 root 769: { return ::DrawText(m_hDC, lpString, nCount, lpRect, nFormat); }
1.1 root 770: inline CSize CDC::GetTextExtent(LPCSTR lpString, int nCount) const
771: #ifdef _NTWIN
772: { SIZE size;
773: VERIFY(::GetTextExtentPoint(m_hDC, lpString, nCount, &size));
774: return size; }
775: #else
776: { return ::GetTextExtent(m_hDC, lpString, nCount); }
777: #endif
778: inline CSize CDC::GetTabbedTextExtent(LPCSTR lpString, int nCount,
779: int nTabPositions, LPINT lpnTabStopPositions) const
780: { return ::GetTabbedTextExtent(m_hDC, lpString, nCount,
781: nTabPositions, lpnTabStopPositions); }
782: inline BOOL CDC::GrayString(CBrush* pBrush,
783: BOOL (FAR PASCAL EXPORT* lpfnOutput)(HDC, DWORD, int),
784: DWORD lpData, int nCount,
785: int x, int y, int nWidth, int nHeight)
786: { return ::GrayString(m_hDC, (HBRUSH)pBrush->m_hObject,
787: (GRAYSTRINGPROC)lpfnOutput, lpData, nCount, x, y, nWidth, nHeight); }
788: inline UINT CDC::GetTextAlign() const
789: { return ::GetTextAlign(m_hDC); }
790: inline UINT CDC::SetTextAlign(UINT nFlags)
791: { return ::SetTextAlign(m_hDC, nFlags); }
792: inline int CDC::GetTextFace(int nCount, LPSTR lpFacename) const
793: { return ::GetTextFace(m_hDC, nCount, lpFacename); }
794: inline BOOL CDC::GetTextMetrics(LPTEXTMETRIC lpMetrics) const
795: { return ::GetTextMetrics(m_hDC, lpMetrics); }
796: inline int CDC::SetTextJustification(int nBreakExtra, int nBreakCount)
797: { return ::SetTextJustification(m_hDC, nBreakExtra,
798: nBreakCount); }
799: inline int CDC::GetTextCharacterExtra() const
800: { return ::GetTextCharacterExtra(m_hDC); }
801: inline int CDC::SetTextCharacterExtra(int nCharExtra)
802: { return ::SetTextCharacterExtra(m_hDC, nCharExtra); }
803: inline BOOL CDC::GetCharWidth(UINT nFirstChar, UINT nLastChar, LPINT lpBuffer) const
804: { return ::GetCharWidth(m_hDC, nFirstChar, nLastChar,
805: lpBuffer); }
806: inline DWORD CDC::SetMapperFlags(DWORD dwFlag)
807: { return ::SetMapperFlags(m_hDC, dwFlag); }
808: inline CSize CDC::GetAspectRatioFilter() const
809: #ifdef _NTWIN
810: { SIZE size;
811: VERIFY(::GetAspectRatioFilterEx(m_hDC, &size));
812: return size; }
813: #else
814: { return ::GetAspectRatioFilter(m_hDC); }
815: #endif
816: inline BOOL CDC::ScrollDC(int dx, int dy, LPRECT lpRectScroll, LPRECT lpRectClip,
817: CRgn* pRgnUpdate, LPRECT lpRectUpdate)
818: { return ::ScrollDC(m_hDC, dx, dy, lpRectScroll,
819: lpRectClip, (HRGN)pRgnUpdate->GetSafeHandle(), lpRectUpdate); }
820: inline BOOL CDC::PlayMetaFile(HANDLE hMF)
821: { return ::PlayMetaFile(m_hDC, (HMETAFILE)hMF); }
822: inline CSize CDC::GetWindowExt() const
823: #ifdef _NTWIN
824: { SIZE size;
825: VERIFY(::GetWindowExtEx(m_hDC, &size));
826: return size; }
827: #else
828: { return ::GetWindowExt(m_hDC); }
829: #endif
830: inline CSize CDC::SetWindowExt(int x, int y)
831: #ifdef _NTWIN
832: { SIZE size;
833: VERIFY(::SetWindowExtEx(m_hDC, x, y, &size));
834: return size; }
835: #else
836: { return ::SetWindowExt(m_hDC, x, y); }
837: #endif
838:
839: // Printer Escape Functions
840: inline int CDC::Escape(int nEscape, int nCount, LPCSTR lpInData, void FAR* lpOutData)
841: { return ::Escape(m_hDC, nEscape, nCount, lpInData, lpOutData);}
842:
843: #ifndef _NTWIN
844: inline int CDC::StartDoc(LPCSTR pDocName)
845: { return ::Escape(m_hDC, STARTDOC, _fstrlen(pDocName),
846: pDocName, NULL);}
847: #endif
848:
849: #if (WINVER >= 0x030a)
1.1.1.3 ! root 850: #ifndef _NTWIN
1.1 root 851: inline BOOL CDC::QueryAbort() const
852: { return ::QueryAbort(m_hDC, 0); }
1.1.1.3 ! root 853: #else
! 854: inline BOOL CDC::QueryAbort() const
! 855: { return TRUE; } // NOTE: Win32 API does not support QueryAbort.
! 856: #endif
1.1 root 857: inline int CDC::StartDoc(LPDOCINFO lpDocInfo)
858: { return ::StartDoc(m_hDC, lpDocInfo);}
1.1.1.3 ! root 859: #endif
! 860:
! 861: #if (WINVER >= 0x030a) || defined(_NTWIN)
1.1 root 862: inline int CDC::StartPage()
863: { return ::StartPage(m_hDC); }
864: inline int CDC::EndPage()
865: { return ::EndPage(m_hDC);}
866: inline int CDC::SetAbortProc(BOOL (FAR PASCAL EXPORT* lpfn)(HDC, int))
867: { return ::SetAbortProc(m_hDC, (ABORTPROC)lpfn);}
868: inline int CDC::AbortDoc()
869: { return ::AbortDoc(m_hDC);}
870: inline int CDC::EndDoc()
871: { return ::EndDoc(m_hDC);}
872: #else
873: inline int CDC::StartPage()
874: { return 0; /* not implemented */ }
875: inline int CDC::EndPage()
876: { return ::Escape(m_hDC, NEWFRAME, 0, NULL, NULL);}
877: inline int CDC::SetAbortProc(BOOL (FAR PASCAL EXPORT* lpfn)(HDC, int))
878: { return ::Escape(m_hDC, SETABORTPROC, 0, (LPCSTR)lpfn, NULL);}
879: inline int CDC::AbortDoc()
880: { return ::Escape(m_hDC, ABORTDOC, 0, NULL, NULL);}
881: inline int CDC::EndDoc()
882: { return ::Escape(m_hDC, ENDDOC, 0, NULL, NULL);}
883: #endif
884:
885: // CDC 3.1 Specific functions
886: #if (WINVER >= 0x030a)
887: inline UINT CDC::SetBoundsRect(const RECT FAR* lpRectBounds, UINT flags)
1.1.1.2 root 888: { return ::SetBoundsRect(m_hDC, lpRectBounds, flags); }
1.1 root 889: inline UINT CDC::GetBoundsRect(LPRECT lpRectBounds, UINT flags)
890: { return ::GetBoundsRect(m_hDC, lpRectBounds, flags); }
891: inline UINT CDC::GetOutlineTextMetrics(UINT cbData, OUTLINETEXTMETRIC FAR* lpotm) const
1.1.1.2 root 892: { return ::GetOutlineTextMetrics(m_hDC, cbData, lpotm); }
1.1 root 893: inline BOOL CDC::GetCharABCWidths(UINT nFirst, UINT nLast, LPABC lpabc) const
894: { return ::GetCharABCWidths(m_hDC, nFirst, nLast, lpabc); }
895: inline DWORD CDC::GetFontData(DWORD dwTable, DWORD dwOffset, LPVOID lpData,
896: DWORD cbData) const
897: { return ::GetFontData(m_hDC, dwTable, dwOffset, lpData, cbData); }
898: inline int CDC::GetKerningPairs(int nPairs, KERNINGPAIR FAR* lpkrnpair) const
899: { return ::GetKerningPairs(m_hDC, nPairs, lpkrnpair); }
900: inline DWORD CDC::GetGlyphOutline(UINT nChar, UINT nFormat, GLYPHMETRICS FAR* lpgm,
901: DWORD cbBuffer, void FAR* lpBuffer, const MAT2 FAR* lpmat2) const
902: { return ::GetGlyphOutline(m_hDC, nChar, nFormat,
1.1.1.2 root 903: lpgm, cbBuffer, lpBuffer, lpmat2); }
1.1 root 904: #endif /* WINVER >= 0x030a */
905:
906: // CMetaFileDC inline functions
907: inline CMetaFileDC::CMetaFileDC()
908: { }
909: inline BOOL CMetaFileDC::Create(LPCSTR lpFilename /* = NULL */)
910: { return Attach(::CreateMetaFile(lpFilename)); }
911: inline HANDLE CMetaFileDC::Close()
912: { return ::CloseMetaFile(Detach()); }
913: inline BOOL CMetaFileDC::SelectObject(CGdiObject* pObject)
914: { return (BOOL)::SelectObject(m_hDC, pObject->m_hObject); }
915: inline BOOL CMetaFileDC::SelectStockObject(int nIndex)
916: { ASSERT(::GetStockObject(nIndex) != NULL);
917: return (BOOL)::SelectObject(m_hDC, ::GetStockObject(nIndex)); }
918:
919:
920: // CMenu inline functions
921: inline CMenu::CMenu()
922: { m_hMenu = NULL; }
923: inline BOOL CMenu::CreateMenu()
924: { return Attach(::CreateMenu()); }
925: inline BOOL CMenu::CreatePopupMenu()
926: { return Attach(::CreatePopupMenu()); }
927: inline HMENU CMenu::GetSafeHmenu() const
928: { return this == NULL ? NULL : m_hMenu; }
929: inline BOOL CMenu::DeleteMenu(UINT nPosition, UINT nFlags)
930: { return ::DeleteMenu(m_hMenu, nPosition, nFlags); }
931: inline BOOL CMenu::AppendMenu(UINT nFlags, UINT nIDNewItem /* = 0 */, LPCSTR lpNewItem /* = NULL */)
932: { return ::AppendMenu(m_hMenu, nFlags, nIDNewItem, lpNewItem); }
933: inline BOOL CMenu::AppendMenu(UINT nFlags, UINT nIDNewItem, const CBitmap* pBmp)
934: { return ::AppendMenu(m_hMenu, nFlags | MF_BITMAP, nIDNewItem,
1.1.1.2 root 935: #ifndef _NTWIN
1.1 root 936: MAKEINTRESOURCE(pBmp->m_hObject)); }
1.1.1.2 root 937: #else
938: (LPCSTR)pBmp->m_hObject); }
939: #endif
1.1 root 940: inline BOOL CMenu::CheckMenuItem(UINT nIDCheckItem, UINT nCheck)
1.1.1.2 root 941: { return ::CheckMenuItem(m_hMenu, nIDCheckItem, nCheck); }
1.1 root 942: inline BOOL CMenu::EnableMenuItem(UINT nIDEnableItem, UINT nEnable)
943: { return ::EnableMenuItem(m_hMenu, nIDEnableItem, nEnable); }
944: inline UINT CMenu::GetMenuItemCount() const
945: { return ::GetMenuItemCount(m_hMenu); }
946: inline UINT CMenu::GetMenuItemID(int nPos) const
947: { return ::GetMenuItemID(m_hMenu, nPos); }
948: inline UINT CMenu::GetMenuState(UINT nID, UINT nFlags) const
949: { return ::GetMenuState(m_hMenu, nID, nFlags); }
950: inline int CMenu::GetMenuString(UINT nIDItem, LPSTR lpString, int nMaxCount, UINT nFlags) const
951: { return ::GetMenuString(m_hMenu, nIDItem, lpString, nMaxCount, nFlags); }
952: inline CMenu* CMenu::GetSubMenu(int nPos) const
953: { return CMenu::FromHandle(::GetSubMenu(m_hMenu, nPos)); }
954: inline BOOL CMenu::InsertMenu(UINT nPosition, UINT nFlags, UINT nIDNewItem /* = 0 */,
955: LPCSTR lpNewItem /* = NULL */)
956: { return ::InsertMenu(m_hMenu, nPosition, nFlags, nIDNewItem, lpNewItem); }
957: inline BOOL CMenu::InsertMenu(UINT nPosition, UINT nFlags, UINT nIDNewItem, const CBitmap* pBmp)
1.1.1.2 root 958: { return ::InsertMenu(m_hMenu, nPosition, nFlags | MF_BITMAP, nIDNewItem,
959: #ifndef _NTWIN
1.1.1.3 ! root 960: MAKEINTRESOURCE(pBmp->m_hObject)); }
1.1.1.2 root 961: #else
1.1.1.3 ! root 962: (LPCSTR)pBmp->m_hObject); }
1.1.1.2 root 963: #endif
1.1 root 964: inline BOOL CMenu::ModifyMenu(UINT nPosition, UINT nFlags, UINT nIDNewItem /* = 0 */, LPCSTR lpNewItem /* = NULL */)
965: { return ::ModifyMenu(m_hMenu, nPosition, nFlags, nIDNewItem, lpNewItem); }
966: inline BOOL CMenu::ModifyMenu(UINT nPosition, UINT nFlags, UINT nIDNewItem, const CBitmap* pBmp)
1.1.1.2 root 967: { return ::ModifyMenu(m_hMenu, nPosition, nFlags | MF_BITMAP, nIDNewItem,
968: #ifndef _NTWIN
1.1.1.3 ! root 969: MAKEINTRESOURCE(pBmp->m_hObject)); }
1.1.1.2 root 970: #else
1.1.1.3 ! root 971: (LPCSTR)pBmp->m_hObject); }
1.1.1.2 root 972: #endif
1.1 root 973: inline BOOL CMenu::RemoveMenu(UINT nPosition, UINT nFlags)
974: { return ::RemoveMenu(m_hMenu, nPosition, nFlags); }
975: inline BOOL CMenu::SetMenuItemBitmaps(UINT nPosition, UINT nFlags,
976: const CBitmap* pBmpUnchecked, const CBitmap* pBmpChecked)
977: { return ::SetMenuItemBitmaps(m_hMenu, nPosition, nFlags,
978: (HBITMAP)pBmpUnchecked->GetSafeHandle(),
979: (HBITMAP)pBmpChecked->GetSafeHandle()); }
980: inline BOOL CMenu::LoadMenu(LPCSTR lpMenuName)
981: { return Attach(::LoadMenu(AfxGetResourceHandle(), lpMenuName)); }
982: inline BOOL CMenu::LoadMenu(UINT nIDMenu)
983: { return Attach(::LoadMenu(AfxGetResourceHandle(),
984: MAKEINTRESOURCE(nIDMenu))); }
985: inline BOOL CMenu::LoadMenuIndirect(const void FAR* lpMenuTemplate)
1.1.1.2 root 986: { return Attach(::LoadMenuIndirect(lpMenuTemplate)); }
1.1 root 987: inline BOOL CMenu::TrackPopupMenu(UINT nFlags, int x, int y,
988: const CWnd* pWnd, const RECT FAR* lpRect)
989: { return ::TrackPopupMenu(m_hMenu, nFlags, x, y, 0, pWnd->m_hWnd,
990: lpRect); }
991:
992: // CWnd
993: inline HWND CWnd::GetSafeHwnd() const
994: { return this == NULL ? NULL : m_hWnd; }
995: inline CWnd::CWnd()
996: { m_hWnd = NULL; }
997: inline CWnd::CWnd(HWND hWnd)
998: { m_hWnd = hWnd; }
999: inline DWORD CWnd::GetStyle() const
1000: { return (DWORD)GetWindowLong(m_hWnd, GWL_STYLE); }
1001: inline DWORD CWnd::GetExStyle() const
1002: { return (DWORD)GetWindowLong(m_hWnd, GWL_EXSTYLE); }
1003: inline LONG CWnd::SendMessage(UINT message, UINT wParam, LONG lParam)
1004: { return ::SendMessage(m_hWnd, message, wParam, lParam); }
1005: inline BOOL CWnd::PostMessage(UINT message, UINT wParam, LONG lParam)
1006: { return ::PostMessage(m_hWnd, message, wParam, lParam); }
1007: inline void CWnd::SetWindowText(LPCSTR lpString)
1008: { ::SetWindowText(m_hWnd, lpString); }
1009: inline int CWnd::GetWindowText(LPSTR lpString, int nMaxCount) const
1010: { return ::GetWindowText(m_hWnd, lpString, nMaxCount); }
1011: inline int CWnd::GetWindowTextLength() const
1012: { return ::GetWindowTextLength(m_hWnd); }
1013: inline void CWnd::GetWindowText(CString& rString) const
1014: { int nLen = GetWindowTextLength();
1015: GetWindowText(rString.GetBufferSetLength(nLen), nLen+1); }
1016: inline void CWnd::SetFont(CFont* pFont, BOOL bRedraw /* = TRUE */)
1017: { SendMessage(WM_SETFONT, (UINT)pFont->GetSafeHandle(), bRedraw); }
1018: inline CFont* CWnd::GetFont()
1019: { return CFont::FromHandle((HFONT)SendMessage(WM_GETFONT)); }
1020: inline CMenu* CWnd::GetMenu() const
1021: { return CMenu::FromHandle(::GetMenu(m_hWnd)); }
1022: inline BOOL CWnd::SetMenu(CMenu* pMenu)
1023: { return ::SetMenu(m_hWnd, pMenu->GetSafeHmenu()); }
1024: inline void CWnd::DrawMenuBar()
1025: { ::DrawMenuBar(m_hWnd); }
1026: inline CMenu* CWnd::GetSystemMenu(BOOL bRevert) const
1027: { return CMenu::FromHandle(::GetSystemMenu(m_hWnd, bRevert)); }
1028: inline BOOL CWnd::HiliteMenuItem(CMenu* pMenu, UINT nIDHiliteItem, UINT nHilite)
1029: { return ::HiliteMenuItem(m_hWnd, pMenu->m_hMenu, nIDHiliteItem, nHilite); }
1030: inline int CWnd::GetDlgCtrlID() const
1031: { return ::GetDlgCtrlID(m_hWnd); }
1032: inline void CWnd::CloseWindow()
1033: { ::CloseWindow(m_hWnd); }
1034: inline BOOL CWnd::OpenIcon()
1035: { return ::OpenIcon(m_hWnd); }
1036: inline BOOL CWnd::IsIconic() const
1037: { return ::IsIconic(m_hWnd); }
1038: inline BOOL CWnd::IsZoomed() const
1039: { return ::IsZoomed(m_hWnd); }
1040: inline void CWnd::MoveWindow(int x, int y, int nWidth, int nHeight, BOOL bRepaint /* = TRUE */)
1041: { ::MoveWindow(m_hWnd, x, y, nWidth, nHeight, bRepaint); }
1042: inline void CWnd::MoveWindow(LPRECT lpRect, BOOL bRepaint /* = TRUE */)
1043: { ::MoveWindow(m_hWnd, lpRect->left, lpRect->top, lpRect->right - lpRect->left,
1044: lpRect->bottom - lpRect->top, bRepaint); }
1045: inline BOOL CWnd::SetWindowPos(const CWnd* pWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
1.1.1.3 ! root 1046: #if (WINVER >= 0x030a) || defined(_NTWIN)
1.1 root 1047: { return ::SetWindowPos(m_hWnd, pWndInsertAfter->GetSafeHwnd(),
1048: x, y, cx, cy, nFlags); }
1049: #else
1050: { ::SetWindowPos(m_hWnd, pWndInsertAfter->GetSafeHwnd(),
1051: x, y, cx, cy, nFlags); return TRUE; }
1052: #endif /* WINVER >= 0x030a */
1053: inline UINT CWnd::ArrangeIconicWindows()
1054: { return ::ArrangeIconicWindows(m_hWnd); }
1055: inline void CWnd::BringWindowToTop()
1056: { ::BringWindowToTop(m_hWnd); }
1057: inline void CWnd::GetWindowRect(LPRECT lpRect) const
1058: { ::GetWindowRect(m_hWnd, lpRect); }
1059: inline void CWnd::GetClientRect(LPRECT lpRect) const
1060: { ::GetClientRect(m_hWnd, lpRect); }
1061: #if (WINVER >= 0x030a)
1062: inline BOOL CWnd::GetWindowPlacement(WINDOWPLACEMENT FAR* lpwndpl) const
1063: { return ::GetWindowPlacement(m_hWnd, lpwndpl); }
1064: inline BOOL CWnd::SetWindowPlacement(const WINDOWPLACEMENT FAR* lpwndpl)
1.1.1.2 root 1065: { return ::SetWindowPlacement(m_hWnd, lpwndpl); }
1.1 root 1066: inline void CWnd::MapWindowPoints(CWnd* pwndTo, LPPOINT lpPoint, UINT nCount) const
1067: { ::MapWindowPoints(m_hWnd, pwndTo->GetSafeHwnd(), lpPoint, nCount); }
1068: inline void CWnd::MapWindowPoints(CWnd* pwndTo, LPRECT lpRect) const
1069: { ::MapWindowPoints(m_hWnd, pwndTo->GetSafeHwnd(), (LPPOINT)lpRect, 2); }
1070: #endif /* WINVER >= 0x030a */
1071: inline void CWnd::ClientToScreen(LPPOINT lpPoint) const
1072: { ::ClientToScreen(m_hWnd, lpPoint); }
1073: inline void CWnd::ClientToScreen(LPRECT lpRect) const
1074: { ::ClientToScreen(m_hWnd, (LPPOINT)lpRect);
1075: ::ClientToScreen(m_hWnd, ((LPPOINT)lpRect)+1); }
1076: inline void CWnd::ScreenToClient(LPPOINT lpPoint) const
1077: { ::ScreenToClient(m_hWnd, lpPoint); }
1078: inline void CWnd::ScreenToClient(LPRECT lpRect) const
1079: { ::ScreenToClient(m_hWnd, (LPPOINT)lpRect);
1080: ::ScreenToClient(m_hWnd, ((LPPOINT)lpRect)+1); }
1081: inline CDC* CWnd::BeginPaint(LPPAINTSTRUCT lpPaint)
1082: { return CDC::FromHandle(::BeginPaint(m_hWnd, lpPaint)); }
1083: inline void CWnd::EndPaint(LPPAINTSTRUCT lpPaint)
1084: { ::EndPaint(m_hWnd, lpPaint); }
1085: inline CDC* CWnd::GetDC()
1086: { return CDC::FromHandle(::GetDC(m_hWnd)); }
1087: #if (WINVER >= 0x030a)
1088: inline CDC* CWnd::GetDCEx(CRgn* prgnClip, DWORD flags)
1089: { return CDC::FromHandle(::GetDCEx(m_hWnd, (HRGN)prgnClip->GetSafeHandle(), flags)); }
1090: #endif /* WINVER >= 0x030a */
1091: inline CDC* CWnd::GetWindowDC()
1092: { return CDC::FromHandle(::GetWindowDC(m_hWnd)); }
1093: inline int CWnd::ReleaseDC(CDC* pDC)
1094: { return ::ReleaseDC(m_hWnd, pDC->m_hDC); }
1095: inline void CWnd::UpdateWindow()
1096: { ::UpdateWindow(m_hWnd); }
1097: inline void CWnd::SetRedraw(BOOL bRedraw /* = TRUE */)
1098: { ::SendMessage(m_hWnd, WM_SETREDRAW, bRedraw, 0); }
1099: inline BOOL CWnd::GetUpdateRect(LPRECT lpRect, BOOL bErase /* = FALSE */)
1100: { return ::GetUpdateRect(m_hWnd, lpRect, bErase); }
1101: inline int CWnd::GetUpdateRgn(CRgn* pRgn, BOOL bErase /* = FALSE */)
1102: { return ::GetUpdateRgn(m_hWnd, (HRGN)pRgn->m_hObject, bErase); }
1103: inline void CWnd::Invalidate(BOOL bErase /* = TRUE */)
1104: { ::InvalidateRect(m_hWnd, (LPRECT)NULL, bErase); }
1105: inline void CWnd::InvalidateRect(LPRECT lpRect, BOOL bErase /* = TRUE */)
1106: { ::InvalidateRect(m_hWnd, lpRect, bErase); }
1107: inline void CWnd::InvalidateRgn(CRgn* pRgn, BOOL bErase /* = TRUE */)
1108: { ::InvalidateRgn(m_hWnd, (HRGN)pRgn->GetSafeHandle(), bErase); }
1109: inline void CWnd::ValidateRect(LPRECT lpRect)
1110: { ::ValidateRect(m_hWnd, lpRect); }
1111: inline void CWnd::ValidateRgn(CRgn* pRgn)
1112: { ::ValidateRgn(m_hWnd, (HRGN)pRgn->GetSafeHandle()); }
1113: inline BOOL CWnd::ShowWindow(int nCmdShow)
1114: { return ::ShowWindow(m_hWnd, nCmdShow); }
1115: inline BOOL CWnd::IsWindowVisible() const
1116: { return ::IsWindowVisible(m_hWnd); }
1117: inline void CWnd::ShowOwnedPopups(BOOL bShow /* = TRUE */)
1118: { ::ShowOwnedPopups(m_hWnd, bShow); }
1119: #if (WINVER >= 0x030a)
1120: inline BOOL CWnd::LockWindowUpdate()
1121: { return ::LockWindowUpdate(m_hWnd); }
1122: inline BOOL CWnd::RedrawWindow(const RECT FAR* lpRectUpdate,
1123: CRgn* prgnUpdate,
1124: UINT flags /* = RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE */)
1125: { return ::RedrawWindow(m_hWnd, lpRectUpdate, (HRGN)prgnUpdate->GetSafeHandle(), flags); }
1126: inline BOOL CWnd::EnableScrollBar(int nBar,
1127: UINT nArrowFlags /* = ESB_ENABLE_BOTH */)
1128: { return (BOOL)::EnableScrollBar(m_hWnd, nBar, nArrowFlags); }
1129: #endif /* WINVER >= 0x030a */
1130: inline UINT CWnd::SetTimer(int nIDEvent, UINT nElapse,
1131: UINT (FAR PASCAL EXPORT* lpfnTimer)(HWND, UINT, int, DWORD))
1132: { return ::SetTimer(m_hWnd, nIDEvent, nElapse,
1133: (TIMERPROC)lpfnTimer); }
1134: inline BOOL CWnd::KillTimer(int nIDEvent)
1135: { return ::KillTimer(m_hWnd, nIDEvent); }
1136: inline BOOL CWnd::IsWindowEnabled() const
1137: { return ::IsWindowEnabled(m_hWnd); }
1138: inline BOOL CWnd::EnableWindow(BOOL bEnable /* = TRUE */)
1139: { return ::EnableWindow(m_hWnd, bEnable); }
1140: inline CWnd* CWnd::GetActiveWindow()
1141: { return CWnd::FromHandle(::GetActiveWindow()); }
1142: inline CWnd* CWnd::SetActiveWindow()
1143: { return CWnd::FromHandle(::SetActiveWindow(m_hWnd)); }
1144: inline CWnd* CWnd::GetCapture()
1145: { return CWnd::FromHandle(::GetCapture()); }
1146: inline CWnd* CWnd::SetCapture()
1147: { return CWnd::FromHandle(::SetCapture(m_hWnd)); }
1148: inline CWnd* CWnd::GetFocus()
1149: { return CWnd::FromHandle(::GetFocus()); }
1150: inline CWnd* CWnd::SetFocus()
1151: { return CWnd::FromHandle(::SetFocus(m_hWnd)); }
1152: inline CWnd* CWnd::SetSysModalWindow()
1153: { return CWnd::FromHandle(::SetSysModalWindow(m_hWnd)); }
1154: inline CWnd* CWnd::GetSysModalWindow()
1155: { return CWnd::FromHandle(::GetSysModalWindow()); }
1156: inline CWnd* CWnd::GetDesktopWindow()
1157: { return CWnd::FromHandle(::GetDesktopWindow()); }
1158: inline void CWnd::CheckDlgButton(int nIDButton, UINT nCheck)
1159: { ::CheckDlgButton(m_hWnd, nIDButton, nCheck); }
1160: inline void CWnd::CheckRadioButton(int nIDFirstButton, int nIDLastButton,
1161: int nIDCheckButton)
1162: { ::CheckRadioButton(m_hWnd, nIDFirstButton, nIDLastButton, nIDCheckButton); }
1163: inline int CWnd::DlgDirList(LPSTR lpPathSpec, int nIDListBox,
1164: int nIDStaticPath, UINT nFileType)
1165: { return ::DlgDirList(m_hWnd, lpPathSpec, nIDListBox,
1166: nIDStaticPath, nFileType); }
1167: inline int CWnd::DlgDirListComboBox(LPSTR lpPathSpec, int nIDComboBox,
1168: int nIDStaticPath, UINT nFileType)
1169: { return ::DlgDirListComboBox(m_hWnd, lpPathSpec,
1170: nIDComboBox, nIDStaticPath, nFileType); }
1171: inline BOOL CWnd::DlgDirSelect(LPSTR lpString, int nIDListBox)
1172: #ifdef _NTWIN
1173: { return ::DlgDirSelectEx(m_hWnd, lpString, _MAX_PATH, nIDListBox); }
1174: #else
1175: { return ::DlgDirSelect(m_hWnd, lpString, nIDListBox); }
1176: #endif
1177: inline BOOL CWnd::DlgDirSelectComboBox(LPSTR lpString, int nIDComboBox)
1178: #ifdef _NTWIN
1179: { return ::DlgDirSelectComboBoxEx(m_hWnd, lpString, _MAX_PATH, nIDComboBox);}
1180: #else
1181: { return ::DlgDirSelectComboBox(m_hWnd, lpString, nIDComboBox);}
1182: #endif
1183: inline CWnd* CWnd::GetDlgItem(int nID) const
1184: { return CWnd::FromHandle(::GetDlgItem(m_hWnd, nID)); }
1185: inline UINT CWnd::GetDlgItemInt(int nID, BOOL* lpTrans /* = NULL */,
1186: BOOL bSigned /* = TRUE */) const
1187: { return ::GetDlgItemInt(m_hWnd, nID, lpTrans, bSigned);}
1188: inline int CWnd::GetDlgItemText(int nID, LPSTR lpStr, int nMaxCount) const
1189: { return ::GetDlgItemText(m_hWnd, nID, lpStr, nMaxCount);}
1190: inline CWnd* CWnd::GetNextDlgGroupItem(CWnd* pWndCtl, BOOL bPrevious /* = FALSE */) const
1191: { return CWnd::FromHandle(::GetNextDlgGroupItem(m_hWnd,
1192: pWndCtl->m_hWnd, bPrevious)); }
1193: inline CWnd* CWnd::GetNextDlgTabItem(CWnd* pWndCtl, BOOL bPrevious /* = FALSE */) const
1194: { return CWnd::FromHandle(::GetNextDlgTabItem(m_hWnd,
1195: pWndCtl->m_hWnd, bPrevious)); }
1196: inline UINT CWnd::IsDlgButtonChecked(int nIDButton) const
1197: { return ::IsDlgButtonChecked(m_hWnd, nIDButton); }
1198: inline LONG CWnd::SendDlgItemMessage(int nID, UINT message, UINT wParam /* = 0 */, LONG lParam /* = 0 */)
1199: { return ::SendDlgItemMessage(m_hWnd, nID, message, wParam, lParam); }
1200: inline void CWnd::SetDlgItemInt(int nID, UINT nValue, BOOL bSigned /* = TRUE */)
1201: { ::SetDlgItemInt(m_hWnd, nID, nValue, bSigned); }
1202: inline void CWnd::SetDlgItemText(int nID, LPCSTR lpString)
1203: { ::SetDlgItemText(m_hWnd, nID, lpString); }
1204: inline int CWnd::GetScrollPos(int nBar) const
1205: { return ::GetScrollPos(m_hWnd, nBar); }
1206: inline void CWnd::GetScrollRange(int nBar, LPINT lpMinPos, LPINT lpMaxPos) const
1207: { ::GetScrollRange(m_hWnd, nBar, lpMinPos, lpMaxPos); }
1208: inline void CWnd::ScrollWindow(int xAmount, int yAmount,
1209: const RECT FAR* lpRect /* = NULL */,
1210: const RECT FAR* lpClipRect /* = NULL */)
1211: {::ScrollWindow(m_hWnd, xAmount, yAmount, lpRect, lpClipRect); }
1212: #if (WINVER >= 0x030a)
1213: inline int CWnd::ScrollWindowEx(int dx, int dy,
1214: const RECT FAR* lpScrollRect, const RECT FAR* lpClipRect,
1215: CRgn* prgnUpdate, LPRECT lpUpdateRect, UINT flags)
1216: { return ::ScrollWindowEx(m_hWnd, dx, dy, lpScrollRect, lpClipRect,
1217: (HRGN)prgnUpdate->GetSafeHandle(), lpUpdateRect, flags); }
1218: #endif /* WINVER >= 0x030a */
1219: inline int CWnd::SetScrollPos(int nBar, int nPos, BOOL bRedraw /* = TRUE */)
1220: { return ::SetScrollPos(m_hWnd, nBar, nPos, bRedraw); }
1221: inline void CWnd::SetScrollRange(int nBar, int nMinPos, int nMaxPos,
1222: BOOL bRedraw /* = TRUE */)
1223: { ::SetScrollRange(m_hWnd, nBar, nMinPos, nMaxPos, bRedraw); }
1224: inline void CWnd::ShowScrollBar(UINT nBar, BOOL bShow /* = TRUE */)
1225: { ::ShowScrollBar(m_hWnd, nBar, bShow); }
1226: inline CWnd* CWnd::ChildWindowFromPoint(POINT point) const
1227: { return CWnd::FromHandle(::ChildWindowFromPoint(m_hWnd, point)); }
1228: inline CWnd* CWnd::FindWindow(LPCSTR lpClassName, LPCSTR lpWindowName)
1229: { return CWnd::FromHandle(
1230: ::FindWindow(lpClassName, lpWindowName)); }
1231: inline CWnd* CWnd::GetNextWindow(UINT nFlag /* = GW_HWNDNEXT */) const
1232: { return CWnd::FromHandle(::GetNextWindow(m_hWnd, nFlag)); }
1233: inline CWnd* CWnd::GetTopWindow() const
1234: { return CWnd::FromHandle(::GetTopWindow(m_hWnd)); }
1235: inline CWnd* CWnd::GetWindow(UINT nCmd) const
1236: { return CWnd::FromHandle(::GetWindow(m_hWnd, nCmd)); }
1237: inline CWnd* CWnd::GetLastActivePopup() const
1238: { return CWnd::FromHandle(::GetLastActivePopup(m_hWnd)); }
1239: inline BOOL CWnd::IsChild(CWnd* pWnd) const
1240: { return ::IsChild(m_hWnd, pWnd->GetSafeHwnd()); }
1241: inline CWnd* CWnd::GetParent() const
1242: { return CWnd::FromHandle(::GetParent(m_hWnd)); }
1243: inline CWnd* CWnd::SetParent(CWnd* pWndNewParent)
1244: { return CWnd::FromHandle(::SetParent(m_hWnd,
1245: pWndNewParent->GetSafeHwnd())); }
1246: inline CWnd* CWnd::WindowFromPoint(POINT point)
1247: { return CWnd::FromHandle(::WindowFromPoint(point)); }
1248: inline BOOL CWnd::FlashWindow(BOOL bInvert)
1249: { return ::FlashWindow(m_hWnd, bInvert); }
1250: inline int CWnd::MessageBox(LPCSTR lpText, LPCSTR lpCaption /* = NULL */,
1251: UINT nType /* = MB_OK */)
1252: { return ::MessageBox(GetSafeHwnd(), lpText, lpCaption,nType); }
1253: inline BOOL CWnd::ChangeClipboardChain(HWND hWndNext)
1254: { return ::ChangeClipboardChain(m_hWnd, hWndNext); }
1255: inline HWND CWnd::SetClipboardViewer()
1256: { return ::SetClipboardViewer(m_hWnd); }
1257: inline BOOL CWnd::OpenClipboard()
1258: { return ::OpenClipboard(m_hWnd); }
1259: #if (WINVER >= 0x030a)
1260: inline CWnd* CWnd::GetOpenClipboardWindow()
1261: { return CWnd::FromHandle(::GetOpenClipboardWindow()); }
1262: #endif /* WINVER >= 0x030a */
1263: inline CWnd* CWnd::GetClipboardOwner()
1264: { return CWnd::FromHandle(::GetClipboardOwner()); }
1265: inline CWnd* CWnd::GetClipboardViewer()
1266: { return CWnd::FromHandle(::GetClipboardViewer()); }
1267: inline void CWnd::CreateCaret(CBitmap* pBitmap)
1268: { ::CreateCaret(m_hWnd, (HBITMAP)pBitmap->GetSafeHandle(), 0, 0); }
1269: inline void CWnd::CreateSolidCaret(int nWidth, int nHeight)
1270: { ::CreateCaret(m_hWnd, (HBITMAP)0, nWidth, nHeight); }
1271: inline void CWnd::CreateGrayCaret(int nWidth, int nHeight)
1272: { ::CreateCaret(m_hWnd, (HBITMAP)1, nWidth, nHeight); }
1273: inline CPoint CWnd::GetCaretPos()
1274: { CPoint point; ::GetCaretPos((LPPOINT)&point); return point; }
1275: inline void CWnd::SetCaretPos(POINT point)
1276: { ::SetCaretPos(point.x, point.y); }
1277: inline void CWnd::HideCaret()
1278: { ::HideCaret(m_hWnd); }
1279: inline void CWnd::ShowCaret()
1280: { ::ShowCaret(m_hWnd); }
1281: inline afx_msg void CWnd::OnActivate(UINT, CWnd*, BOOL)
1282: { Default(); }
1283: inline afx_msg void CWnd::OnActivateApp(BOOL, HANDLE)
1284: { Default(); }
1285: inline afx_msg void CWnd::OnCancelMode()
1286: { Default(); }
1287: inline afx_msg void CWnd::OnChildActivate()
1288: { Default(); }
1289: inline afx_msg void CWnd::OnClose()
1290: { Default(); }
1291: inline afx_msg int CWnd::OnCreate(LPCREATESTRUCT)
1292: { return (int)Default(); }
1293: inline afx_msg HBRUSH CWnd::OnCtlColor(CDC*, CWnd*, UINT)
1294: { return (HBRUSH)Default(); }
1295: inline afx_msg void CWnd::OnEnable(BOOL)
1296: { Default(); }
1297: inline afx_msg void CWnd::OnEndSession(BOOL)
1298: { Default(); }
1299: inline afx_msg void CWnd::OnEnterIdle(UINT, CWnd*)
1300: { Default(); }
1301: inline afx_msg BOOL CWnd::OnEraseBkgnd(CDC*)
1302: { return (BOOL)Default(); }
1303: inline afx_msg void CWnd::OnGetMinMaxInfo(LPPOINT)
1304: { Default(); }
1305: inline afx_msg void CWnd::OnIconEraseBkgnd(CDC*)
1306: { Default(); }
1307: inline afx_msg void CWnd::OnKillFocus(CWnd*)
1308: { Default(); }
1309: inline afx_msg LONG CWnd::OnMenuChar(UINT, UINT, CMenu*)
1310: { return Default(); }
1311: inline afx_msg void CWnd::OnMenuSelect(UINT, UINT, HMENU)
1312: { Default(); }
1313: inline afx_msg void CWnd::OnMove(int, int)
1314: { Default(); }
1315: inline afx_msg void CWnd::OnPaint()
1316: { Default(); }
1317: inline afx_msg void CWnd::OnParentNotify(UINT, LONG)
1318: { Default(); }
1319: inline afx_msg HCURSOR CWnd::OnQueryDragIcon()
1320: { return (HCURSOR)Default(); }
1321: inline afx_msg BOOL CWnd::OnQueryEndSession()
1322: { return (BOOL)Default(); }
1323: inline afx_msg BOOL CWnd::OnQueryNewPalette()
1324: { return (BOOL)Default(); }
1325: inline afx_msg BOOL CWnd::OnQueryOpen()
1326: { return (BOOL)Default(); }
1327: inline afx_msg void CWnd::OnSetFocus(CWnd*)
1328: { Default(); }
1329: inline afx_msg void CWnd::OnShowWindow(BOOL, UINT)
1330: { Default(); }
1331: inline afx_msg void CWnd::OnSize(UINT, int, int)
1332: { Default(); }
1333:
1334: #if (WINVER >= 0x030a)
1335: inline afx_msg void CWnd::OnWindowPosChanging(WINDOWPOS FAR*)
1336: { Default(); }
1337: inline afx_msg void CWnd::OnWindowPosChanged(WINDOWPOS FAR*)
1338: { Default(); }
1339: inline afx_msg void CWnd::OnDropFiles(HANDLE)
1340: { Default(); }
1341: inline afx_msg void CWnd::OnPaletteIsChanging(CWnd*)
1342: { Default(); }
1343: #endif /* WINVER >= 0x030a */
1344:
1345: inline afx_msg BOOL CWnd::OnNcActivate(BOOL)
1346: { return (BOOL)Default(); }
1347: inline afx_msg void CWnd::OnNcCalcSize(NCCALCSIZE_PARAMS FAR*)
1348: { Default(); }
1349: inline afx_msg BOOL CWnd::OnNcCreate(LPCREATESTRUCT)
1350: { return (BOOL)Default(); }
1351: inline afx_msg UINT CWnd::OnNcHitTest(CPoint)
1352: { return (UINT)Default(); }
1353: inline afx_msg void CWnd::OnNcLButtonDblClk(UINT, CPoint)
1354: { Default(); }
1355: inline afx_msg void CWnd::OnNcLButtonDown(UINT, CPoint)
1356: { Default(); }
1357: inline afx_msg void CWnd::OnNcLButtonUp(UINT, CPoint)
1358: { Default(); }
1359: inline afx_msg void CWnd::OnNcMButtonDblClk(UINT, CPoint)
1360: { Default(); }
1361: inline afx_msg void CWnd::OnNcMButtonDown(UINT, CPoint)
1362: { Default(); }
1363: inline afx_msg void CWnd::OnNcMButtonUp(UINT, CPoint)
1364: { Default(); }
1365: inline afx_msg void CWnd::OnNcMouseMove(UINT, CPoint)
1366: { Default(); }
1367: inline afx_msg void CWnd::OnNcPaint()
1368: { Default(); }
1369: inline afx_msg void CWnd::OnNcRButtonDblClk(UINT, CPoint)
1370: { Default(); }
1371: inline afx_msg void CWnd::OnNcRButtonDown(UINT, CPoint)
1372: { Default(); }
1373: inline afx_msg void CWnd::OnNcRButtonUp(UINT, CPoint)
1374: { Default(); }
1375: inline afx_msg void CWnd::OnSysChar(UINT, UINT, UINT)
1376: { Default(); }
1377: inline afx_msg void CWnd::OnSysCommand(UINT, LONG)
1378: { Default(); }
1379: inline afx_msg void CWnd::OnSysDeadChar(UINT, UINT, UINT)
1380: { Default(); }
1381: inline afx_msg void CWnd::OnSysKeyDown(UINT, UINT, UINT)
1382: { Default(); }
1383: inline afx_msg void CWnd::OnSysKeyUp(UINT, UINT, UINT)
1384: { Default(); }
1385: inline afx_msg void CWnd::OnCompacting(UINT)
1386: { Default(); }
1387: inline afx_msg void CWnd::OnDevModeChange(LPSTR)
1388: { Default(); }
1389: inline afx_msg void CWnd::OnFontChange()
1390: { Default(); }
1391: inline afx_msg void CWnd::OnPaletteChanged(CWnd*)
1392: { Default(); }
1393: inline afx_msg void CWnd::OnSpoolerStatus(UINT, UINT)
1394: { Default(); }
1395: inline afx_msg void CWnd::OnSysColorChange()
1396: { Default(); }
1397: inline afx_msg void CWnd::OnTimeChange()
1398: { Default(); }
1399: inline afx_msg void CWnd::OnWinIniChange(LPSTR)
1400: { Default(); }
1401: inline afx_msg void CWnd::OnChar(UINT, UINT, UINT)
1402: { Default(); }
1403: inline afx_msg void CWnd::OnDeadChar(UINT, UINT, UINT)
1404: { Default(); }
1405: inline afx_msg void CWnd::OnHScroll(UINT, UINT, CScrollBar*)
1406: { Default(); }
1407: inline afx_msg void CWnd::OnKeyDown(UINT, UINT, UINT)
1408: { Default(); }
1409: inline afx_msg void CWnd::OnKeyUp(UINT, UINT, UINT)
1410: { Default(); }
1411: inline afx_msg void CWnd::OnLButtonDblClk(UINT, CPoint)
1412: { Default(); }
1413: inline afx_msg void CWnd::OnLButtonDown(UINT, CPoint)
1414: { Default(); }
1415: inline afx_msg void CWnd::OnLButtonUp(UINT, CPoint)
1416: { Default(); }
1417: inline afx_msg void CWnd::OnMButtonDblClk(UINT, CPoint)
1418: { Default(); }
1419: inline afx_msg void CWnd::OnMButtonDown(UINT, CPoint)
1420: { Default(); }
1421: inline afx_msg void CWnd::OnMButtonUp(UINT, CPoint)
1422: { Default(); }
1423: inline afx_msg int CWnd::OnMouseActivate(CWnd*, UINT, UINT)
1424: { return (int)Default(); }
1425: inline afx_msg void CWnd::OnMouseMove(UINT, CPoint)
1426: { Default(); }
1427: inline afx_msg void CWnd::OnRButtonDblClk(UINT, CPoint)
1428: { Default(); }
1429: inline afx_msg void CWnd::OnRButtonDown(UINT, CPoint)
1430: { Default(); }
1431: inline afx_msg void CWnd::OnRButtonUp(UINT, CPoint)
1432: { Default(); }
1433: inline afx_msg BOOL CWnd::OnSetCursor(CWnd*, UINT, UINT)
1434: { return (BOOL)Default(); }
1435: inline afx_msg void CWnd::OnTimer(UINT)
1436: { Default(); }
1437: inline afx_msg void CWnd::OnVScroll(UINT, UINT, CScrollBar*)
1438: { Default(); }
1439: inline afx_msg void CWnd::OnInitMenu(CMenu*)
1440: { Default(); }
1441: inline afx_msg void CWnd::OnInitMenuPopup(CMenu*, UINT, BOOL)
1442: { Default(); }
1443: inline afx_msg void CWnd::OnAskCbFormatName(UINT, LPSTR)
1444: { Default(); }
1445: inline afx_msg void CWnd::OnChangeCbChain(HWND, HWND)
1446: { Default(); }
1447: inline afx_msg void CWnd::OnDestroyClipboard()
1448: { Default(); }
1449: inline afx_msg void CWnd::OnDrawClipboard()
1450: { Default(); }
1451: inline afx_msg void CWnd::OnHScrollClipboard(CWnd*, UINT, UINT)
1452: { Default(); }
1453: inline afx_msg void CWnd::OnPaintClipboard(CWnd*, HANDLE)
1454: { Default(); }
1455: inline afx_msg void CWnd::OnRenderAllFormats()
1456: { Default(); }
1457: inline afx_msg void CWnd::OnRenderFormat(UINT)
1458: { Default(); }
1459: inline afx_msg void CWnd::OnSizeClipboard(CWnd*, HANDLE)
1460: { Default(); }
1461: inline afx_msg void CWnd::OnVScrollClipboard(CWnd*, UINT, UINT)
1462: { Default(); }
1463: inline afx_msg int CWnd::OnCharToItem(UINT, CListBox*, UINT)
1464: { return (int)Default(); }
1465: inline afx_msg UINT CWnd::OnGetDlgCode()
1466: { return (UINT)Default(); }
1467: inline afx_msg int CWnd::OnVKeyToItem(UINT, CListBox*, UINT)
1468: { return (int)Default(); }
1469: inline afx_msg void CWnd::OnMDIActivate(BOOL, CWnd*, CWnd*)
1470: { Default(); }
1471:
1472: // CDialog inline functions
1473: inline BOOL CDialog::Create(UINT nIDTemplate, CWnd* pParentWnd /* = NULL */)
1474: { return Create(MAKEINTRESOURCE(nIDTemplate), pParentWnd); }
1475: inline void CDialog::MapDialogRect(LPRECT lpRect) const
1476: { ::MapDialogRect(m_hWnd, lpRect); }
1477: inline BOOL CDialog::IsDialogMessage(LPMSG lpMsg)
1478: { return ::IsDialogMessage(m_hWnd, lpMsg); }
1479: inline void CDialog::NextDlgCtrl() const
1480: { ::SendMessage(m_hWnd, WM_NEXTDLGCTL, 0, 0); }
1481: inline void CDialog::PrevDlgCtrl() const
1482: { ::SendMessage(m_hWnd, WM_NEXTDLGCTL, 1, 0); }
1483: inline void CDialog::GotoDlgCtrl(CWnd* pWndCtrl)
1484: { ::SendMessage(m_hWnd, WM_NEXTDLGCTL, (UINT)pWndCtrl->m_hWnd, 1L); }
1485: inline void CDialog::SetDefID(UINT nID)
1486: { ::SendMessage(m_hWnd, DM_SETDEFID, nID, 0); }
1487: inline DWORD CDialog::GetDefID()
1488: { return ::SendMessage(m_hWnd, DM_GETDEFID, 0, 0); }
1489: inline void CDialog::EndDialog(int nResult)
1490: { ::EndDialog(m_hWnd, nResult); }
1491:
1492: // Window control inline functions
1493: inline CStatic::CStatic()
1494: { }
1495: inline CButton::CButton()
1496: { }
1497: #if (WINVER >= 0x030a)
1498: inline HICON CStatic::SetIcon(HICON hIcon)
1499: { return (HICON)::SendMessage(m_hWnd, STM_SETICON, (WPARAM)hIcon, 0L); }
1500: inline HICON CStatic::GetIcon() const
1501: { return (HICON)::SendMessage(m_hWnd, STM_GETICON, 0, 0L); }
1502: #endif /* WINVER >= 0x030a */
1503:
1504: inline UINT CButton::GetState() const
1505: { return (UINT)::SendMessage(m_hWnd, BM_GETSTATE, 0, 0); }
1506: inline void CButton::SetState(BOOL bHighlight)
1507: { ::SendMessage(m_hWnd, BM_SETSTATE, bHighlight, 0); }
1508: inline int CButton::GetCheck() const
1509: { return (BOOL)::SendMessage(m_hWnd, BM_GETCHECK, 0, 0); }
1510: inline void CButton::SetCheck(int nCheck)
1511: { ::SendMessage(m_hWnd, BM_SETCHECK, nCheck, 0); }
1512: inline UINT CButton::GetButtonStyle() const
1513: { return (UINT)GetWindowLong(m_hWnd, GWL_STYLE) & 0xff; }
1514: inline void CButton::SetButtonStyle(UINT nStyle, BOOL bRedraw /* = TRUE */)
1515: { ::SendMessage(m_hWnd, BM_SETSTYLE, nStyle, (LONG)bRedraw); }
1516: inline CListBox::CListBox()
1517: { }
1518: inline int CListBox::GetCount() const
1519: { return (int)::SendMessage(m_hWnd, LB_GETCOUNT, 0, 0); }
1520: inline int CListBox::GetCurSel() const
1521: { return (int)::SendMessage(m_hWnd, LB_GETCURSEL, 0, 0); }
1522: inline int CListBox::SetCurSel(int nSelect)
1523: { return (int)::SendMessage(m_hWnd, LB_SETCURSEL, nSelect, 0); }
1524: inline int CListBox::GetHorizontalExtent() const
1525: { return (int)::SendMessage(m_hWnd, LB_GETHORIZONTALEXTENT,
1526: 0, 0); }
1527: inline void CListBox::SetHorizontalExtent(int cxExtent)
1528: { ::SendMessage(m_hWnd, LB_SETHORIZONTALEXTENT, cxExtent, 0); }
1529: inline int CListBox::GetSelCount() const
1530: { return (int)::SendMessage(m_hWnd, LB_GETSELCOUNT, 0, 0); }
1531: inline int CListBox::GetSelItems(int nMaxItems, LPINT rgIndex) const
1532: { return (int)::SendMessage(m_hWnd, LB_GETSELITEMS, nMaxItems, (LONG)rgIndex); }
1533: inline int CListBox::GetTopIndex() const
1534: { return (int)::SendMessage(m_hWnd, LB_GETTOPINDEX, 0, 0); }
1535: inline int CListBox::SetTopIndex(int nIndex)
1536: { return (int)::SendMessage(m_hWnd, LB_SETTOPINDEX, nIndex, 0);}
1537: inline DWORD CListBox::GetItemData(int nIndex) const
1538: { return ::SendMessage(m_hWnd, LB_GETITEMDATA, nIndex, 0); }
1539: inline int CListBox::SetItemData(int nIndex, DWORD dwItemData)
1540: { return (int)::SendMessage(m_hWnd, LB_SETITEMDATA, nIndex, (LONG)dwItemData); }
1541: inline int CListBox::GetItemRect(int nIndex, LPRECT lpRect) const
1542: { return (int)::SendMessage(m_hWnd, LB_GETITEMRECT, nIndex, (LONG)lpRect); }
1543: inline int CListBox::GetSel(int nIndex) const
1544: { return (int)::SendMessage(m_hWnd, LB_GETSEL, nIndex, 0); }
1545: inline int CListBox::SetSel(int nIndex, BOOL bSelect)
1546: { return (int)::SendMessage(m_hWnd, LB_SETSEL, bSelect, nIndex); }
1547: inline int CListBox::GetText(int nIndex, LPSTR lpBuffer) const
1548: { return (int)::SendMessage(m_hWnd, LB_GETTEXT, nIndex, (LONG)lpBuffer); }
1549: inline int CListBox::GetTextLen(int nIndex) const
1550: { return (int)::SendMessage(m_hWnd, LB_GETTEXTLEN, nIndex, 0); }
1551: inline void CListBox::GetText(int nIndex, CString& rString) const
1552: { GetText(nIndex, rString.GetBufferSetLength(GetTextLen(nIndex))); }
1553: inline void CListBox::SetColumnWidth(int cxWidth)
1554: { ::SendMessage(m_hWnd, LB_SETCOLUMNWIDTH, cxWidth, 0); }
1555: inline BOOL CListBox::SetTabStops(int nTabStops, LPINT rgTabStops)
1556: { return (BOOL)::SendMessage(m_hWnd, LB_SETTABSTOPS, nTabStops, (LONG)rgTabStops); }
1557: inline void CListBox::SetTabStops()
1558: { VERIFY(::SendMessage(m_hWnd, LB_SETTABSTOPS, 0, 0)); }
1559: inline BOOL CListBox::SetTabStops(int cxEachStop)
1560: { return (BOOL)::SendMessage(m_hWnd, LB_SETTABSTOPS, 1, (LONG)(LPINT)&cxEachStop); }
1561: #if (WINVER >= 0x030a)
1562: inline int CListBox::SetItemHeight(int nIndex, UINT cyItemHeight)
1563: { return (int)::SendMessage(m_hWnd, LB_SETITEMHEIGHT, nIndex, MAKELONG(cyItemHeight, 0)); }
1564: inline int CListBox::GetItemHeight(int nIndex) const
1565: { return (int)::SendMessage(m_hWnd, LB_GETITEMHEIGHT, nIndex, 0L); }
1566: inline int CListBox::FindStringExact(int nIndexStart, LPCSTR lpszFind) const
1567: { return (int)::SendMessage(m_hWnd, LB_FINDSTRINGEXACT, nIndexStart, (LONG)lpszFind); }
1568: inline int CListBox::GetCaretIndex() const
1569: { return (int)::SendMessage(m_hWnd, LB_GETCARETINDEX, 0, 0L); }
1570: inline int CListBox::SetCaretIndex(int nIndex, BOOL bScroll /* = TRUE */)
1571: { return (int)::SendMessage(m_hWnd, LB_SETCARETINDEX, nIndex, MAKELONG(bScroll, 0)); }
1572: #endif /* WINVER >= 0x030a */
1573: inline int CListBox::AddString(LPCSTR lpItem)
1574: { return (int)::SendMessage(m_hWnd, LB_ADDSTRING, 0, (LONG)lpItem); }
1575: inline int CListBox::DeleteString(UINT nIndex)
1576: { return (int)::SendMessage(m_hWnd, LB_DELETESTRING, nIndex, 0); }
1577: inline int CListBox::InsertString(int nIndex, LPCSTR lpItem)
1578: { return (int)::SendMessage(m_hWnd, LB_INSERTSTRING, nIndex, (LONG)lpItem); }
1579: inline void CListBox::ResetContent()
1580: { ::SendMessage(m_hWnd, LB_RESETCONTENT, 0, 0); }
1581: inline int CListBox::Dir(UINT attr, LPCSTR lpWildCard)
1582: { return (int)::SendMessage(m_hWnd, LB_DIR, attr, (LONG)lpWildCard); }
1583: inline int CListBox::FindString(int nStartAfter, LPCSTR lpItem) const
1584: { return (int)::SendMessage(m_hWnd, LB_FINDSTRING,
1585: nStartAfter, (LONG)lpItem); }
1586: inline int CListBox::SelectString(int nStartAfter, LPCSTR lpItem)
1587: { return (int)::SendMessage(m_hWnd, LB_SELECTSTRING,
1588: nStartAfter, (LONG)lpItem); }
1589: inline int CListBox::SelItemRange(BOOL bSelect, int nFirstItem, int nLastItem)
1590: { return (int)::SendMessage(m_hWnd, LB_SELITEMRANGE, bSelect,
1591: MAKELONG(nFirstItem, nLastItem)); }
1592: inline CComboBox::CComboBox()
1593: { }
1594: inline int CComboBox::GetCount() const
1595: { return (int)::SendMessage(m_hWnd, CB_GETCOUNT, 0, 0); }
1596: inline int CComboBox::GetCurSel() const
1597: { return (int)::SendMessage(m_hWnd, CB_GETCURSEL, 0, 0); }
1598: inline int CComboBox::SetCurSel(int nSelect)
1599: { return (int)::SendMessage(m_hWnd, CB_SETCURSEL, nSelect, 0); }
1600: inline DWORD CComboBox::GetEditSel() const
1601: { return ::SendMessage(m_hWnd, CB_GETEDITSEL, 0, 0); }
1602: inline BOOL CComboBox::LimitText(int nMaxChars)
1603: { return (BOOL)::SendMessage(m_hWnd, CB_LIMITTEXT, nMaxChars, 0); }
1604: inline BOOL CComboBox::SetEditSel(int nStartChar, int nEndChar)
1605: { return (BOOL)::SendMessage(m_hWnd, CB_SETEDITSEL, 0, MAKELONG(nStartChar, nEndChar)); }
1606: inline DWORD CComboBox::GetItemData(int nIndex) const
1607: { return ::SendMessage(m_hWnd, CB_GETITEMDATA, nIndex, 0); }
1608: inline int CComboBox::SetItemData(int nIndex, DWORD dwItemData)
1609: { return (int)::SendMessage(m_hWnd, CB_SETITEMDATA, nIndex, (LONG)dwItemData); }
1610: inline int CComboBox::GetLBText(int nIndex, LPSTR lpText) const
1611: { return (int)::SendMessage(m_hWnd, CB_GETLBTEXT, nIndex, (LONG)lpText); }
1612: inline int CComboBox::GetLBTextLen(int nIndex) const
1613: { return (int)::SendMessage(m_hWnd, CB_GETLBTEXTLEN, nIndex, 0); }
1614: inline void CComboBox::GetLBText(int nIndex, CString& rString) const
1615: { GetLBText(nIndex, rString.GetBufferSetLength(GetLBTextLen(nIndex))); }
1616: inline void CComboBox::ShowDropDown(BOOL bShowIt /* = TRUE */)
1617: { ::SendMessage(m_hWnd, CB_SHOWDROPDOWN, bShowIt, 0); }
1618: inline int CComboBox::AddString(LPCSTR lpString)
1619: { return (int)::SendMessage(m_hWnd, CB_ADDSTRING, 0, (LONG)lpString); }
1620: inline int CComboBox::DeleteString(UINT nIndex)
1621: { return (int)::SendMessage(m_hWnd, CB_DELETESTRING, nIndex, 0);}
1622: inline int CComboBox::InsertString(int nIndex, LPCSTR lpString)
1623: { return (int)::SendMessage(m_hWnd, CB_INSERTSTRING, nIndex, (LONG)lpString); }
1624: inline void CComboBox::ResetContent()
1625: { ::SendMessage(m_hWnd, CB_RESETCONTENT, 0, 0); }
1626: inline int CComboBox::Dir(UINT attr, LPCSTR lpWildCard)
1627: { return (int)::SendMessage(m_hWnd, CB_DIR, attr, (LONG)lpWildCard); }
1628: inline int CComboBox::FindString(int nStartAfter, LPCSTR lpString) const
1629: { return (int)::SendMessage(m_hWnd, CB_FINDSTRING, nStartAfter,
1630: (LONG)lpString); }
1631: inline int CComboBox::SelectString(int nStartAfter, LPCSTR lpString)
1632: { return (int)::SendMessage(m_hWnd, CB_SELECTSTRING,
1633: nStartAfter, (LONG)lpString); }
1634: inline void CComboBox::Clear()
1635: { ::SendMessage(m_hWnd, WM_CLEAR, 0, 0); }
1636: inline void CComboBox::Copy()
1637: { ::SendMessage(m_hWnd, WM_COPY, 0, 0); }
1638: inline void CComboBox::Cut()
1639: { ::SendMessage(m_hWnd, WM_CUT, 0, 0); }
1640: inline void CComboBox::Paste()
1641: { ::SendMessage(m_hWnd, WM_PASTE, 0, 0); }
1642: #if (WINVER >= 0x030a)
1643: inline int CComboBox::SetItemHeight(int nIndex, UINT cyItemHeight)
1644: { return (int)::SendMessage(m_hWnd, CB_SETITEMHEIGHT, nIndex, MAKELONG(cyItemHeight, 0)); }
1645: inline int CComboBox::GetItemHeight(int nIndex) const
1646: { return (int)::SendMessage(m_hWnd, CB_GETITEMHEIGHT, nIndex, 0L); }
1647: inline int CComboBox::FindStringExact(int nIndexStart, LPCSTR lpszFind) const
1648: { return (int)::SendMessage(m_hWnd, CB_FINDSTRINGEXACT, nIndexStart, (LONG)lpszFind); }
1649: inline int CComboBox::SetExtendedUI(BOOL bExtended /* = TRUE */ )
1650: { return (int)::SendMessage(m_hWnd, CB_SETEXTENDEDUI, bExtended, 0L); }
1651: inline BOOL CComboBox::GetExtendedUI() const
1652: { return (BOOL)::SendMessage(m_hWnd, CB_GETEXTENDEDUI, 0, 0L); }
1653: inline void CComboBox::GetDroppedControlRect(LPRECT lprect) const
1654: { ::SendMessage(m_hWnd, CB_GETDROPPEDCONTROLRECT, 0, (DWORD)lprect); }
1655: inline BOOL CComboBox::GetDroppedState() const
1656: { return (BOOL)::SendMessage(m_hWnd, CB_GETDROPPEDSTATE, 0, 0L); }
1657: #endif /* WINVER >= 0x030a */
1658:
1659: inline CEdit::CEdit()
1660: { }
1661: inline BOOL CEdit::CanUndo() const
1662: { return (BOOL)::SendMessage(m_hWnd, EM_CANUNDO, 0, 0); }
1663: inline int CEdit::GetLineCount() const
1664: { return (int)::SendMessage(m_hWnd, EM_GETLINECOUNT, 0, 0); }
1665: inline BOOL CEdit::GetModify() const
1666: { return (BOOL)::SendMessage(m_hWnd, EM_GETMODIFY, 0, 0); }
1667: inline void CEdit::SetModify(BOOL bModified /* = TRUE */)
1668: { ::SendMessage(m_hWnd, EM_SETMODIFY, bModified, 0); }
1669: inline void CEdit::GetRect(LPRECT lpRect) const
1670: { ::SendMessage(m_hWnd, EM_GETRECT, 0, (LONG)lpRect); }
1671: inline DWORD CEdit::GetSel() const
1672: { return ::SendMessage(m_hWnd, EM_GETSEL, 0, 0); }
1.1.1.2 root 1673: inline void CEdit::GetSel(int& nStartChar, int& nEndChar) const
1674: #ifdef _NTWIN
1675: { ::SendMessage(m_hWnd, EM_GETSEL, (WPARAM)&nStartChar,(LPARAM)&nEndChar); }
1676: #else
1677: {
1678: DWORD dwSel = (DWORD)::SendMessage(m_hWnd, EM_GETSEL, 0, 0);
1679: nStartChar = (int)LOWORD(dwSel);
1680: nEndChar = (int)HIWORD(dwSel);
1681: }
1682: #endif
1.1 root 1683: inline HANDLE CEdit::GetHandle() const
1684: { return (HANDLE)::SendMessage(m_hWnd, EM_GETHANDLE, 0, 0); }
1685: inline void CEdit::SetHandle(HANDLE hBuffer)
1686: { ::SendMessage(m_hWnd, EM_SETHANDLE, (UINT)hBuffer, 0); }
1687: inline int CEdit::GetLine(int nIndex, LPSTR lpBuffer) const
1688: { return (int)::SendMessage(m_hWnd, EM_GETLINE, nIndex, (LONG)lpBuffer); }
1689: inline int CEdit::GetLine(int nIndex, LPSTR lpBuffer, int nMaxLength) const
1690: {
1691: *(LPINT)lpBuffer = nMaxLength;
1692: return (int)::SendMessage(m_hWnd, EM_GETLINE, nIndex,
1693: (LONG)lpBuffer);
1694: }
1695: inline void CEdit::EmptyUndoBuffer()
1696: { ::SendMessage(m_hWnd, EM_EMPTYUNDOBUFFER, 0, 0); }
1697: inline BOOL CEdit::FmtLines(BOOL bAddEOL)
1698: { return (BOOL)::SendMessage(m_hWnd, EM_FMTLINES, bAddEOL, 0); }
1699: inline void CEdit::LimitText(int nChars /* = 0 */)
1700: { ::SendMessage(m_hWnd, EM_LIMITTEXT, nChars, 0); }
1701: inline int CEdit::LineFromChar(int nIndex /* = -1 */) const
1702: { return (int)::SendMessage(m_hWnd, EM_LINEFROMCHAR, nIndex, 0); }
1703: inline int CEdit::LineIndex(int nLine /* = -1 */) const
1704: { return (int)::SendMessage(m_hWnd, EM_LINEINDEX, nLine, 0); }
1705: inline int CEdit::LineLength(int nLine /* = -1 */) const
1706: { return (int)::SendMessage(m_hWnd, EM_LINELENGTH, nLine, 0); }
1707: inline void CEdit::LineScroll(int nLines, int nChars /* = 0 */)
1708: #ifdef _NTWIN
1709: { ::SendMessage(m_hWnd, EM_LINESCROLL, nChars, nLines); }
1710: #else
1711: { ::SendMessage(m_hWnd, EM_LINESCROLL, 0, MAKELONG(nLines, nChars)); }
1712: #endif
1713: inline void CEdit::ReplaceSel(LPCSTR lpNewText)
1714: { ::SendMessage(m_hWnd, EM_REPLACESEL, 0, (LONG)lpNewText); }
1715: inline void CEdit::SetPasswordChar(char ch /* = '\0' */)
1716: { ::SendMessage(m_hWnd, EM_SETPASSWORDCHAR, ch, 0); }
1717: inline void CEdit::SetRect(LPRECT lpRect)
1718: { ::SendMessage(m_hWnd, EM_SETRECT, 0, (LONG)lpRect); }
1719: inline void CEdit::SetRectNP(LPRECT lpRect)
1720: { ::SendMessage(m_hWnd, EM_SETRECTNP, 0, (LONG)lpRect); }
1721: inline void CEdit::SetSel(DWORD dwSelection)
1722: #ifdef _NTWIN
1723: { ::SendMessage(m_hWnd, EM_SETSEL, LOWORD(dwSelection), HIWORD(dwSelection)); }
1724: #else
1725: { ::SendMessage(m_hWnd, EM_SETSEL, 0, (LONG)dwSelection); }
1726: #endif
1727: inline void CEdit::SetSel(int nStartChar, int nEndChar)
1728: #ifdef _NTWIN
1729: { ::SendMessage(m_hWnd, EM_SETSEL, nStartChar, nEndChar); }
1730: #else
1731: { ::SendMessage(m_hWnd, EM_SETSEL, 0, MAKELONG(nStartChar, nEndChar)); }
1732: #endif
1733: inline BOOL CEdit::SetTabStops(int nTabStops, LPINT rgTabStops)
1734: { return (BOOL)::SendMessage(m_hWnd, EM_SETTABSTOPS, nTabStops,
1735: (LONG)rgTabStops); }
1736: inline void CEdit::SetTabStops()
1737: { VERIFY(::SendMessage(m_hWnd, EM_SETTABSTOPS, 0, 0)); }
1738: inline BOOL CEdit::SetTabStops(int cxEachStop)
1739: { return (BOOL)::SendMessage(m_hWnd, EM_SETTABSTOPS,
1740: 1, (LONG)(LPINT)&cxEachStop); }
1741: inline BOOL CEdit::Undo()
1742: { return (BOOL)::SendMessage(m_hWnd, EM_UNDO, 0, 0); }
1743: inline void CEdit::Clear()
1744: { ::SendMessage(m_hWnd, WM_CLEAR, 0, 0); }
1745: inline void CEdit::Copy()
1746: { ::SendMessage(m_hWnd, WM_COPY, 0, 0); }
1747: inline void CEdit::Cut()
1748: { ::SendMessage(m_hWnd, WM_CUT, 0, 0); }
1749: inline void CEdit::Paste()
1750: { ::SendMessage(m_hWnd, WM_PASTE, 0, 0); }
1751: #if (WINVER >= 0x030a)
1752: inline BOOL CEdit::SetReadOnly(BOOL bReadOnly /* = TRUE */ )
1753: { return (BOOL)::SendMessage(m_hWnd, EM_SETREADONLY, bReadOnly, 0L); }
1754: inline int CEdit::GetFirstVisibleLine() const
1755: { return (int)::SendMessage(m_hWnd, EM_GETFIRSTVISIBLELINE, 0, 0L); }
1756: inline char CEdit::GetPasswordChar() const
1757: { return (char)::SendMessage(m_hWnd, EM_GETPASSWORDCHAR, 0, 0L); }
1758: #endif /* WINVER >= 0x030a */
1759:
1760: inline CScrollBar::CScrollBar()
1761: { }
1762: inline int CScrollBar::GetScrollPos() const
1763: { return ::GetScrollPos(m_hWnd, SB_CTL); }
1764: inline int CScrollBar::SetScrollPos(int nPos, BOOL bRedraw /* = TRUE */)
1765: { return ::SetScrollPos(m_hWnd, SB_CTL, nPos, bRedraw); }
1766: inline void CScrollBar::GetScrollRange(LPINT lpMinPos, LPINT lpMaxPos) const
1767: { ::GetScrollRange(m_hWnd, SB_CTL, lpMinPos, lpMaxPos); }
1768: inline void CScrollBar::SetScrollRange(int nMinPos, int nMaxPos, BOOL bRedraw /* = TRUE */)
1769: { ::SetScrollRange(m_hWnd, SB_CTL, nMinPos, nMaxPos, bRedraw); }
1770: inline void CScrollBar::ShowScrollBar(BOOL bShow /* = TRUE */)
1771: { ::ShowScrollBar(m_hWnd, SB_CTL, bShow); }
1772: #if (WINVER >= 0x030a)
1773: inline BOOL CScrollBar::EnableScrollBar(UINT nArrowFlags /* = ESB_ENABLE_BOTH */ )
1774: { return ::EnableScrollBar(m_hWnd, SB_CTL, nArrowFlags); }
1775: #endif /* WINVER >= 0x030a */
1776:
1777: inline CBitmapButton::CBitmapButton()
1778: { }
1779: inline CBitmapButton::CBitmapButton(LPCSTR lpBitmapResource,
1780: LPCSTR lpBitmapResourceSel /* = NULL */,
1781: LPCSTR lpBitmapResourceFocus /* = NULL */)
1782: { VERIFY(LoadBitmaps(lpBitmapResource, lpBitmapResourceSel,
1783: lpBitmapResourceFocus)); }
1784:
1785:
1786: // MDI inline functions
1787: inline void CMDIFrameWnd::MDIActivate(CWnd* pWndActivate)
1788: { ::SendMessage(m_hWndMDIClient, WM_MDIACTIVATE,
1789: (UINT)pWndActivate->m_hWnd, 0); }
1790: inline CMDIChildWnd* CMDIFrameWnd::MDIGetActive(BOOL* pbMaximized /* = NULL */) const
1791: #ifdef _NTWIN
1792: { HWND hWnd = (HWND)::SendMessage(m_hWndMDIClient, WM_MDIGETACTIVE, 0, 0);
1793: if (pbMaximized != NULL)
1794: *pbMaximized = !!(::GetWindowLong(hWnd, GWL_STYLE) & WS_MAXIMIZE);
1795: return (CMDIChildWnd*)CWnd::FromHandle(hWnd); }
1796: #else
1797: { LONG l;
1798: l = ::SendMessage(m_hWndMDIClient, WM_MDIGETACTIVE, 0, 0);
1799: if (pbMaximized != NULL)
1800: *pbMaximized = HIWORD(l);
1801: return (CMDIChildWnd*)CWnd::FromHandle((HWND)LOWORD(l)); }
1802: #endif
1803: inline void CMDIFrameWnd::MDIIconArrange()
1804: { ::SendMessage(m_hWndMDIClient, WM_MDIICONARRANGE, 0, 0); }
1805: inline void CMDIFrameWnd::MDIMaximize(CWnd* pWnd)
1806: { ::SendMessage(m_hWndMDIClient, WM_MDIMAXIMIZE, (UINT)pWnd->m_hWnd, 0); }
1807: inline void CMDIFrameWnd::MDINext()
1808: { ::SendMessage(m_hWndMDIClient, WM_MDINEXT, 0, 0); }
1809: inline void CMDIFrameWnd::MDIRestore(CWnd* pWnd)
1810: { ::SendMessage(m_hWndMDIClient, WM_MDIRESTORE, (UINT)pWnd->m_hWnd, 0); }
1811: inline CMenu* CMDIFrameWnd::MDISetMenu(CMenu* pFrameMenu, CMenu* pWindowMenu)
1812: #ifdef _NTWIN
1813: { return CMenu::FromHandle((HMENU)::SendMessage(
1814: m_hWndMDIClient, WM_MDISETMENU,
1815: (WPARAM)pFrameMenu->GetSafeHmenu(),
1816: (LPARAM)pWindowMenu->GetSafeHmenu())); }
1817: #else
1818: { return CMenu::FromHandle((HMENU)::SendMessage(
1819: m_hWndMDIClient, WM_MDISETMENU, 0,
1820: MAKELONG(pFrameMenu->GetSafeHmenu(),
1821: pWindowMenu->GetSafeHmenu()))); }
1822: #endif
1823: inline void CMDIFrameWnd::MDITile()
1824: { ::SendMessage(m_hWndMDIClient, WM_MDITILE, 0, 0); }
1825: inline void CMDIFrameWnd::MDICascade()
1826: { ::SendMessage(m_hWndMDIClient, WM_MDICASCADE, 0, 0); }
1827:
1828: #if (WINVER >= 0x030a)
1829: inline void CMDIFrameWnd::MDICascade(int nType)
1830: { ::SendMessage(m_hWndMDIClient, WM_MDICASCADE, nType, 0); }
1831: inline void CMDIFrameWnd::MDITile(int nType)
1832: { ::SendMessage(m_hWndMDIClient, WM_MDITILE, nType, 0); }
1833: #endif /* WINVER >= 0x030a */
1834:
1835: inline CMDIChildWnd::CMDIChildWnd()
1836: { }
1837: inline void CMDIChildWnd::MDIDestroy()
1838: { GetParent()->SendMessage(WM_MDIDESTROY, (UINT)m_hWnd); }
1839: inline void CMDIChildWnd::MDIActivate()
1840: { GetParent()->SendMessage(WM_MDIACTIVATE, (UINT)m_hWnd); }
1841: inline void CMDIChildWnd::MDIMaximize()
1842: { GetParent()->SendMessage(WM_MDIMAXIMIZE, (UINT)m_hWnd); }
1843: inline void CMDIChildWnd::MDIRestore()
1844: { GetParent()->SendMessage(WM_MDIRESTORE, (UINT)m_hWnd); }
1845:
1846: // CWinApp inline functions
1847: inline HCURSOR CWinApp::LoadCursor(LPCSTR lpCursorName)
1848: { return ::LoadCursor(AfxGetResourceHandle(), lpCursorName); }
1849: inline HCURSOR CWinApp::LoadCursor(UINT nIDCursor)
1850: { return ::LoadCursor(AfxGetResourceHandle(),
1851: MAKEINTRESOURCE(nIDCursor)); }
1852: inline HCURSOR CWinApp::LoadStandardCursor(LPCSTR lpCursorName)
1853: { return ::LoadCursor(NULL, lpCursorName); }
1854: inline HCURSOR CWinApp::LoadOEMCursor(UINT nIDCursor)
1855: { return ::LoadCursor(NULL, MAKEINTRESOURCE(nIDCursor)); }
1856: inline HICON CWinApp::LoadIcon(LPCSTR lpIconName)
1857: { return ::LoadIcon(AfxGetResourceHandle(), lpIconName); }
1858: inline HICON CWinApp::LoadIcon(UINT nIDIcon)
1859: { return ::LoadIcon(AfxGetResourceHandle(), MAKEINTRESOURCE(nIDIcon)); }
1860: inline HICON CWinApp::LoadStandardIcon(LPCSTR lpIconName)
1861: { return ::LoadIcon(NULL, lpIconName); }
1862: inline HICON CWinApp::LoadOEMIcon(UINT nIDIcon)
1863: { return ::LoadIcon(NULL, MAKEINTRESOURCE(nIDIcon)); }
1864:
1865: #undef THIS_FILE
1866: #define THIS_FILE __FILE__
1867: #endif //__AFXWIN_INL__
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.