Annotation of mstools/mfc/include/afxwin.inl, revision 1.1.1.2

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: #ifndef _NTWIN
                    406: inline CPoint CDC::GetDCOrg() const
                    407:        { return ::GetDCOrg(m_hDC); }
                    408: #endif
                    409: inline int CDC::SaveDC() const
                    410:        { return ::SaveDC(m_hDC); }
                    411: inline BOOL CDC::RestoreDC(int nSavedDC)
                    412:        { return ::RestoreDC(m_hDC, nSavedDC); }
                    413: inline int CDC::GetDeviceCaps(int nIndex) const
                    414:        { return ::GetDeviceCaps(m_hDC, nIndex); }
                    415: 
                    416: inline CPoint CDC::GetBrushOrg() const
                    417: #ifdef _NTWIN
                    418:        { POINT point;
                    419:                VERIFY(::GetBrushOrgEx(m_hDC, &point));
                    420:                return point; }
                    421: #else
                    422:        { return ::GetBrushOrg(m_hDC); }
                    423: #endif
                    424: 
                    425: inline CPoint CDC::SetBrushOrg(int x, int y)
                    426: #ifdef _NTWIN
                    427:        { POINT point;
                    428:                VERIFY(::SetBrushOrgEx(m_hDC, x, y, &point));
                    429:                return point; }
                    430: #else
                    431:        { return ::SetBrushOrg(m_hDC, x, y); }
                    432: #endif
                    433: 
                    434: inline CPoint CDC::SetBrushOrg(POINT point)
                    435: #ifdef _NTWIN
                    436:        { VERIFY(::SetBrushOrgEx(m_hDC, point.x, point.y, &point));
                    437:                return point; }
                    438: #else
                    439:        { return ::SetBrushOrg(m_hDC, point.x, point.y); }
                    440: #endif
                    441: 
                    442: inline int CDC::EnumObjects(int nObjectType, 
                    443:                        int (FAR PASCAL EXPORT* lpfn)(LPSTR, LPSTR), LPSTR lpData)
                    444: #ifdef STRICT
                    445:        { return ::EnumObjects(m_hDC, nObjectType, (GOBJENUMPROC)lpfn, (LPARAM)lpData); }
                    446: #else
                    447:        { return ::EnumObjects(m_hDC, nObjectType, (GOBJENUMPROC)lpfn, lpData); }
                    448: #endif
                    449: inline CGdiObject* CDC::SelectObject(CGdiObject* pObject)
                    450:        { return SelectGdiObject(m_hDC, pObject->m_hObject); }
                    451: inline CGdiObject* CDC::SelectStockObject(int nIndex)
                    452:        { ASSERT(::GetStockObject(nIndex) != NULL);
                    453:                return SelectGdiObject(m_hDC, ::GetStockObject(nIndex)); }
                    454: inline CPen* CDC::SelectObject(CPen* pPen)
                    455:        { return (CPen*) SelectGdiObject(m_hDC, pPen->m_hObject); }
                    456: inline CBrush* CDC::SelectObject(CBrush* pBrush)
                    457:        { return (CBrush*) SelectGdiObject(m_hDC, pBrush->m_hObject); }
                    458: inline CFont* CDC::SelectObject(CFont* pFont)
                    459:        { return (CFont*) SelectGdiObject(m_hDC, pFont->m_hObject); }
                    460: inline CBitmap* CDC::SelectObject(CBitmap* pBitmap)
                    461:        { return (CBitmap*) SelectGdiObject(m_hDC, pBitmap->m_hObject);}
                    462: inline int CDC::SelectObject(CRgn* pRgn)
                    463:        { return (int)::SelectObject(m_hDC, pRgn->m_hObject); }
                    464: inline DWORD CDC::GetNearestColor(DWORD crColor) const
                    465:        { return ::GetNearestColor(m_hDC, crColor); }
                    466: inline UINT CDC::RealizePalette()
                    467:        { return ::RealizePalette(m_hDC); }
                    468: inline void CDC::UpdateColors()
                    469:        { ::UpdateColors(m_hDC); }
                    470: inline DWORD CDC::GetBkColor() const
                    471:        { return ::GetBkColor(m_hDC); }
                    472: inline DWORD CDC::SetBkColor(DWORD crColor)
                    473:        { return ::SetBkColor(m_hDC, crColor); }
                    474: inline int CDC::GetBkMode() const
                    475:        { return ::GetBkMode(m_hDC); }
                    476: inline int CDC::SetBkMode(int nBkMode)
                    477:        { return ::SetBkMode(m_hDC, nBkMode); }
                    478: inline int CDC::GetPolyFillMode() const
                    479:        { return ::GetPolyFillMode(m_hDC); }
                    480: inline int CDC::SetPolyFillMode(int nPolyFillMode)
                    481:        { return ::SetPolyFillMode(m_hDC, nPolyFillMode); }
                    482: inline int CDC::GetROP2() const
                    483:        { return ::GetROP2(m_hDC); }
                    484: inline int CDC::SetROP2(int nDrawMode)
                    485:        { return ::SetROP2(m_hDC, nDrawMode); }
                    486: inline int CDC::GetStretchBltMode() const
                    487:        { return ::GetStretchBltMode(m_hDC); }
                    488: inline int CDC::SetStretchBltMode(int nStretchMode)
                    489:        { return ::SetStretchBltMode(m_hDC, nStretchMode); }
                    490: inline DWORD CDC::GetTextColor() const
                    491:        { return ::GetTextColor(m_hDC); }
                    492: inline DWORD CDC::SetTextColor(DWORD crColor)
                    493:        { return ::SetTextColor(m_hDC, crColor); }
                    494: inline int CDC::GetMapMode() const
                    495:        { return ::GetMapMode(m_hDC); }
                    496: inline int CDC::SetMapMode(int nMapMode)
                    497:        { return ::SetMapMode(m_hDC, nMapMode); }
                    498: inline CPoint CDC::GetViewportOrg() const
                    499: #ifdef _NTWIN
                    500:        { POINT point;
                    501:                VERIFY(::GetViewportOrgEx(m_hDC, &point));
                    502:                return point; }
                    503: #else
                    504:        { return ::GetViewportOrg(m_hDC); }
                    505: #endif
                    506: inline CPoint CDC::SetViewportOrg(int x, int y)
                    507: #ifdef _NTWIN
                    508:        { POINT point;
                    509:                VERIFY(::SetViewportOrgEx(m_hDC, x, y, &point));
                    510:                return point; }
                    511: #else
                    512:        { return ::SetViewportOrg(m_hDC, x, y); }
                    513: #endif
                    514: inline CPoint CDC::SetViewportOrg(POINT point)
                    515: #ifdef _NTWIN
                    516:        { VERIFY(::SetViewportOrgEx(m_hDC, point.x, point.y, &point));
                    517:                return point; }
                    518: #else
                    519:        { return ::SetViewportOrg(m_hDC, point.x, point.y); }
                    520: #endif
                    521: inline CPoint CDC::OffsetViewportOrg(int nWidth, int nHeight)
                    522: #ifdef _NTWIN
                    523:        { POINT point;
                    524:                VERIFY(::OffsetViewportOrgEx(m_hDC, nWidth, nHeight, &point));
                    525:                return point; }
                    526: #else
                    527:        { return ::OffsetViewportOrg(m_hDC, nWidth, nHeight); }
                    528: #endif
                    529: inline CSize CDC::GetViewportExt() const
                    530: #ifdef _NTWIN
                    531:        { SIZE size;
                    532:                VERIFY(::GetViewportExtEx(m_hDC, &size));
                    533:                return size; }
                    534: #else
                    535:        { return ::GetViewportExt(m_hDC); }
                    536: #endif
                    537: inline CSize CDC::SetViewportExt(int x, int y)
                    538: #ifdef _NTWIN
                    539:        { SIZE size;
                    540:                VERIFY(::SetViewportExtEx(m_hDC, x, y, &size));
                    541:                return size; }
                    542: #else
                    543:        { return ::SetViewportExt(m_hDC, x, y); }
                    544: #endif
                    545: inline CSize CDC::SetViewportExt(SIZE size)
                    546: #ifdef _NTWIN
                    547:        {  VERIFY(::SetViewportExtEx(m_hDC, size.cx, size.cy, &size));
                    548:                return size; }
                    549: #else
                    550:        { return ::SetViewportExt(m_hDC, size.cx, size.cy); }
                    551: #endif
                    552: inline CSize CDC::ScaleViewportExt(int xNum, int xDenom, int yNum, int yDenom)
                    553: #ifdef _NTWIN
                    554:        { SIZE size;
                    555:                VERIFY(::ScaleViewportExtEx(m_hDC, xNum, xDenom, yNum, yDenom, &size));
                    556:                return size; }
                    557: #else
                    558:        { return ::ScaleViewportExt(m_hDC, xNum, xDenom, yNum, yDenom);}
                    559: #endif
                    560: inline CPoint CDC::GetWindowOrg() const
                    561: #ifdef _NTWIN
                    562:        { POINT point;
                    563:                VERIFY(::GetWindowOrgEx(m_hDC, &point));
                    564:                return point; }
                    565: #else
                    566:        { return ::GetWindowOrg(m_hDC); }
                    567: #endif
                    568: inline CPoint CDC::SetWindowOrg(int x, int y)
                    569: #ifdef _NTWIN
                    570:        { POINT point;
                    571:                VERIFY(::SetWindowOrgEx(m_hDC, x, y, &point));
                    572:                return point; }
                    573: #else
                    574:        { return ::SetWindowOrg(m_hDC, x, y); }
                    575: #endif
                    576: inline CPoint CDC::SetWindowOrg(POINT point)
                    577: #ifdef _NTWIN
                    578:        { VERIFY(::SetWindowOrgEx(m_hDC, point.x, point.y, &point));
                    579:                return point; }
                    580: #else
                    581:        { return ::SetWindowOrg(m_hDC, point.x, point.y); }
                    582: #endif
                    583: inline CPoint CDC::OffsetWindowOrg(int nWidth, int nHeight)
                    584: #ifdef _NTWIN
                    585:        { POINT point;
                    586:                VERIFY(::OffsetWindowOrgEx(m_hDC, nWidth, nHeight, &point));
                    587:                return point; }
                    588: #else
                    589:        { return ::OffsetWindowOrg(m_hDC, nWidth, nHeight); }
                    590: #endif
                    591: inline CSize CDC::SetWindowExt(SIZE size)
                    592: #ifdef _NTWIN
                    593:        { VERIFY(::SetWindowExtEx(m_hDC, size.cx, size.cy, &size));
                    594:                return size; }
                    595: #else
                    596:        { return ::SetWindowExt(m_hDC, size.cx, size.cy); }
                    597: #endif
                    598: inline CSize CDC::ScaleWindowExt(int xNum, int xDenom, int yNum, int yDenom)
                    599: #ifdef _NTWIN
                    600:        { SIZE size;
                    601:                VERIFY(::ScaleWindowExtEx(m_hDC, xNum, xDenom, yNum, yDenom, &size));
                    602:                return size; }
                    603: #else
                    604:        { return ::ScaleWindowExt(m_hDC, xNum, xDenom, yNum, yDenom);}
                    605: #endif
                    606: 
                    607: inline void CDC::DPtoLP(LPPOINT lpPoints, int nCount /* = 1 */) const
                    608:        { VERIFY(::DPtoLP(m_hDC, lpPoints, nCount)); }
                    609: inline void CDC::DPtoLP(LPRECT lpRect) const
                    610:        { VERIFY(::DPtoLP(m_hDC, (LPPOINT)lpRect, 2)); }
                    611: inline void CDC::LPtoDP(LPPOINT lpPoints, int nCount /* = 1 */) const
                    612:        { VERIFY(::LPtoDP(m_hDC, lpPoints, nCount)); }
                    613: inline void CDC::LPtoDP(LPRECT lpRect) const
                    614:        { VERIFY(::LPtoDP(m_hDC, (LPPOINT)lpRect, 2)); }
                    615: inline BOOL CDC::FillRgn(CRgn* pRgn, CBrush* pBrush)
                    616:        { return ::FillRgn(m_hDC, (HRGN)pRgn->m_hObject, (HBRUSH)pBrush->m_hObject); }
                    617: inline BOOL CDC::FrameRgn(CRgn* pRgn, CBrush* pBrush, int nWidth, int nHeight)
                    618:        { return ::FrameRgn(m_hDC, (HRGN)pRgn->m_hObject, (HBRUSH)pBrush->m_hObject,
                    619:                nWidth, nHeight); }
                    620: inline BOOL CDC::InvertRgn(CRgn* pRgn)
                    621:        { return ::InvertRgn(m_hDC, (HRGN)pRgn->m_hObject); }
                    622: inline BOOL CDC::PaintRgn(CRgn* pRgn)
                    623:        { return ::PaintRgn(m_hDC, (HRGN)pRgn->m_hObject); }
                    624: inline int CDC::GetClipBox(LPRECT lpRect) const
                    625:        { return ::GetClipBox(m_hDC, lpRect); }
                    626: inline int CDC::SelectClipRgn(CRgn* pRgn)
                    627:        { return ::SelectClipRgn(m_hDC, (HRGN)pRgn->GetSafeHandle()); }
                    628: inline int CDC::ExcludeClipRect(int x1, int y1, int x2, int y2)
                    629:        { return ::ExcludeClipRect(m_hDC, x1, y1, x2, y2); }
                    630: inline int CDC::ExcludeClipRect(LPRECT lpRect)
                    631:        { return ::ExcludeClipRect(m_hDC, lpRect->left, lpRect->top,
                    632:                lpRect->right, lpRect->bottom); }
                    633: inline int CDC::IntersectClipRect(int x1, int y1, int x2, int y2)
                    634:        { return ::IntersectClipRect(m_hDC, x1, y1, x2, y2); }
                    635: inline int CDC::IntersectClipRect(LPRECT lpRect)
                    636:        { return ::IntersectClipRect(m_hDC, lpRect->left, lpRect->top,
                    637:                lpRect->right, lpRect->bottom); }
                    638: inline int CDC::OffsetClipRgn(int x, int y)
                    639:        { return ::OffsetClipRgn(m_hDC, x, y); }
                    640: inline int CDC::OffsetClipRgn(SIZE size)
                    641:        { return ::OffsetClipRgn(m_hDC, size.cx, size.cy); }
                    642: inline BOOL CDC::PtVisible(int x, int y) const
                    643:        { return ::PtVisible(m_hDC, x, y); }
                    644: inline BOOL CDC::PtVisible(POINT point) const
                    645:        { return ::PtVisible(m_hDC, point.x, point.y); }
                    646: inline BOOL CDC::RectVisible(LPRECT lpRect) const
                    647:        { return ::RectVisible(m_hDC, lpRect); }
                    648: inline CPoint CDC::GetCurrentPosition() const
                    649: #ifdef _NTWIN
                    650:        { POINT point;
                    651:                VERIFY(::GetCurrentPositionEx(m_hDC, &point));
                    652:                return point; }
                    653: #else
                    654:        { return ::GetCurrentPosition(m_hDC); }
                    655: #endif
                    656: inline CPoint CDC::MoveTo(int x, int y)
                    657: #ifdef _NTWIN
                    658:        { POINT point;
                    659:                VERIFY(::MoveToEx(m_hDC, x, y, &point));
                    660:                return point; }
                    661: #else
                    662:        { return ::MoveTo(m_hDC, x, y); }
                    663: #endif
                    664: inline CPoint CDC::MoveTo(POINT point)
                    665: #ifdef _NTWIN
                    666:        { VERIFY(::MoveToEx(m_hDC, point.x, point.y, &point));
                    667:                return point; }
                    668: #else
                    669:        { return ::MoveTo(m_hDC, point.x, point.y); }
                    670: #endif
                    671: inline BOOL CDC::LineTo(int x, int y)
                    672:        { return ::LineTo(m_hDC, x, y); }
                    673: inline BOOL CDC::LineTo(POINT point)
                    674:        { return ::LineTo(m_hDC, point.x, point.y); }
                    675: inline BOOL CDC::Arc(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
                    676:        { return ::Arc(m_hDC, x1, y1, x2, y2, x3, y3, x4, y4); }
                    677: inline BOOL CDC::Arc(LPRECT lpRect, POINT ptStart, POINT ptEnd)
                    678:        { return ::Arc(m_hDC, lpRect->left, lpRect->top,
                    679:                lpRect->right, lpRect->bottom, ptStart.x, ptStart.y,
                    680:                ptEnd.x, ptEnd.y); }
                    681: inline BOOL CDC::Polyline(LPPOINT lpPoints, int nCount)
                    682:        { return ::Polyline(m_hDC, lpPoints, nCount); }
                    683: inline void CDC::FillRect(LPRECT lpRect, CBrush* pBrush)
                    684:        { ::FillRect(m_hDC, lpRect, (HBRUSH)pBrush->m_hObject); }
                    685: inline void CDC::FrameRect(LPRECT lpRect, CBrush* pBrush)
                    686:        { ::FrameRect(m_hDC, lpRect, (HBRUSH)pBrush->m_hObject); }
                    687: inline void CDC::InvertRect(LPRECT lpRect)
                    688:        { ::InvertRect(m_hDC, lpRect); }
                    689: inline BOOL CDC::DrawIcon(int x, int y, HICON hIcon)
                    690:        { return ::DrawIcon(m_hDC, x, y, hIcon); }
                    691: inline BOOL CDC::DrawIcon(POINT point, HICON hIcon)
                    692:        { return ::DrawIcon(m_hDC, point.x, point.y, hIcon); }
                    693: inline BOOL CDC::Chord(int x1, int y1, int x2, int y2, int x3, int y3,
                    694:        int x4, int y4)
                    695:        { return ::Chord(m_hDC, x1, y1, x2, y2, x3, y3, x4, y4); }
                    696: inline BOOL CDC::Chord(LPRECT lpRect, POINT ptStart, POINT ptEnd)
                    697:        { return ::Chord(m_hDC, lpRect->left, lpRect->top,
                    698:                lpRect->right, lpRect->bottom, ptStart.x, ptStart.y,
                    699:                ptEnd.x, ptEnd.y); }
                    700: inline void CDC::DrawFocusRect(LPRECT lpRect)
                    701:        { ::DrawFocusRect(m_hDC, lpRect); }
                    702: inline BOOL CDC::Ellipse(int x1, int y1, int x2, int y2)
                    703:        { return ::Ellipse(m_hDC, x1, y1, x2, y2); }
                    704: inline BOOL CDC::Ellipse(LPRECT lpRect)
                    705:        { return ::Ellipse(m_hDC, lpRect->left, lpRect->top,
                    706:                lpRect->right, lpRect->bottom); }
                    707: inline BOOL CDC::Pie(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
                    708:        { return ::Pie(m_hDC, x1, y1, x2, y2, x3, y3, x4, y4); }
                    709: inline BOOL CDC::Pie(LPRECT lpRect, POINT ptStart, POINT ptEnd)
                    710:        { return ::Pie(m_hDC, lpRect->left, lpRect->top,
                    711:                lpRect->right, lpRect->bottom, ptStart.x, ptStart.y,
                    712:                ptEnd.x, ptEnd.y); }
                    713: inline BOOL CDC::Polygon(LPPOINT lpPoints, int nCount)
                    714:        { return ::Polygon(m_hDC, lpPoints, nCount); }
                    715: inline BOOL CDC::PolyPolygon(LPPOINT lpPoints, LPINT lpPolyCounts, int nCount)
                    716:        { return ::PolyPolygon(m_hDC, lpPoints, lpPolyCounts, nCount); }
                    717: inline BOOL CDC::Rectangle(int x1, int y1, int x2, int y2)
                    718:        { return ::Rectangle(m_hDC, x1, y1, x2, y2); }
                    719: inline BOOL CDC::Rectangle(LPRECT lpRect)
                    720:        { return ::Rectangle(m_hDC, lpRect->left, lpRect->top,
                    721:                lpRect->right, lpRect->bottom); }
                    722: inline BOOL CDC::RoundRect(int x1, int y1, int x2, int y2, int x3, int y3)
                    723:        { return ::RoundRect(m_hDC, x1, y1, x2, y2, x3, y3); }
                    724: inline BOOL CDC::RoundRect(LPRECT lpRect, POINT point)
                    725:        { return ::RoundRect(m_hDC, lpRect->left, lpRect->top,
                    726:                lpRect->right, lpRect->bottom, point.x, point.y); }
                    727: inline BOOL CDC::PatBlt(int x, int y, int nWidth, int nHeight, DWORD dwRop)
                    728:        { return ::PatBlt(m_hDC, x, y, nWidth, nHeight, dwRop); }
                    729: inline BOOL CDC::BitBlt(int x, int y, int nWidth, int nHeight, CDC* pSrcDC,
                    730:        int xSrc, int ySrc, DWORD dwRop)
                    731:        { return ::BitBlt(m_hDC, x, y, nWidth, nHeight,
                    732:                pSrcDC->GetSafeHdc(), xSrc, ySrc, dwRop); }
                    733: inline BOOL CDC::StretchBlt(int x, int y, int nWidth, int nHeight, CDC* pSrcDC,
                    734:        int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, DWORD dwRop)
                    735:        { return ::StretchBlt(m_hDC, x, y, nWidth, nHeight,
                    736:                pSrcDC->GetSafeHdc(), xSrc, ySrc, nSrcWidth, nSrcHeight,
                    737:                dwRop); }
                    738: inline DWORD CDC::GetPixel(int x, int y) const
                    739:        { return ::GetPixel(m_hDC, x, y); }
                    740: inline DWORD CDC::GetPixel(POINT point) const
                    741:        { return ::GetPixel(m_hDC, point.x, point.y); }
                    742: inline DWORD CDC::SetPixel(int x, int y, DWORD crColor)
                    743:        { return ::SetPixel(m_hDC, x, y, crColor); }
                    744: inline DWORD CDC::SetPixel(POINT point, DWORD crColor)
                    745:        { return ::SetPixel(m_hDC, point.x, point.y, crColor); }
                    746: inline BOOL CDC::FloodFill(int x, int y, DWORD crColor)
                    747:        { return ::FloodFill(m_hDC, x, y, crColor); }
                    748: inline BOOL CDC::ExtFloodFill(int x, int y, DWORD crColor, UINT nFillType)
                    749:        { return ::ExtFloodFill(m_hDC, x, y, crColor, nFillType); }
                    750: inline BOOL CDC::TextOut(int x, int y, const CString& str)
                    751:        { return ::TextOut(m_hDC, x, y, (const char*)str, str.GetLength()); }
                    752: inline BOOL CDC::TextOut(int x, int y, LPCSTR lpString, int nCount)
                    753:        { return ::TextOut(m_hDC, x, y, lpString, nCount); }
                    754: inline BOOL CDC::ExtTextOut(int x, int y, UINT nOptions, LPRECT lpRect,
                    755:        LPCSTR lpString, UINT nCount, LPINT lpDxWidths)
                    756:        { return ::ExtTextOut(m_hDC, x, y, nOptions, lpRect,
                    757:                lpString, nCount, lpDxWidths); }
                    758: inline CSize CDC::TabbedTextOut(int x, int y, LPCSTR lpString, int nCount,
                    759:        int nTabPositions, LPINT lpnTabStopPositions, int nTabOrigin)
                    760:        { return ::TabbedTextOut(m_hDC, x, y, (LPSTR)lpString, nCount,
                    761:                nTabPositions, lpnTabStopPositions, nTabOrigin); }
                    762: inline int CDC::DrawText(LPCSTR lpString, int nCount, LPRECT lpRect,
                    763:                UINT nFormat)
1.1.1.2 ! root      764:        { return ::DrawText(m_hDC, lpString, nCount, lpRect, nFormat); }
1.1       root      765: inline CSize CDC::GetTextExtent(LPCSTR lpString, int nCount) const
                    766: #ifdef _NTWIN
                    767:        { SIZE size;
                    768:                VERIFY(::GetTextExtentPoint(m_hDC, lpString, nCount, &size));
                    769:                return size; }
                    770: #else
                    771:        { return ::GetTextExtent(m_hDC, lpString, nCount); }
                    772: #endif
                    773: inline CSize CDC::GetTabbedTextExtent(LPCSTR lpString, int nCount,
                    774:        int nTabPositions, LPINT lpnTabStopPositions) const
                    775:        { return ::GetTabbedTextExtent(m_hDC, lpString, nCount,
                    776:                nTabPositions, lpnTabStopPositions); }
                    777: inline BOOL CDC::GrayString(CBrush* pBrush,
                    778:        BOOL (FAR PASCAL EXPORT* lpfnOutput)(HDC, DWORD, int),
                    779:                DWORD lpData, int nCount,
                    780:                int x, int y, int nWidth, int nHeight)
                    781:        { return ::GrayString(m_hDC, (HBRUSH)pBrush->m_hObject,
                    782:                (GRAYSTRINGPROC)lpfnOutput, lpData, nCount, x, y, nWidth, nHeight); }
                    783: inline UINT CDC::GetTextAlign() const
                    784:        { return ::GetTextAlign(m_hDC); }
                    785: inline UINT CDC::SetTextAlign(UINT nFlags)
                    786:        { return ::SetTextAlign(m_hDC, nFlags); }
                    787: inline int CDC::GetTextFace(int nCount, LPSTR lpFacename) const
                    788:        { return ::GetTextFace(m_hDC, nCount, lpFacename); }
                    789: inline BOOL CDC::GetTextMetrics(LPTEXTMETRIC lpMetrics) const
                    790:        { return ::GetTextMetrics(m_hDC, lpMetrics); }
                    791: inline int CDC::SetTextJustification(int nBreakExtra, int nBreakCount)
                    792:        { return ::SetTextJustification(m_hDC, nBreakExtra,
                    793:                nBreakCount); }
                    794: inline int CDC::GetTextCharacterExtra() const
                    795:        { return ::GetTextCharacterExtra(m_hDC); }
                    796: inline int CDC::SetTextCharacterExtra(int nCharExtra)
                    797:        { return ::SetTextCharacterExtra(m_hDC, nCharExtra); }
                    798: inline BOOL CDC::GetCharWidth(UINT nFirstChar, UINT nLastChar, LPINT lpBuffer) const
                    799:        { return ::GetCharWidth(m_hDC, nFirstChar, nLastChar,
                    800:                lpBuffer); }
                    801: inline DWORD CDC::SetMapperFlags(DWORD dwFlag)
                    802:        { return ::SetMapperFlags(m_hDC, dwFlag); }
                    803: inline CSize CDC::GetAspectRatioFilter() const
                    804: #ifdef _NTWIN
                    805:        { SIZE size;
                    806:                VERIFY(::GetAspectRatioFilterEx(m_hDC, &size));
                    807:                return size; }
                    808: #else
                    809:        { return ::GetAspectRatioFilter(m_hDC); }
                    810: #endif
                    811: inline BOOL CDC::ScrollDC(int dx, int dy, LPRECT lpRectScroll, LPRECT lpRectClip,
                    812:                CRgn* pRgnUpdate, LPRECT lpRectUpdate)
                    813:        { return ::ScrollDC(m_hDC, dx, dy, lpRectScroll,
                    814:                lpRectClip, (HRGN)pRgnUpdate->GetSafeHandle(), lpRectUpdate); }
                    815: inline BOOL CDC::PlayMetaFile(HANDLE hMF)
                    816:        { return ::PlayMetaFile(m_hDC, (HMETAFILE)hMF); }
                    817: inline CSize CDC::GetWindowExt() const
                    818: #ifdef _NTWIN
                    819:        { SIZE size;
                    820:                VERIFY(::GetWindowExtEx(m_hDC, &size));
                    821:                return size; }
                    822: #else
                    823:        { return ::GetWindowExt(m_hDC); }
                    824: #endif
                    825: inline CSize CDC::SetWindowExt(int x, int y)
                    826: #ifdef _NTWIN
                    827:        { SIZE size;
                    828:                VERIFY(::SetWindowExtEx(m_hDC, x, y, &size));
                    829:                return size; }
                    830: #else
                    831:        { return ::SetWindowExt(m_hDC, x, y); }
                    832: #endif
                    833: 
                    834: // Printer Escape Functions
                    835: inline int CDC::Escape(int nEscape, int nCount, LPCSTR lpInData, void FAR* lpOutData)
                    836:        { return ::Escape(m_hDC, nEscape, nCount, lpInData, lpOutData);}
                    837: 
                    838: #ifndef _NTWIN
                    839: inline int CDC::StartDoc(LPCSTR pDocName)
                    840:        { return ::Escape(m_hDC, STARTDOC, _fstrlen(pDocName),
                    841:                pDocName, NULL);}
                    842: #endif
                    843: 
                    844: #if (WINVER >= 0x030a)
                    845: inline BOOL CDC::QueryAbort() const
                    846:        { return ::QueryAbort(m_hDC, 0); }
                    847: inline int CDC::StartDoc(LPDOCINFO lpDocInfo)
                    848:        { return ::StartDoc(m_hDC, lpDocInfo);}
                    849: inline int CDC::StartPage()
                    850:        { return ::StartPage(m_hDC); }
                    851: inline int CDC::EndPage()
                    852:        { return ::EndPage(m_hDC);}
                    853: inline int CDC::SetAbortProc(BOOL (FAR PASCAL EXPORT* lpfn)(HDC, int))
                    854:        { return ::SetAbortProc(m_hDC, (ABORTPROC)lpfn);}
                    855: inline int CDC::AbortDoc()
                    856:        { return ::AbortDoc(m_hDC);}
                    857: inline int CDC::EndDoc()
                    858:        { return ::EndDoc(m_hDC);}
                    859: #else
                    860: inline int CDC::StartPage()
                    861:        { return 0; /* not implemented */ }
                    862: inline int CDC::EndPage()
                    863:        { return ::Escape(m_hDC, NEWFRAME, 0, NULL, NULL);}
                    864: inline int CDC::SetAbortProc(BOOL (FAR PASCAL EXPORT* lpfn)(HDC, int))
                    865:        { return ::Escape(m_hDC, SETABORTPROC, 0, (LPCSTR)lpfn, NULL);}
                    866: inline int CDC::AbortDoc()
                    867:        { return ::Escape(m_hDC, ABORTDOC, 0, NULL, NULL);}
                    868: inline int CDC::EndDoc()
                    869:        { return ::Escape(m_hDC, ENDDOC, 0, NULL, NULL);}
                    870: #endif
                    871: 
                    872: // CDC 3.1 Specific functions
                    873: #if (WINVER >= 0x030a)
                    874: inline UINT CDC::SetBoundsRect(const RECT FAR* lpRectBounds, UINT flags)
1.1.1.2 ! root      875:        { return ::SetBoundsRect(m_hDC, lpRectBounds, flags); }
1.1       root      876: inline UINT CDC::GetBoundsRect(LPRECT lpRectBounds, UINT flags)
                    877:        { return ::GetBoundsRect(m_hDC, lpRectBounds, flags); }
                    878: inline UINT CDC::GetOutlineTextMetrics(UINT cbData, OUTLINETEXTMETRIC FAR* lpotm) const
1.1.1.2 ! root      879:        { return ::GetOutlineTextMetrics(m_hDC, cbData, lpotm); }
1.1       root      880: inline BOOL CDC::GetCharABCWidths(UINT nFirst, UINT nLast, LPABC lpabc) const
                    881:        { return ::GetCharABCWidths(m_hDC, nFirst, nLast, lpabc); }
                    882: inline DWORD CDC::GetFontData(DWORD dwTable, DWORD dwOffset, LPVOID lpData, 
                    883:        DWORD cbData) const
                    884:        { return ::GetFontData(m_hDC, dwTable, dwOffset, lpData, cbData); }
                    885: inline int CDC::GetKerningPairs(int nPairs, KERNINGPAIR FAR* lpkrnpair) const
                    886:        { return ::GetKerningPairs(m_hDC, nPairs, lpkrnpair); }
                    887: inline DWORD CDC::GetGlyphOutline(UINT nChar, UINT nFormat, GLYPHMETRICS FAR* lpgm, 
                    888:                DWORD cbBuffer, void FAR* lpBuffer, const MAT2 FAR* lpmat2) const
                    889:        { return ::GetGlyphOutline(m_hDC, nChar, nFormat, 
1.1.1.2 ! root      890:                        lpgm, cbBuffer, lpBuffer, lpmat2); }
1.1       root      891: #endif /* WINVER >= 0x030a */
                    892: 
                    893: // CMetaFileDC inline functions
                    894: inline CMetaFileDC::CMetaFileDC() 
                    895:        { }
                    896: inline BOOL CMetaFileDC::Create(LPCSTR lpFilename /* = NULL */)
                    897:        { return Attach(::CreateMetaFile(lpFilename)); }
                    898: inline HANDLE   CMetaFileDC::Close()
                    899:        { return ::CloseMetaFile(Detach()); }
                    900: inline BOOL CMetaFileDC::SelectObject(CGdiObject* pObject)
                    901:        { return (BOOL)::SelectObject(m_hDC, pObject->m_hObject); }
                    902: inline BOOL CMetaFileDC::SelectStockObject(int nIndex)
                    903:        { ASSERT(::GetStockObject(nIndex) != NULL);
                    904:                return (BOOL)::SelectObject(m_hDC, ::GetStockObject(nIndex)); }
                    905: 
                    906: 
                    907: // CMenu inline functions
                    908: inline CMenu::CMenu() 
                    909:        { m_hMenu = NULL; }
                    910: inline BOOL CMenu::CreateMenu()
                    911:        { return Attach(::CreateMenu()); }
                    912: inline BOOL CMenu::CreatePopupMenu()
                    913:        { return Attach(::CreatePopupMenu()); }
                    914: inline HMENU CMenu::GetSafeHmenu() const
                    915:        { return this == NULL ? NULL : m_hMenu; }
                    916: inline BOOL CMenu::DeleteMenu(UINT nPosition, UINT nFlags)
                    917:        { return ::DeleteMenu(m_hMenu, nPosition, nFlags); }
                    918: inline BOOL CMenu::AppendMenu(UINT nFlags, UINT nIDNewItem /* = 0 */, LPCSTR lpNewItem /* = NULL */)
                    919:        { return ::AppendMenu(m_hMenu, nFlags, nIDNewItem,  lpNewItem); }
                    920: inline BOOL CMenu::AppendMenu(UINT nFlags, UINT nIDNewItem, const CBitmap* pBmp)
                    921:        { return ::AppendMenu(m_hMenu, nFlags | MF_BITMAP, nIDNewItem,
1.1.1.2 ! root      922: #ifndef _NTWIN
1.1       root      923:                MAKEINTRESOURCE(pBmp->m_hObject)); }
1.1.1.2 ! root      924: #else
        !           925:                (LPCSTR)pBmp->m_hObject); }
        !           926: #endif
1.1       root      927: inline BOOL CMenu::CheckMenuItem(UINT nIDCheckItem, UINT nCheck)
1.1.1.2 ! root      928:        { return ::CheckMenuItem(m_hMenu, nIDCheckItem, nCheck); }
1.1       root      929: inline BOOL CMenu::EnableMenuItem(UINT nIDEnableItem, UINT nEnable)
                    930:        { return ::EnableMenuItem(m_hMenu, nIDEnableItem, nEnable); }
                    931: inline UINT CMenu::GetMenuItemCount() const
                    932:        { return ::GetMenuItemCount(m_hMenu); }
                    933: inline UINT CMenu::GetMenuItemID(int nPos) const
                    934:        { return ::GetMenuItemID(m_hMenu, nPos); }
                    935: inline UINT CMenu::GetMenuState(UINT nID, UINT nFlags) const
                    936:        { return ::GetMenuState(m_hMenu, nID, nFlags); }
                    937: inline int CMenu::GetMenuString(UINT nIDItem, LPSTR lpString, int nMaxCount,    UINT nFlags) const
                    938:        { return ::GetMenuString(m_hMenu, nIDItem, lpString, nMaxCount, nFlags); }
                    939: inline CMenu* CMenu::GetSubMenu(int nPos) const
                    940:        { return CMenu::FromHandle(::GetSubMenu(m_hMenu, nPos)); }
                    941: inline BOOL CMenu::InsertMenu(UINT nPosition, UINT nFlags, UINT nIDNewItem /* = 0 */,
                    942:                LPCSTR lpNewItem /* = NULL */)
                    943:        { return ::InsertMenu(m_hMenu, nPosition, nFlags, nIDNewItem, lpNewItem); }
                    944: inline BOOL CMenu::InsertMenu(UINT nPosition, UINT nFlags, UINT nIDNewItem, const CBitmap* pBmp)
1.1.1.2 ! root      945:        { return ::InsertMenu(m_hMenu, nPosition, nFlags | MF_BITMAP, nIDNewItem,
        !           946: #ifndef _NTWIN
        !           947:        MAKEINTRESOURCE(pBmp->m_hObject)); }
        !           948: #else
        !           949:        (LPCSTR)pBmp->m_hObject); }
        !           950: #endif
1.1       root      951: inline BOOL CMenu::ModifyMenu(UINT nPosition, UINT nFlags, UINT nIDNewItem /* = 0 */, LPCSTR lpNewItem /* = NULL */)
                    952:        { return ::ModifyMenu(m_hMenu, nPosition, nFlags, nIDNewItem, lpNewItem); }
                    953: inline BOOL CMenu::ModifyMenu(UINT nPosition, UINT nFlags, UINT nIDNewItem, const CBitmap* pBmp)
1.1.1.2 ! root      954:        { return ::ModifyMenu(m_hMenu, nPosition, nFlags | MF_BITMAP, nIDNewItem,
        !           955: #ifndef _NTWIN
        !           956:        MAKEINTRESOURCE(pBmp->m_hObject)); }
        !           957: #else
        !           958:        (LPCSTR)pBmp->m_hObject); }
        !           959: #endif
1.1       root      960: inline BOOL CMenu::RemoveMenu(UINT nPosition, UINT nFlags)
                    961:        { return ::RemoveMenu(m_hMenu, nPosition, nFlags); }
                    962: inline BOOL CMenu::SetMenuItemBitmaps(UINT nPosition, UINT nFlags,
                    963:                const CBitmap* pBmpUnchecked, const CBitmap* pBmpChecked)
                    964:        { return ::SetMenuItemBitmaps(m_hMenu, nPosition, nFlags,
                    965:                (HBITMAP)pBmpUnchecked->GetSafeHandle(),
                    966:                (HBITMAP)pBmpChecked->GetSafeHandle()); }
                    967: inline BOOL CMenu::LoadMenu(LPCSTR lpMenuName)
                    968:        { return Attach(::LoadMenu(AfxGetResourceHandle(), lpMenuName)); }
                    969: inline BOOL CMenu::LoadMenu(UINT nIDMenu)
                    970:        { return Attach(::LoadMenu(AfxGetResourceHandle(),
                    971:                        MAKEINTRESOURCE(nIDMenu))); }
                    972: inline BOOL CMenu::LoadMenuIndirect(const void FAR* lpMenuTemplate)
1.1.1.2 ! root      973:        { return Attach(::LoadMenuIndirect(lpMenuTemplate)); }
1.1       root      974: inline BOOL CMenu::TrackPopupMenu(UINT nFlags, int x, int y,
                    975:                                        const CWnd* pWnd, const RECT FAR* lpRect)
                    976:        { return ::TrackPopupMenu(m_hMenu, nFlags, x, y, 0, pWnd->m_hWnd,
                    977:                        lpRect); }
                    978: 
                    979: // CWnd 
                    980: inline HWND CWnd::GetSafeHwnd() const
                    981:        { return this == NULL ? NULL : m_hWnd; }
                    982: inline CWnd::CWnd() 
                    983:        { m_hWnd = NULL; }
                    984: inline CWnd::CWnd(HWND hWnd)
                    985:        { m_hWnd = hWnd; }
                    986: inline DWORD CWnd::GetStyle() const
                    987:        { return (DWORD)GetWindowLong(m_hWnd, GWL_STYLE); }
                    988: inline DWORD CWnd::GetExStyle() const
                    989:        { return (DWORD)GetWindowLong(m_hWnd, GWL_EXSTYLE); }
                    990: inline LONG CWnd::SendMessage(UINT message, UINT wParam, LONG lParam)
                    991:        { return ::SendMessage(m_hWnd, message, wParam, lParam); }
                    992: inline BOOL CWnd::PostMessage(UINT message, UINT wParam, LONG lParam)
                    993:        { return ::PostMessage(m_hWnd, message, wParam, lParam); }
                    994: inline void CWnd::SetWindowText(LPCSTR lpString)
                    995:        { ::SetWindowText(m_hWnd, lpString); }
                    996: inline int CWnd::GetWindowText(LPSTR lpString, int nMaxCount) const
                    997:        { return ::GetWindowText(m_hWnd, lpString, nMaxCount); }
                    998: inline int CWnd::GetWindowTextLength() const
                    999:        { return ::GetWindowTextLength(m_hWnd); }
                   1000: inline void CWnd::GetWindowText(CString& rString) const
                   1001:        { int nLen = GetWindowTextLength();
                   1002:                GetWindowText(rString.GetBufferSetLength(nLen), nLen+1); }
                   1003: inline void CWnd::SetFont(CFont* pFont, BOOL bRedraw /* = TRUE */)
                   1004:        { SendMessage(WM_SETFONT, (UINT)pFont->GetSafeHandle(), bRedraw); }
                   1005: inline CFont* CWnd::GetFont()
                   1006:        { return CFont::FromHandle((HFONT)SendMessage(WM_GETFONT)); }
                   1007: inline CMenu* CWnd::GetMenu() const
                   1008:        { return CMenu::FromHandle(::GetMenu(m_hWnd)); }
                   1009: inline BOOL CWnd::SetMenu(CMenu* pMenu)
                   1010:        { return ::SetMenu(m_hWnd, pMenu->GetSafeHmenu()); }
                   1011: inline void CWnd::DrawMenuBar()
                   1012:        { ::DrawMenuBar(m_hWnd); }
                   1013: inline CMenu* CWnd::GetSystemMenu(BOOL bRevert) const
                   1014:        { return CMenu::FromHandle(::GetSystemMenu(m_hWnd, bRevert)); }
                   1015: inline BOOL CWnd::HiliteMenuItem(CMenu* pMenu, UINT nIDHiliteItem, UINT nHilite)
                   1016:        { return ::HiliteMenuItem(m_hWnd, pMenu->m_hMenu, nIDHiliteItem, nHilite); }
                   1017: inline int CWnd::GetDlgCtrlID() const
                   1018:        { return ::GetDlgCtrlID(m_hWnd); }
                   1019: inline void CWnd::CloseWindow()
                   1020:        { ::CloseWindow(m_hWnd); }
                   1021: inline BOOL CWnd::OpenIcon()
                   1022:        { return ::OpenIcon(m_hWnd); }
                   1023: inline BOOL CWnd::IsIconic() const
                   1024:        { return ::IsIconic(m_hWnd); }
                   1025: inline BOOL CWnd::IsZoomed() const
                   1026:        { return ::IsZoomed(m_hWnd); }
                   1027: inline void CWnd::MoveWindow(int x, int y, int nWidth, int nHeight, BOOL bRepaint /* = TRUE */)
                   1028:        { ::MoveWindow(m_hWnd, x, y, nWidth, nHeight, bRepaint); }
                   1029: inline void CWnd::MoveWindow(LPRECT lpRect, BOOL bRepaint /* = TRUE */)
                   1030:        { ::MoveWindow(m_hWnd, lpRect->left, lpRect->top, lpRect->right - lpRect->left,
                   1031:                        lpRect->bottom - lpRect->top, bRepaint); }
                   1032: inline BOOL CWnd::SetWindowPos(const CWnd* pWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
                   1033: #if (WINVER >= 0x030a)
                   1034:        { return ::SetWindowPos(m_hWnd, pWndInsertAfter->GetSafeHwnd(),
                   1035:                x, y, cx, cy, nFlags); }
                   1036: #else
                   1037:        { ::SetWindowPos(m_hWnd, pWndInsertAfter->GetSafeHwnd(),
                   1038:                x, y, cx, cy, nFlags); return TRUE; }
                   1039: #endif /* WINVER >= 0x030a */
                   1040: inline UINT CWnd::ArrangeIconicWindows()
                   1041:        { return ::ArrangeIconicWindows(m_hWnd); }
                   1042: inline void CWnd::BringWindowToTop()
                   1043:        { ::BringWindowToTop(m_hWnd); }
                   1044: inline void CWnd::GetWindowRect(LPRECT lpRect) const
                   1045:        { ::GetWindowRect(m_hWnd, lpRect); }
                   1046: inline void CWnd::GetClientRect(LPRECT lpRect) const
                   1047:        { ::GetClientRect(m_hWnd, lpRect); }
                   1048: #if (WINVER >= 0x030a)
                   1049: inline BOOL CWnd::GetWindowPlacement(WINDOWPLACEMENT FAR* lpwndpl) const
                   1050:        { return ::GetWindowPlacement(m_hWnd, lpwndpl); }
                   1051: inline BOOL CWnd::SetWindowPlacement(const WINDOWPLACEMENT FAR* lpwndpl)
1.1.1.2 ! root     1052:        { return ::SetWindowPlacement(m_hWnd, lpwndpl); }
1.1       root     1053: inline void CWnd::MapWindowPoints(CWnd* pwndTo, LPPOINT lpPoint, UINT nCount) const
                   1054:        { ::MapWindowPoints(m_hWnd, pwndTo->GetSafeHwnd(), lpPoint, nCount); }
                   1055: inline void CWnd::MapWindowPoints(CWnd* pwndTo, LPRECT lpRect) const
                   1056:        { ::MapWindowPoints(m_hWnd, pwndTo->GetSafeHwnd(), (LPPOINT)lpRect, 2); }
                   1057: #endif /* WINVER >= 0x030a */
                   1058: inline void CWnd::ClientToScreen(LPPOINT lpPoint) const
                   1059:        { ::ClientToScreen(m_hWnd, lpPoint); }
                   1060: inline void CWnd::ClientToScreen(LPRECT lpRect) const
                   1061:        { ::ClientToScreen(m_hWnd, (LPPOINT)lpRect);
                   1062:                ::ClientToScreen(m_hWnd, ((LPPOINT)lpRect)+1); }
                   1063: inline void CWnd::ScreenToClient(LPPOINT lpPoint) const
                   1064:        { ::ScreenToClient(m_hWnd, lpPoint); }
                   1065: inline void CWnd::ScreenToClient(LPRECT lpRect) const
                   1066:        { ::ScreenToClient(m_hWnd, (LPPOINT)lpRect);
                   1067:                ::ScreenToClient(m_hWnd, ((LPPOINT)lpRect)+1); }
                   1068: inline CDC* CWnd::BeginPaint(LPPAINTSTRUCT lpPaint)
                   1069:        { return CDC::FromHandle(::BeginPaint(m_hWnd, lpPaint)); }
                   1070: inline void CWnd::EndPaint(LPPAINTSTRUCT lpPaint)
                   1071:        { ::EndPaint(m_hWnd, lpPaint); }
                   1072: inline CDC* CWnd::GetDC()
                   1073:        { return CDC::FromHandle(::GetDC(m_hWnd)); }
                   1074: #if (WINVER >= 0x030a)
                   1075: inline CDC* CWnd::GetDCEx(CRgn* prgnClip, DWORD flags)
                   1076:        { return CDC::FromHandle(::GetDCEx(m_hWnd, (HRGN)prgnClip->GetSafeHandle(), flags)); }
                   1077: #endif /* WINVER >= 0x030a */
                   1078: inline CDC* CWnd::GetWindowDC()
                   1079:        { return CDC::FromHandle(::GetWindowDC(m_hWnd)); }
                   1080: inline int CWnd::ReleaseDC(CDC* pDC)
                   1081:        { return ::ReleaseDC(m_hWnd, pDC->m_hDC); }
                   1082: inline void CWnd::UpdateWindow()
                   1083:        { ::UpdateWindow(m_hWnd); }
                   1084: inline void CWnd::SetRedraw(BOOL bRedraw /* = TRUE */)
                   1085:        { ::SendMessage(m_hWnd, WM_SETREDRAW, bRedraw, 0); }
                   1086: inline BOOL CWnd::GetUpdateRect(LPRECT lpRect, BOOL bErase /* = FALSE */)
                   1087:        { return ::GetUpdateRect(m_hWnd, lpRect, bErase); }
                   1088: inline int CWnd::GetUpdateRgn(CRgn* pRgn, BOOL bErase /* = FALSE */)
                   1089:        { return ::GetUpdateRgn(m_hWnd, (HRGN)pRgn->m_hObject, bErase); }
                   1090: inline void CWnd::Invalidate(BOOL bErase /* = TRUE  */)
                   1091:        { ::InvalidateRect(m_hWnd, (LPRECT)NULL, bErase); }
                   1092: inline void CWnd::InvalidateRect(LPRECT lpRect, BOOL bErase /* = TRUE  */)
                   1093:        { ::InvalidateRect(m_hWnd, lpRect, bErase); }
                   1094: inline void CWnd::InvalidateRgn(CRgn* pRgn, BOOL bErase /* = TRUE  */)
                   1095:        { ::InvalidateRgn(m_hWnd, (HRGN)pRgn->GetSafeHandle(), bErase); }
                   1096: inline void CWnd::ValidateRect(LPRECT lpRect)
                   1097:        { ::ValidateRect(m_hWnd, lpRect); }
                   1098: inline void CWnd::ValidateRgn(CRgn* pRgn)
                   1099:        { ::ValidateRgn(m_hWnd, (HRGN)pRgn->GetSafeHandle()); }
                   1100: inline BOOL CWnd::ShowWindow(int nCmdShow)
                   1101:        { return ::ShowWindow(m_hWnd, nCmdShow); }
                   1102: inline BOOL CWnd::IsWindowVisible() const
                   1103:        { return ::IsWindowVisible(m_hWnd); }
                   1104: inline void CWnd::ShowOwnedPopups(BOOL bShow /* = TRUE */)
                   1105:        { ::ShowOwnedPopups(m_hWnd, bShow); }
                   1106: #if (WINVER >= 0x030a)
                   1107: inline BOOL CWnd::LockWindowUpdate()
                   1108:        { return ::LockWindowUpdate(m_hWnd); }
                   1109: inline BOOL CWnd::RedrawWindow(const RECT FAR* lpRectUpdate, 
                   1110:                        CRgn* prgnUpdate, 
                   1111:                        UINT flags /* = RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE */)
                   1112:        { return ::RedrawWindow(m_hWnd, lpRectUpdate, (HRGN)prgnUpdate->GetSafeHandle(), flags); }
                   1113: inline BOOL CWnd::EnableScrollBar(int nBar, 
                   1114:                UINT nArrowFlags /* = ESB_ENABLE_BOTH */)
                   1115:        { return (BOOL)::EnableScrollBar(m_hWnd, nBar, nArrowFlags); }
                   1116: #endif /* WINVER >= 0x030a */
                   1117: inline UINT CWnd::SetTimer(int nIDEvent, UINT nElapse,
                   1118:                UINT (FAR PASCAL EXPORT* lpfnTimer)(HWND, UINT, int, DWORD))
                   1119:        { return ::SetTimer(m_hWnd, nIDEvent, nElapse,
                   1120:                (TIMERPROC)lpfnTimer); }
                   1121: inline BOOL CWnd::KillTimer(int nIDEvent)
                   1122:        { return ::KillTimer(m_hWnd, nIDEvent); }
                   1123: inline BOOL CWnd::IsWindowEnabled() const
                   1124:        { return ::IsWindowEnabled(m_hWnd); }
                   1125: inline BOOL CWnd::EnableWindow(BOOL bEnable /* = TRUE */)
                   1126:        { return ::EnableWindow(m_hWnd, bEnable); }
                   1127: inline CWnd* CWnd::GetActiveWindow()
                   1128:        { return CWnd::FromHandle(::GetActiveWindow()); }
                   1129: inline CWnd* CWnd::SetActiveWindow()
                   1130:        { return CWnd::FromHandle(::SetActiveWindow(m_hWnd)); }
                   1131: inline CWnd* CWnd::GetCapture()
                   1132:        { return CWnd::FromHandle(::GetCapture()); }
                   1133: inline CWnd* CWnd::SetCapture()
                   1134:        { return CWnd::FromHandle(::SetCapture(m_hWnd)); }
                   1135: inline CWnd* CWnd::GetFocus()
                   1136:        { return CWnd::FromHandle(::GetFocus()); }
                   1137: inline CWnd* CWnd::SetFocus()
                   1138:        { return CWnd::FromHandle(::SetFocus(m_hWnd)); }
                   1139: inline CWnd* CWnd::SetSysModalWindow()
                   1140:        { return CWnd::FromHandle(::SetSysModalWindow(m_hWnd)); }
                   1141: inline CWnd* CWnd::GetSysModalWindow()
                   1142:        { return CWnd::FromHandle(::GetSysModalWindow()); }
                   1143: inline CWnd* CWnd::GetDesktopWindow()
                   1144:        { return CWnd::FromHandle(::GetDesktopWindow()); }
                   1145: inline void CWnd::CheckDlgButton(int nIDButton, UINT nCheck)
                   1146:        { ::CheckDlgButton(m_hWnd, nIDButton, nCheck); }
                   1147: inline void CWnd::CheckRadioButton(int nIDFirstButton, int nIDLastButton,
                   1148:                int nIDCheckButton)
                   1149:        { ::CheckRadioButton(m_hWnd, nIDFirstButton, nIDLastButton, nIDCheckButton); }
                   1150: inline int CWnd::DlgDirList(LPSTR lpPathSpec, int nIDListBox,
                   1151:                int nIDStaticPath, UINT nFileType)
                   1152:        { return ::DlgDirList(m_hWnd, lpPathSpec, nIDListBox,
                   1153:                        nIDStaticPath, nFileType); }
                   1154: inline int CWnd::DlgDirListComboBox(LPSTR lpPathSpec, int nIDComboBox,
                   1155:                int nIDStaticPath, UINT nFileType)
                   1156:        { return ::DlgDirListComboBox(m_hWnd, lpPathSpec,
                   1157:                        nIDComboBox, nIDStaticPath, nFileType); }
                   1158: inline BOOL CWnd::DlgDirSelect(LPSTR lpString, int nIDListBox)
                   1159: #ifdef _NTWIN
                   1160:        { return ::DlgDirSelectEx(m_hWnd, lpString, _MAX_PATH, nIDListBox); }
                   1161: #else
                   1162:        { return ::DlgDirSelect(m_hWnd, lpString, nIDListBox); }
                   1163: #endif
                   1164: inline BOOL CWnd::DlgDirSelectComboBox(LPSTR lpString, int nIDComboBox)
                   1165: #ifdef _NTWIN
                   1166:        { return ::DlgDirSelectComboBoxEx(m_hWnd, lpString, _MAX_PATH, nIDComboBox);}
                   1167: #else
                   1168:        { return ::DlgDirSelectComboBox(m_hWnd, lpString, nIDComboBox);}
                   1169: #endif
                   1170: inline CWnd* CWnd::GetDlgItem(int nID) const
                   1171:        { return CWnd::FromHandle(::GetDlgItem(m_hWnd, nID)); }
                   1172: inline UINT CWnd::GetDlgItemInt(int nID, BOOL* lpTrans /* = NULL */,
                   1173:                BOOL bSigned /* = TRUE */) const
                   1174:        { return ::GetDlgItemInt(m_hWnd, nID, lpTrans, bSigned);}
                   1175: inline int CWnd::GetDlgItemText(int nID, LPSTR lpStr, int nMaxCount) const
                   1176:        { return ::GetDlgItemText(m_hWnd, nID, lpStr, nMaxCount);}
                   1177: inline CWnd* CWnd::GetNextDlgGroupItem(CWnd* pWndCtl, BOOL bPrevious /* = FALSE */) const
                   1178:        { return CWnd::FromHandle(::GetNextDlgGroupItem(m_hWnd,
                   1179:                        pWndCtl->m_hWnd, bPrevious)); }
                   1180: inline CWnd* CWnd::GetNextDlgTabItem(CWnd* pWndCtl, BOOL bPrevious /* = FALSE */) const
                   1181:        { return CWnd::FromHandle(::GetNextDlgTabItem(m_hWnd,
                   1182:                        pWndCtl->m_hWnd, bPrevious)); }
                   1183: inline UINT CWnd::IsDlgButtonChecked(int nIDButton) const
                   1184:        { return ::IsDlgButtonChecked(m_hWnd, nIDButton); }
                   1185: inline LONG CWnd::SendDlgItemMessage(int nID, UINT message, UINT wParam /* = 0 */, LONG lParam /* = 0 */)
                   1186:        { return ::SendDlgItemMessage(m_hWnd, nID, message, wParam, lParam); }
                   1187: inline void CWnd::SetDlgItemInt(int nID, UINT nValue, BOOL bSigned /* = TRUE */)
                   1188:        { ::SetDlgItemInt(m_hWnd, nID, nValue, bSigned); }
                   1189: inline void CWnd::SetDlgItemText(int nID, LPCSTR lpString)
                   1190:        { ::SetDlgItemText(m_hWnd, nID, lpString); }
                   1191: inline int CWnd::GetScrollPos(int nBar) const
                   1192:        { return ::GetScrollPos(m_hWnd, nBar); }
                   1193: inline void CWnd::GetScrollRange(int nBar, LPINT lpMinPos, LPINT lpMaxPos) const
                   1194:        { ::GetScrollRange(m_hWnd, nBar, lpMinPos, lpMaxPos); }
                   1195: inline void CWnd::ScrollWindow(int xAmount, int yAmount,
                   1196:                const RECT FAR* lpRect /* = NULL */,
                   1197:                const RECT FAR* lpClipRect /* = NULL */)
                   1198:        {::ScrollWindow(m_hWnd, xAmount, yAmount, lpRect, lpClipRect); }
                   1199: #if (WINVER >= 0x030a)
                   1200: inline int CWnd::ScrollWindowEx(int dx, int dy,
                   1201:                                const RECT FAR* lpScrollRect, const RECT FAR* lpClipRect,
                   1202:                                CRgn* prgnUpdate, LPRECT lpUpdateRect, UINT flags)
                   1203:        { return ::ScrollWindowEx(m_hWnd, dx, dy, lpScrollRect, lpClipRect,
                   1204:                        (HRGN)prgnUpdate->GetSafeHandle(), lpUpdateRect, flags); }
                   1205: #endif /* WINVER >= 0x030a */
                   1206: inline int CWnd::SetScrollPos(int nBar, int nPos, BOOL bRedraw /* = TRUE */)
                   1207:        { return ::SetScrollPos(m_hWnd, nBar, nPos, bRedraw); }
                   1208: inline void CWnd::SetScrollRange(int nBar, int nMinPos, int nMaxPos,
                   1209:        BOOL bRedraw /* = TRUE */)
                   1210:        { ::SetScrollRange(m_hWnd, nBar, nMinPos, nMaxPos, bRedraw); }
                   1211: inline void CWnd::ShowScrollBar(UINT nBar, BOOL bShow /* = TRUE */)
                   1212:        { ::ShowScrollBar(m_hWnd, nBar, bShow); }
                   1213: inline CWnd* CWnd::ChildWindowFromPoint(POINT point) const
                   1214:        { return CWnd::FromHandle(::ChildWindowFromPoint(m_hWnd, point)); }
                   1215: inline CWnd* CWnd::FindWindow(LPCSTR lpClassName, LPCSTR lpWindowName)
                   1216:        { return CWnd::FromHandle(
                   1217:                        ::FindWindow(lpClassName, lpWindowName)); }
                   1218: inline CWnd* CWnd::GetNextWindow(UINT nFlag /* = GW_HWNDNEXT */) const
                   1219:        { return CWnd::FromHandle(::GetNextWindow(m_hWnd, nFlag)); }
                   1220: inline CWnd* CWnd::GetTopWindow() const
                   1221:        { return CWnd::FromHandle(::GetTopWindow(m_hWnd)); }
                   1222: inline CWnd* CWnd::GetWindow(UINT nCmd) const
                   1223:        { return CWnd::FromHandle(::GetWindow(m_hWnd, nCmd)); }
                   1224: inline CWnd* CWnd::GetLastActivePopup() const
                   1225:        { return CWnd::FromHandle(::GetLastActivePopup(m_hWnd)); }
                   1226: inline BOOL CWnd::IsChild(CWnd* pWnd) const
                   1227:        { return ::IsChild(m_hWnd, pWnd->GetSafeHwnd()); }
                   1228: inline CWnd* CWnd::GetParent() const
                   1229:        { return CWnd::FromHandle(::GetParent(m_hWnd)); }
                   1230: inline CWnd* CWnd::SetParent(CWnd* pWndNewParent)
                   1231:        { return CWnd::FromHandle(::SetParent(m_hWnd,
                   1232:                        pWndNewParent->GetSafeHwnd())); }
                   1233: inline CWnd* CWnd::WindowFromPoint(POINT point)
                   1234:        { return CWnd::FromHandle(::WindowFromPoint(point)); }
                   1235: inline BOOL CWnd::FlashWindow(BOOL bInvert)
                   1236:        { return ::FlashWindow(m_hWnd, bInvert); }
                   1237: inline int CWnd::MessageBox(LPCSTR lpText, LPCSTR lpCaption /* = NULL */,
                   1238:        UINT nType /* = MB_OK */)
                   1239: #ifdef _NTWIN
                   1240:        { return ::MessageBoxEx(GetSafeHwnd(), lpText, lpCaption, nType, 0); }
                   1241: #else
                   1242:        { return ::MessageBox(GetSafeHwnd(), lpText, lpCaption,nType); }
                   1243: #endif
                   1244: inline BOOL CWnd::ChangeClipboardChain(HWND hWndNext)
                   1245:        { return ::ChangeClipboardChain(m_hWnd, hWndNext); }
                   1246: inline HWND CWnd::SetClipboardViewer()
                   1247:        { return ::SetClipboardViewer(m_hWnd); }
                   1248: inline BOOL CWnd::OpenClipboard()
                   1249:        { return ::OpenClipboard(m_hWnd); }
                   1250: #if (WINVER >= 0x030a)
                   1251: inline CWnd* CWnd::GetOpenClipboardWindow()
                   1252:        { return CWnd::FromHandle(::GetOpenClipboardWindow()); }
                   1253: #endif /* WINVER >= 0x030a */
                   1254: inline CWnd* CWnd::GetClipboardOwner()
                   1255:        { return CWnd::FromHandle(::GetClipboardOwner()); }
                   1256: inline CWnd* CWnd::GetClipboardViewer()
                   1257:        { return CWnd::FromHandle(::GetClipboardViewer()); }
                   1258: inline void CWnd::CreateCaret(CBitmap* pBitmap)
                   1259:        { ::CreateCaret(m_hWnd, (HBITMAP)pBitmap->GetSafeHandle(), 0, 0); }
                   1260: inline void CWnd::CreateSolidCaret(int nWidth, int nHeight)
                   1261:        { ::CreateCaret(m_hWnd, (HBITMAP)0, nWidth, nHeight); }
                   1262: inline void CWnd::CreateGrayCaret(int nWidth, int nHeight)
                   1263:        { ::CreateCaret(m_hWnd, (HBITMAP)1, nWidth, nHeight); }
                   1264: inline CPoint CWnd::GetCaretPos()
                   1265:        { CPoint point; ::GetCaretPos((LPPOINT)&point); return point; }
                   1266: inline void CWnd::SetCaretPos(POINT point)
                   1267:        { ::SetCaretPos(point.x, point.y); }
                   1268: inline void CWnd::HideCaret()
                   1269:        { ::HideCaret(m_hWnd); }
                   1270: inline void CWnd::ShowCaret()
                   1271:        { ::ShowCaret(m_hWnd); }
                   1272: inline afx_msg void CWnd::OnActivate(UINT, CWnd*, BOOL)
                   1273:        { Default(); }
                   1274: inline afx_msg void CWnd::OnActivateApp(BOOL, HANDLE)
                   1275:        { Default(); }
                   1276: inline afx_msg void CWnd::OnCancelMode()
                   1277:        { Default(); }
                   1278: inline afx_msg void CWnd::OnChildActivate()
                   1279:        { Default(); }
                   1280: inline afx_msg void CWnd::OnClose()
                   1281:        { Default(); }
                   1282: inline afx_msg int CWnd::OnCreate(LPCREATESTRUCT)
                   1283:        { return (int)Default(); }
                   1284: inline afx_msg HBRUSH CWnd::OnCtlColor(CDC*, CWnd*, UINT)
                   1285:        { return (HBRUSH)Default(); }
                   1286: inline afx_msg void CWnd::OnEnable(BOOL)
                   1287:        { Default(); }
                   1288: inline afx_msg void CWnd::OnEndSession(BOOL)
                   1289:        { Default(); }
                   1290: inline afx_msg void CWnd::OnEnterIdle(UINT, CWnd*)
                   1291:        { Default(); }
                   1292: inline afx_msg BOOL CWnd::OnEraseBkgnd(CDC*)
                   1293:        { return (BOOL)Default(); }
                   1294: inline afx_msg void CWnd::OnGetMinMaxInfo(LPPOINT)
                   1295:        { Default(); }
                   1296: inline afx_msg void CWnd::OnIconEraseBkgnd(CDC*)
                   1297:        { Default(); }
                   1298: inline afx_msg void CWnd::OnKillFocus(CWnd*)
                   1299:        { Default(); }
                   1300: inline afx_msg LONG CWnd::OnMenuChar(UINT, UINT,    CMenu*)
                   1301:        { return Default(); }
                   1302: inline afx_msg void CWnd::OnMenuSelect(UINT, UINT,  HMENU)
                   1303:        { Default(); }
                   1304: inline afx_msg void CWnd::OnMove(int, int)
                   1305:        { Default(); }
                   1306: inline afx_msg void CWnd::OnPaint()
                   1307:        { Default(); }
                   1308: inline afx_msg void CWnd::OnParentNotify(UINT, LONG)
                   1309:        { Default(); }
                   1310: inline afx_msg HCURSOR CWnd::OnQueryDragIcon()
                   1311:        { return (HCURSOR)Default(); }
                   1312: inline afx_msg BOOL CWnd::OnQueryEndSession()
                   1313:        { return (BOOL)Default(); }
                   1314: inline afx_msg BOOL CWnd::OnQueryNewPalette()
                   1315:        { return (BOOL)Default(); }
                   1316: inline afx_msg BOOL CWnd::OnQueryOpen()
                   1317:        { return (BOOL)Default(); }
                   1318: inline afx_msg void CWnd::OnSetFocus(CWnd*)
                   1319:        { Default(); }
                   1320: inline afx_msg void CWnd::OnShowWindow(BOOL, UINT)
                   1321:        { Default(); }
                   1322: inline afx_msg void CWnd::OnSize(UINT, int, int)
                   1323:        { Default(); }
                   1324: 
                   1325: #if (WINVER >= 0x030a)
                   1326: inline afx_msg void CWnd::OnWindowPosChanging(WINDOWPOS FAR*)
                   1327:        { Default(); }
                   1328: inline afx_msg void CWnd::OnWindowPosChanged(WINDOWPOS FAR*)
                   1329:        { Default(); }
                   1330: inline afx_msg void CWnd::OnDropFiles(HANDLE)
                   1331:        { Default(); }
                   1332: inline afx_msg void CWnd::OnPaletteIsChanging(CWnd*)
                   1333:        { Default(); }
                   1334: #endif /* WINVER >= 0x030a */
                   1335: 
                   1336: inline afx_msg BOOL CWnd::OnNcActivate(BOOL)
                   1337:        { return (BOOL)Default(); }
                   1338: inline afx_msg void CWnd::OnNcCalcSize(NCCALCSIZE_PARAMS FAR*)
                   1339:        { Default(); }
                   1340: inline afx_msg BOOL CWnd::OnNcCreate(LPCREATESTRUCT)
                   1341:        { return (BOOL)Default(); }
                   1342: inline afx_msg UINT CWnd::OnNcHitTest(CPoint)
                   1343:        { return (UINT)Default(); }
                   1344: inline afx_msg void CWnd::OnNcLButtonDblClk(UINT, CPoint)
                   1345:        { Default(); }
                   1346: inline afx_msg void CWnd::OnNcLButtonDown(UINT, CPoint)
                   1347:        { Default(); }
                   1348: inline afx_msg void CWnd::OnNcLButtonUp(UINT, CPoint)
                   1349:        { Default(); }
                   1350: inline afx_msg void CWnd::OnNcMButtonDblClk(UINT, CPoint)
                   1351:        { Default(); }
                   1352: inline afx_msg void CWnd::OnNcMButtonDown(UINT, CPoint)
                   1353:        { Default(); }
                   1354: inline afx_msg void CWnd::OnNcMButtonUp(UINT, CPoint)
                   1355:        { Default(); }
                   1356: inline afx_msg void CWnd::OnNcMouseMove(UINT, CPoint)
                   1357:        { Default(); }
                   1358: inline afx_msg void CWnd::OnNcPaint()
                   1359:        { Default(); }
                   1360: inline afx_msg void CWnd::OnNcRButtonDblClk(UINT, CPoint)
                   1361:        { Default(); }
                   1362: inline afx_msg void CWnd::OnNcRButtonDown(UINT, CPoint)
                   1363:        { Default(); }
                   1364: inline afx_msg void CWnd::OnNcRButtonUp(UINT, CPoint)
                   1365:        { Default(); }
                   1366: inline afx_msg void CWnd::OnSysChar(UINT, UINT, UINT)
                   1367:        { Default(); }
                   1368: inline afx_msg void CWnd::OnSysCommand(UINT, LONG)
                   1369:        { Default(); }
                   1370: inline afx_msg void CWnd::OnSysDeadChar(UINT, UINT, UINT)
                   1371:        { Default(); }
                   1372: inline afx_msg void CWnd::OnSysKeyDown(UINT, UINT, UINT)
                   1373:        { Default(); }
                   1374: inline afx_msg void CWnd::OnSysKeyUp(UINT, UINT, UINT)
                   1375:        { Default(); }
                   1376: inline afx_msg void CWnd::OnCompacting(UINT)
                   1377:        { Default(); }
                   1378: inline afx_msg void CWnd::OnDevModeChange(LPSTR)
                   1379:        { Default(); }
                   1380: inline afx_msg void CWnd::OnFontChange()
                   1381:        { Default(); }
                   1382: inline afx_msg void CWnd::OnPaletteChanged(CWnd*)
                   1383:        { Default(); }
                   1384: inline afx_msg void CWnd::OnSpoolerStatus(UINT, UINT)
                   1385:        { Default(); }
                   1386: inline afx_msg void CWnd::OnSysColorChange()
                   1387:        { Default(); }
                   1388: inline afx_msg void CWnd::OnTimeChange()
                   1389:        { Default(); }
                   1390: inline afx_msg void CWnd::OnWinIniChange(LPSTR)
                   1391:        { Default(); }
                   1392: inline afx_msg void CWnd::OnChar(UINT, UINT, UINT)
                   1393:        { Default(); }
                   1394: inline afx_msg void CWnd::OnDeadChar(UINT, UINT, UINT)
                   1395:        { Default(); }
                   1396: inline afx_msg void CWnd::OnHScroll(UINT, UINT, CScrollBar*)
                   1397:        { Default(); }
                   1398: inline afx_msg void CWnd::OnKeyDown(UINT, UINT, UINT)
                   1399:        { Default(); }
                   1400: inline afx_msg void CWnd::OnKeyUp(UINT, UINT, UINT)
                   1401:        { Default(); }
                   1402: inline afx_msg void CWnd::OnLButtonDblClk(UINT, CPoint)
                   1403:        { Default(); }
                   1404: inline afx_msg void CWnd::OnLButtonDown(UINT, CPoint)
                   1405:        { Default(); }
                   1406: inline afx_msg void CWnd::OnLButtonUp(UINT, CPoint)
                   1407:        { Default(); }
                   1408: inline afx_msg void CWnd::OnMButtonDblClk(UINT, CPoint)
                   1409:        { Default(); }
                   1410: inline afx_msg void CWnd::OnMButtonDown(UINT, CPoint)
                   1411:        { Default(); }
                   1412: inline afx_msg void CWnd::OnMButtonUp(UINT, CPoint)
                   1413:        { Default(); }
                   1414: inline afx_msg int CWnd::OnMouseActivate(CWnd*, UINT, UINT)
                   1415:        { return (int)Default(); }
                   1416: inline afx_msg void CWnd::OnMouseMove(UINT, CPoint)
                   1417:        { Default(); }
                   1418: inline afx_msg void CWnd::OnRButtonDblClk(UINT, CPoint)
                   1419:        { Default(); }
                   1420: inline afx_msg void CWnd::OnRButtonDown(UINT, CPoint)
                   1421:        { Default(); }
                   1422: inline afx_msg void CWnd::OnRButtonUp(UINT, CPoint)
                   1423:        { Default(); }
                   1424: inline afx_msg BOOL CWnd::OnSetCursor(CWnd*, UINT, UINT)
                   1425:        { return (BOOL)Default(); }
                   1426: inline afx_msg void CWnd::OnTimer(UINT)
                   1427:        { Default(); }
                   1428: inline afx_msg void CWnd::OnVScroll(UINT, UINT, CScrollBar*)
                   1429:        { Default(); }
                   1430: inline afx_msg void CWnd::OnInitMenu(CMenu*)
                   1431:        { Default(); }
                   1432: inline afx_msg void CWnd::OnInitMenuPopup(CMenu*, UINT, BOOL)
                   1433:        { Default(); }
                   1434: inline afx_msg void CWnd::OnAskCbFormatName(UINT, LPSTR)
                   1435:        { Default(); }
                   1436: inline afx_msg void CWnd::OnChangeCbChain(HWND, HWND)
                   1437:        { Default(); }
                   1438: inline afx_msg void CWnd::OnDestroyClipboard()
                   1439:        { Default(); }
                   1440: inline afx_msg void CWnd::OnDrawClipboard()
                   1441:        { Default(); }
                   1442: inline afx_msg void CWnd::OnHScrollClipboard(CWnd*, UINT, UINT)
                   1443:        { Default(); }
                   1444: inline afx_msg void CWnd::OnPaintClipboard(CWnd*, HANDLE)
                   1445:        { Default(); }
                   1446: inline afx_msg void CWnd::OnRenderAllFormats()
                   1447:        { Default(); }
                   1448: inline afx_msg void CWnd::OnRenderFormat(UINT)
                   1449:        { Default(); }
                   1450: inline afx_msg void CWnd::OnSizeClipboard(CWnd*, HANDLE)
                   1451:        { Default(); }
                   1452: inline afx_msg void CWnd::OnVScrollClipboard(CWnd*, UINT, UINT)
                   1453:        { Default(); }
                   1454: inline afx_msg int CWnd::OnCharToItem(UINT, CListBox*, UINT)
                   1455:        { return (int)Default(); }
                   1456: inline afx_msg UINT CWnd::OnGetDlgCode()
                   1457:        { return (UINT)Default(); }
                   1458: inline afx_msg int CWnd::OnVKeyToItem(UINT, CListBox*,  UINT)
                   1459:        { return (int)Default(); }
                   1460: inline afx_msg void CWnd::OnMDIActivate(BOOL, CWnd*, CWnd*)
                   1461:        { Default(); }
                   1462: 
                   1463: // CDialog inline functions
                   1464: inline BOOL CDialog::Create(UINT nIDTemplate, CWnd* pParentWnd /* = NULL */)
                   1465:        { return Create(MAKEINTRESOURCE(nIDTemplate), pParentWnd); }
                   1466: inline void CDialog::MapDialogRect(LPRECT lpRect) const
                   1467:        { ::MapDialogRect(m_hWnd, lpRect); }
                   1468: inline BOOL CDialog::IsDialogMessage(LPMSG lpMsg)
                   1469:        { return ::IsDialogMessage(m_hWnd, lpMsg); }
                   1470: inline void CDialog::NextDlgCtrl() const
                   1471:        { ::SendMessage(m_hWnd, WM_NEXTDLGCTL, 0, 0); }
                   1472: inline void CDialog::PrevDlgCtrl() const
                   1473:        { ::SendMessage(m_hWnd, WM_NEXTDLGCTL, 1, 0); }
                   1474: inline void CDialog::GotoDlgCtrl(CWnd* pWndCtrl)
                   1475:        { ::SendMessage(m_hWnd, WM_NEXTDLGCTL, (UINT)pWndCtrl->m_hWnd, 1L); }
                   1476: inline void CDialog::SetDefID(UINT nID)
                   1477:        { ::SendMessage(m_hWnd, DM_SETDEFID, nID, 0); }
                   1478: inline DWORD CDialog::GetDefID()
                   1479:        { return ::SendMessage(m_hWnd, DM_GETDEFID, 0, 0); }
                   1480: inline void CDialog::EndDialog(int nResult)
                   1481:        { ::EndDialog(m_hWnd, nResult); }
                   1482: 
                   1483: // Window control inline functions
                   1484: inline CStatic::CStatic() 
                   1485:        { }
                   1486: inline CButton::CButton() 
                   1487:        { }
                   1488: #if (WINVER >= 0x030a)
                   1489: inline HICON CStatic::SetIcon(HICON hIcon)
                   1490:        { return (HICON)::SendMessage(m_hWnd, STM_SETICON, (WPARAM)hIcon, 0L); }
                   1491: inline HICON CStatic::GetIcon() const
                   1492:        { return (HICON)::SendMessage(m_hWnd, STM_GETICON, 0, 0L); }
                   1493: #endif /* WINVER >= 0x030a */
                   1494:        
                   1495: inline UINT CButton::GetState() const
                   1496:        { return (UINT)::SendMessage(m_hWnd, BM_GETSTATE, 0, 0); }
                   1497: inline void CButton::SetState(BOOL bHighlight)
                   1498:        { ::SendMessage(m_hWnd, BM_SETSTATE, bHighlight, 0); }
                   1499: inline int CButton::GetCheck() const
                   1500:        { return (BOOL)::SendMessage(m_hWnd, BM_GETCHECK, 0, 0); }
                   1501: inline void CButton::SetCheck(int nCheck)
                   1502:        { ::SendMessage(m_hWnd, BM_SETCHECK, nCheck, 0); }
                   1503: inline UINT CButton::GetButtonStyle() const
                   1504:        { return (UINT)GetWindowLong(m_hWnd, GWL_STYLE) & 0xff; }
                   1505: inline void CButton::SetButtonStyle(UINT nStyle, BOOL bRedraw /* = TRUE */)
                   1506:        { ::SendMessage(m_hWnd, BM_SETSTYLE, nStyle, (LONG)bRedraw); }
                   1507: inline CListBox::CListBox() 
                   1508:        { }
                   1509: inline int CListBox::GetCount() const
                   1510:        { return (int)::SendMessage(m_hWnd, LB_GETCOUNT, 0, 0); }
                   1511: inline int CListBox::GetCurSel() const
                   1512:        { return (int)::SendMessage(m_hWnd, LB_GETCURSEL, 0, 0); }
                   1513: inline int CListBox::SetCurSel(int nSelect)
                   1514:        { return (int)::SendMessage(m_hWnd, LB_SETCURSEL, nSelect, 0); }
                   1515: inline int CListBox::GetHorizontalExtent() const
                   1516:        { return (int)::SendMessage(m_hWnd, LB_GETHORIZONTALEXTENT,
                   1517:                0, 0); }
                   1518: inline void CListBox::SetHorizontalExtent(int cxExtent)
                   1519:        { ::SendMessage(m_hWnd, LB_SETHORIZONTALEXTENT, cxExtent, 0); }
                   1520: inline int CListBox::GetSelCount() const
                   1521:        { return (int)::SendMessage(m_hWnd, LB_GETSELCOUNT, 0, 0); }
                   1522: inline int CListBox::GetSelItems(int nMaxItems, LPINT rgIndex) const
                   1523:        { return (int)::SendMessage(m_hWnd, LB_GETSELITEMS, nMaxItems, (LONG)rgIndex); }
                   1524: inline int CListBox::GetTopIndex() const
                   1525:        { return (int)::SendMessage(m_hWnd, LB_GETTOPINDEX, 0, 0); }
                   1526: inline int CListBox::SetTopIndex(int nIndex)
                   1527:        { return (int)::SendMessage(m_hWnd, LB_SETTOPINDEX, nIndex, 0);}
                   1528: inline DWORD CListBox::GetItemData(int nIndex) const
                   1529:        { return ::SendMessage(m_hWnd, LB_GETITEMDATA, nIndex, 0); }
                   1530: inline int CListBox::SetItemData(int nIndex, DWORD dwItemData)
                   1531:        { return (int)::SendMessage(m_hWnd, LB_SETITEMDATA, nIndex, (LONG)dwItemData); }
                   1532: inline int CListBox::GetItemRect(int nIndex, LPRECT lpRect) const
                   1533:        { return (int)::SendMessage(m_hWnd, LB_GETITEMRECT, nIndex, (LONG)lpRect); }
                   1534: inline int CListBox::GetSel(int nIndex) const
                   1535:        { return (int)::SendMessage(m_hWnd, LB_GETSEL, nIndex, 0); }
                   1536: inline int CListBox::SetSel(int nIndex, BOOL bSelect)
                   1537:        { return (int)::SendMessage(m_hWnd, LB_SETSEL, bSelect, nIndex); }
                   1538: inline int CListBox::GetText(int nIndex, LPSTR lpBuffer) const
                   1539:        { return (int)::SendMessage(m_hWnd, LB_GETTEXT, nIndex, (LONG)lpBuffer); }
                   1540: inline int CListBox::GetTextLen(int nIndex) const
                   1541:        { return (int)::SendMessage(m_hWnd, LB_GETTEXTLEN, nIndex, 0); }
                   1542: inline void CListBox::GetText(int nIndex, CString& rString) const
                   1543:        { GetText(nIndex, rString.GetBufferSetLength(GetTextLen(nIndex))); }
                   1544: inline void CListBox::SetColumnWidth(int cxWidth)
                   1545:        { ::SendMessage(m_hWnd, LB_SETCOLUMNWIDTH, cxWidth, 0); }
                   1546: inline BOOL CListBox::SetTabStops(int nTabStops, LPINT rgTabStops)
                   1547:        { return (BOOL)::SendMessage(m_hWnd, LB_SETTABSTOPS, nTabStops, (LONG)rgTabStops); }
                   1548: inline void CListBox::SetTabStops()
                   1549:        { VERIFY(::SendMessage(m_hWnd, LB_SETTABSTOPS, 0, 0)); }
                   1550: inline BOOL CListBox::SetTabStops(int cxEachStop)
                   1551:        { return (BOOL)::SendMessage(m_hWnd, LB_SETTABSTOPS, 1, (LONG)(LPINT)&cxEachStop); }
                   1552: #if (WINVER >= 0x030a)
                   1553: inline int CListBox::SetItemHeight(int nIndex, UINT cyItemHeight)
                   1554:        { return (int)::SendMessage(m_hWnd, LB_SETITEMHEIGHT, nIndex, MAKELONG(cyItemHeight, 0)); }
                   1555: inline int CListBox::GetItemHeight(int nIndex) const
                   1556:        { return (int)::SendMessage(m_hWnd, LB_GETITEMHEIGHT, nIndex, 0L); }
                   1557: inline int CListBox::FindStringExact(int nIndexStart, LPCSTR lpszFind) const
                   1558:        { return (int)::SendMessage(m_hWnd, LB_FINDSTRINGEXACT, nIndexStart, (LONG)lpszFind); }
                   1559: inline int CListBox::GetCaretIndex() const
                   1560:        { return (int)::SendMessage(m_hWnd, LB_GETCARETINDEX, 0, 0L); }
                   1561: inline int CListBox::SetCaretIndex(int nIndex, BOOL bScroll /* = TRUE */)
                   1562:        { return (int)::SendMessage(m_hWnd, LB_SETCARETINDEX, nIndex, MAKELONG(bScroll, 0)); }
                   1563: #endif  /* WINVER >= 0x030a */
                   1564: inline int CListBox::AddString(LPCSTR lpItem)
                   1565:        { return (int)::SendMessage(m_hWnd, LB_ADDSTRING, 0, (LONG)lpItem); }
                   1566: inline int CListBox::DeleteString(UINT nIndex)
                   1567:        { return (int)::SendMessage(m_hWnd, LB_DELETESTRING, nIndex, 0); }
                   1568: inline int CListBox::InsertString(int nIndex, LPCSTR lpItem)
                   1569:        { return (int)::SendMessage(m_hWnd, LB_INSERTSTRING, nIndex, (LONG)lpItem); }
                   1570: inline void CListBox::ResetContent()
                   1571:        { ::SendMessage(m_hWnd, LB_RESETCONTENT, 0, 0); }
                   1572: inline int CListBox::Dir(UINT attr, LPCSTR lpWildCard)
                   1573:        { return (int)::SendMessage(m_hWnd, LB_DIR, attr, (LONG)lpWildCard); }
                   1574: inline int CListBox::FindString(int nStartAfter, LPCSTR lpItem) const
                   1575:        { return (int)::SendMessage(m_hWnd, LB_FINDSTRING,
                   1576:                nStartAfter, (LONG)lpItem); }
                   1577: inline int CListBox::SelectString(int nStartAfter, LPCSTR lpItem)
                   1578:        { return (int)::SendMessage(m_hWnd, LB_SELECTSTRING,
                   1579:                nStartAfter, (LONG)lpItem); }
                   1580: inline int CListBox::SelItemRange(BOOL bSelect, int nFirstItem, int nLastItem)
                   1581:        { return (int)::SendMessage(m_hWnd, LB_SELITEMRANGE, bSelect,
                   1582:                MAKELONG(nFirstItem, nLastItem)); }
                   1583: inline CComboBox::CComboBox() 
                   1584:        { }
                   1585: inline int CComboBox::GetCount() const
                   1586:        { return (int)::SendMessage(m_hWnd, CB_GETCOUNT, 0, 0); }
                   1587: inline int CComboBox::GetCurSel() const
                   1588:        { return (int)::SendMessage(m_hWnd, CB_GETCURSEL, 0, 0); }
                   1589: inline int CComboBox::SetCurSel(int nSelect)
                   1590:        { return (int)::SendMessage(m_hWnd, CB_SETCURSEL, nSelect, 0); }
                   1591: inline DWORD CComboBox::GetEditSel() const
                   1592:        { return ::SendMessage(m_hWnd, CB_GETEDITSEL, 0, 0); }
                   1593: inline BOOL CComboBox::LimitText(int nMaxChars)
                   1594:        { return (BOOL)::SendMessage(m_hWnd, CB_LIMITTEXT, nMaxChars, 0); }
                   1595: inline BOOL CComboBox::SetEditSel(int nStartChar, int nEndChar)
                   1596:        { return (BOOL)::SendMessage(m_hWnd, CB_SETEDITSEL, 0, MAKELONG(nStartChar, nEndChar)); }
                   1597: inline DWORD CComboBox::GetItemData(int nIndex) const
                   1598:        { return ::SendMessage(m_hWnd, CB_GETITEMDATA, nIndex, 0); }
                   1599: inline int CComboBox::SetItemData(int nIndex, DWORD dwItemData)
                   1600:        { return (int)::SendMessage(m_hWnd, CB_SETITEMDATA, nIndex, (LONG)dwItemData); }
                   1601: inline int CComboBox::GetLBText(int nIndex, LPSTR lpText) const
                   1602:        { return (int)::SendMessage(m_hWnd, CB_GETLBTEXT, nIndex, (LONG)lpText); }
                   1603: inline int CComboBox::GetLBTextLen(int nIndex) const
                   1604:        { return (int)::SendMessage(m_hWnd, CB_GETLBTEXTLEN, nIndex, 0); }
                   1605: inline void CComboBox::GetLBText(int nIndex, CString& rString) const
                   1606:        { GetLBText(nIndex, rString.GetBufferSetLength(GetLBTextLen(nIndex))); }
                   1607: inline void CComboBox::ShowDropDown(BOOL bShowIt /* = TRUE */)
                   1608:        { ::SendMessage(m_hWnd, CB_SHOWDROPDOWN, bShowIt, 0); }
                   1609: inline int CComboBox::AddString(LPCSTR lpString)
                   1610:        { return (int)::SendMessage(m_hWnd, CB_ADDSTRING, 0, (LONG)lpString); }
                   1611: inline int CComboBox::DeleteString(UINT nIndex)
                   1612:        { return (int)::SendMessage(m_hWnd, CB_DELETESTRING, nIndex, 0);}
                   1613: inline int CComboBox::InsertString(int nIndex, LPCSTR lpString)
                   1614:        { return (int)::SendMessage(m_hWnd, CB_INSERTSTRING, nIndex, (LONG)lpString); }
                   1615: inline void CComboBox::ResetContent()
                   1616:        { ::SendMessage(m_hWnd, CB_RESETCONTENT, 0, 0); }
                   1617: inline int CComboBox::Dir(UINT attr, LPCSTR lpWildCard)
                   1618:        { return (int)::SendMessage(m_hWnd, CB_DIR, attr, (LONG)lpWildCard); }
                   1619: inline int CComboBox::FindString(int nStartAfter, LPCSTR lpString) const
                   1620:        { return (int)::SendMessage(m_hWnd, CB_FINDSTRING, nStartAfter,
                   1621:                (LONG)lpString); }
                   1622: inline int CComboBox::SelectString(int nStartAfter, LPCSTR lpString)
                   1623:        { return (int)::SendMessage(m_hWnd, CB_SELECTSTRING,
                   1624:                nStartAfter, (LONG)lpString); }
                   1625: inline void CComboBox::Clear()
                   1626:        { ::SendMessage(m_hWnd, WM_CLEAR, 0, 0); }
                   1627: inline void CComboBox::Copy()
                   1628:        { ::SendMessage(m_hWnd, WM_COPY, 0, 0); }
                   1629: inline void CComboBox::Cut()
                   1630:        { ::SendMessage(m_hWnd, WM_CUT, 0, 0); }
                   1631: inline void CComboBox::Paste()
                   1632:        { ::SendMessage(m_hWnd, WM_PASTE, 0, 0); }
                   1633: #if (WINVER >= 0x030a)
                   1634: inline int CComboBox::SetItemHeight(int nIndex, UINT cyItemHeight)
                   1635:        { return (int)::SendMessage(m_hWnd, CB_SETITEMHEIGHT, nIndex, MAKELONG(cyItemHeight, 0)); }
                   1636: inline int CComboBox::GetItemHeight(int nIndex) const
                   1637:        { return (int)::SendMessage(m_hWnd, CB_GETITEMHEIGHT, nIndex, 0L); }
                   1638: inline int CComboBox::FindStringExact(int nIndexStart, LPCSTR lpszFind) const
                   1639:        { return (int)::SendMessage(m_hWnd, CB_FINDSTRINGEXACT, nIndexStart, (LONG)lpszFind); }
                   1640: inline int CComboBox::SetExtendedUI(BOOL bExtended /* = TRUE */ )
                   1641:        { return (int)::SendMessage(m_hWnd, CB_SETEXTENDEDUI, bExtended, 0L); }
                   1642: inline BOOL CComboBox::GetExtendedUI() const
                   1643:        { return (BOOL)::SendMessage(m_hWnd, CB_GETEXTENDEDUI, 0, 0L); }
                   1644: inline void CComboBox::GetDroppedControlRect(LPRECT lprect) const
                   1645:        { ::SendMessage(m_hWnd, CB_GETDROPPEDCONTROLRECT, 0, (DWORD)lprect); }
                   1646: inline BOOL CComboBox::GetDroppedState() const
                   1647:        { return (BOOL)::SendMessage(m_hWnd, CB_GETDROPPEDSTATE, 0, 0L); }
                   1648: #endif  /* WINVER >= 0x030a */
                   1649: 
                   1650: inline CEdit::CEdit()
                   1651:        { }
                   1652: inline BOOL CEdit::CanUndo() const
                   1653:        { return (BOOL)::SendMessage(m_hWnd, EM_CANUNDO, 0, 0); }
                   1654: inline int CEdit::GetLineCount() const
                   1655:        { return (int)::SendMessage(m_hWnd, EM_GETLINECOUNT, 0, 0); }
                   1656: inline BOOL CEdit::GetModify() const
                   1657:        { return (BOOL)::SendMessage(m_hWnd, EM_GETMODIFY, 0, 0); }
                   1658: inline void CEdit::SetModify(BOOL bModified /* = TRUE */)
                   1659:        { ::SendMessage(m_hWnd, EM_SETMODIFY, bModified, 0); }
                   1660: inline void CEdit::GetRect(LPRECT lpRect) const
                   1661:        { ::SendMessage(m_hWnd, EM_GETRECT, 0, (LONG)lpRect); }
                   1662: inline DWORD CEdit::GetSel() const
                   1663:        { return ::SendMessage(m_hWnd, EM_GETSEL, 0, 0); }
1.1.1.2 ! root     1664: inline void CEdit::GetSel(int& nStartChar, int& nEndChar) const
        !          1665: #ifdef _NTWIN
        !          1666:        { ::SendMessage(m_hWnd, EM_GETSEL, (WPARAM)&nStartChar,(LPARAM)&nEndChar); }
        !          1667: #else
        !          1668:        { 
        !          1669:                DWORD dwSel = (DWORD)::SendMessage(m_hWnd, EM_GETSEL, 0, 0); 
        !          1670:                nStartChar = (int)LOWORD(dwSel); 
        !          1671:                nEndChar = (int)HIWORD(dwSel); 
        !          1672:        }
        !          1673: #endif
1.1       root     1674: inline HANDLE   CEdit::GetHandle() const
                   1675:        { return (HANDLE)::SendMessage(m_hWnd, EM_GETHANDLE, 0, 0); }
                   1676: inline void CEdit::SetHandle(HANDLE hBuffer)
                   1677:        { ::SendMessage(m_hWnd, EM_SETHANDLE, (UINT)hBuffer, 0); }
                   1678: inline int CEdit::GetLine(int nIndex, LPSTR lpBuffer) const
                   1679:        { return (int)::SendMessage(m_hWnd, EM_GETLINE, nIndex, (LONG)lpBuffer); }
                   1680: inline int CEdit::GetLine(int nIndex, LPSTR lpBuffer, int nMaxLength) const
                   1681:        {
                   1682:                *(LPINT)lpBuffer = nMaxLength;
                   1683:                return (int)::SendMessage(m_hWnd, EM_GETLINE, nIndex,
                   1684:                        (LONG)lpBuffer);
                   1685:        }
                   1686: inline void CEdit::EmptyUndoBuffer()
                   1687:        { ::SendMessage(m_hWnd, EM_EMPTYUNDOBUFFER, 0, 0); }
                   1688: inline BOOL CEdit::FmtLines(BOOL bAddEOL)
                   1689:        { return (BOOL)::SendMessage(m_hWnd, EM_FMTLINES, bAddEOL, 0); }
                   1690: inline void CEdit::LimitText(int nChars /* = 0 */)
                   1691:        { ::SendMessage(m_hWnd, EM_LIMITTEXT, nChars, 0); }
                   1692: inline int CEdit::LineFromChar(int nIndex /* = -1 */) const
                   1693:        { return (int)::SendMessage(m_hWnd, EM_LINEFROMCHAR, nIndex, 0); }
                   1694: inline int CEdit::LineIndex(int nLine /* = -1 */) const
                   1695:        { return (int)::SendMessage(m_hWnd, EM_LINEINDEX, nLine, 0); }
                   1696: inline int CEdit::LineLength(int nLine /* = -1 */) const
                   1697:        { return (int)::SendMessage(m_hWnd, EM_LINELENGTH, nLine, 0); }
                   1698: inline void CEdit::LineScroll(int nLines, int nChars /* = 0 */)
                   1699: #ifdef _NTWIN
                   1700:        { ::SendMessage(m_hWnd, EM_LINESCROLL, nChars, nLines); }
                   1701: #else
                   1702:        { ::SendMessage(m_hWnd, EM_LINESCROLL, 0, MAKELONG(nLines, nChars)); }
                   1703: #endif
                   1704: inline void CEdit::ReplaceSel(LPCSTR lpNewText)
                   1705:        { ::SendMessage(m_hWnd, EM_REPLACESEL, 0, (LONG)lpNewText); }
                   1706: inline void CEdit::SetPasswordChar(char ch /* = '\0' */)
                   1707:        { ::SendMessage(m_hWnd, EM_SETPASSWORDCHAR, ch, 0); }
                   1708: inline void CEdit::SetRect(LPRECT lpRect)
                   1709:        { ::SendMessage(m_hWnd, EM_SETRECT, 0, (LONG)lpRect); }
                   1710: inline void CEdit::SetRectNP(LPRECT lpRect)
                   1711:        { ::SendMessage(m_hWnd, EM_SETRECTNP, 0, (LONG)lpRect); }
                   1712: inline void CEdit::SetSel(DWORD dwSelection)
                   1713: #ifdef _NTWIN
                   1714:        { ::SendMessage(m_hWnd, EM_SETSEL, LOWORD(dwSelection), HIWORD(dwSelection)); }
                   1715: #else
                   1716:        { ::SendMessage(m_hWnd, EM_SETSEL, 0, (LONG)dwSelection); }
                   1717: #endif
                   1718: inline void CEdit::SetSel(int nStartChar, int nEndChar)
                   1719: #ifdef _NTWIN
                   1720:        { ::SendMessage(m_hWnd, EM_SETSEL, nStartChar, nEndChar); }
                   1721: #else
                   1722:        { ::SendMessage(m_hWnd, EM_SETSEL, 0, MAKELONG(nStartChar, nEndChar)); }
                   1723: #endif
                   1724: inline BOOL CEdit::SetTabStops(int nTabStops, LPINT rgTabStops)
                   1725:        { return (BOOL)::SendMessage(m_hWnd, EM_SETTABSTOPS, nTabStops,
                   1726:                (LONG)rgTabStops); }
                   1727: inline void CEdit::SetTabStops()
                   1728:        { VERIFY(::SendMessage(m_hWnd, EM_SETTABSTOPS, 0, 0)); }
                   1729: inline BOOL CEdit::SetTabStops(int cxEachStop)
                   1730:        { return (BOOL)::SendMessage(m_hWnd, EM_SETTABSTOPS,
                   1731:                1, (LONG)(LPINT)&cxEachStop); }
                   1732: inline BOOL CEdit::Undo()
                   1733:        { return (BOOL)::SendMessage(m_hWnd, EM_UNDO, 0, 0); }
                   1734: inline void CEdit::Clear()
                   1735:        { ::SendMessage(m_hWnd, WM_CLEAR, 0, 0); }
                   1736: inline void CEdit::Copy()
                   1737:        { ::SendMessage(m_hWnd, WM_COPY, 0, 0); }
                   1738: inline void CEdit::Cut()
                   1739:        { ::SendMessage(m_hWnd, WM_CUT, 0, 0); }
                   1740: inline void CEdit::Paste()
                   1741:        { ::SendMessage(m_hWnd, WM_PASTE, 0, 0); }
                   1742: #if (WINVER >= 0x030a)
                   1743: inline BOOL CEdit::SetReadOnly(BOOL bReadOnly /* = TRUE */ )
                   1744:        { return (BOOL)::SendMessage(m_hWnd, EM_SETREADONLY, bReadOnly, 0L); }
                   1745: inline int CEdit::GetFirstVisibleLine() const
                   1746:        { return (int)::SendMessage(m_hWnd, EM_GETFIRSTVISIBLELINE, 0, 0L); }
                   1747: inline char CEdit::GetPasswordChar() const
                   1748:        { return (char)::SendMessage(m_hWnd, EM_GETPASSWORDCHAR, 0, 0L); }
                   1749: #endif  /* WINVER >= 0x030a */
                   1750: 
                   1751: inline CScrollBar::CScrollBar() 
                   1752:        { }
                   1753: inline int CScrollBar::GetScrollPos() const
                   1754:        { return ::GetScrollPos(m_hWnd, SB_CTL); }
                   1755: inline int CScrollBar::SetScrollPos(int nPos, BOOL bRedraw /* = TRUE */)
                   1756:        { return ::SetScrollPos(m_hWnd, SB_CTL, nPos, bRedraw); }
                   1757: inline void CScrollBar::GetScrollRange(LPINT lpMinPos, LPINT lpMaxPos) const
                   1758:        { ::GetScrollRange(m_hWnd, SB_CTL, lpMinPos, lpMaxPos); }
                   1759: inline void CScrollBar::SetScrollRange(int nMinPos, int nMaxPos, BOOL bRedraw /* = TRUE */)
                   1760:        { ::SetScrollRange(m_hWnd, SB_CTL, nMinPos, nMaxPos, bRedraw); }
                   1761: inline void CScrollBar::ShowScrollBar(BOOL bShow /* = TRUE */)
                   1762:        { ::ShowScrollBar(m_hWnd, SB_CTL, bShow); }
                   1763: #if (WINVER >= 0x030a)
                   1764: inline BOOL CScrollBar::EnableScrollBar(UINT nArrowFlags /* = ESB_ENABLE_BOTH */ )
                   1765:        { return ::EnableScrollBar(m_hWnd, SB_CTL, nArrowFlags); }
                   1766: #endif  /* WINVER >= 0x030a */
                   1767: 
                   1768: inline CBitmapButton::CBitmapButton()
                   1769:        { }
                   1770: inline CBitmapButton::CBitmapButton(LPCSTR lpBitmapResource,
                   1771:        LPCSTR lpBitmapResourceSel /* = NULL */,
                   1772:        LPCSTR lpBitmapResourceFocus /* = NULL */)
                   1773:        { VERIFY(LoadBitmaps(lpBitmapResource, lpBitmapResourceSel,
                   1774:                lpBitmapResourceFocus)); }
                   1775:        
                   1776: 
                   1777: // MDI inline functions
                   1778: inline void CMDIFrameWnd::MDIActivate(CWnd* pWndActivate)
                   1779:        { ::SendMessage(m_hWndMDIClient, WM_MDIACTIVATE,
                   1780:                (UINT)pWndActivate->m_hWnd, 0); }
                   1781: inline CMDIChildWnd* CMDIFrameWnd::MDIGetActive(BOOL* pbMaximized /* = NULL */) const
                   1782: #ifdef _NTWIN
                   1783:        { HWND hWnd = (HWND)::SendMessage(m_hWndMDIClient, WM_MDIGETACTIVE, 0, 0);
                   1784:                if (pbMaximized != NULL)
                   1785:                        *pbMaximized = !!(::GetWindowLong(hWnd, GWL_STYLE) & WS_MAXIMIZE);
                   1786:                return (CMDIChildWnd*)CWnd::FromHandle(hWnd); }
                   1787: #else
                   1788:        { LONG l;
                   1789:                l = ::SendMessage(m_hWndMDIClient, WM_MDIGETACTIVE, 0, 0);
                   1790:                if (pbMaximized != NULL)
                   1791:                        *pbMaximized = HIWORD(l);
                   1792:                return (CMDIChildWnd*)CWnd::FromHandle((HWND)LOWORD(l)); }
                   1793: #endif
                   1794: inline void CMDIFrameWnd::MDIIconArrange()
                   1795:        { ::SendMessage(m_hWndMDIClient, WM_MDIICONARRANGE, 0, 0); }
                   1796: inline void CMDIFrameWnd::MDIMaximize(CWnd* pWnd)
                   1797:        { ::SendMessage(m_hWndMDIClient, WM_MDIMAXIMIZE, (UINT)pWnd->m_hWnd, 0); }
                   1798: inline void CMDIFrameWnd::MDINext()
                   1799:        { ::SendMessage(m_hWndMDIClient, WM_MDINEXT, 0, 0); }
                   1800: inline void CMDIFrameWnd::MDIRestore(CWnd* pWnd)
                   1801:        { ::SendMessage(m_hWndMDIClient, WM_MDIRESTORE, (UINT)pWnd->m_hWnd, 0); }
                   1802: inline CMenu* CMDIFrameWnd::MDISetMenu(CMenu* pFrameMenu, CMenu* pWindowMenu)
                   1803: #ifdef _NTWIN
                   1804:        { return CMenu::FromHandle((HMENU)::SendMessage(
                   1805:                m_hWndMDIClient, WM_MDISETMENU,
                   1806:                (WPARAM)pFrameMenu->GetSafeHmenu(),
                   1807:                (LPARAM)pWindowMenu->GetSafeHmenu())); }
                   1808: #else
                   1809:        { return CMenu::FromHandle((HMENU)::SendMessage(
                   1810:                m_hWndMDIClient, WM_MDISETMENU, 0,
                   1811:                MAKELONG(pFrameMenu->GetSafeHmenu(),
                   1812:                pWindowMenu->GetSafeHmenu()))); }
                   1813: #endif
                   1814: inline void CMDIFrameWnd::MDITile()
                   1815:        { ::SendMessage(m_hWndMDIClient, WM_MDITILE, 0, 0); }
                   1816: inline void CMDIFrameWnd::MDICascade()
                   1817:        { ::SendMessage(m_hWndMDIClient, WM_MDICASCADE, 0, 0); }
                   1818: 
                   1819: #if (WINVER >= 0x030a)
                   1820: inline void CMDIFrameWnd::MDICascade(int nType)
                   1821:        { ::SendMessage(m_hWndMDIClient, WM_MDICASCADE, nType, 0); }
                   1822: inline void CMDIFrameWnd::MDITile(int nType)
                   1823:        { ::SendMessage(m_hWndMDIClient, WM_MDITILE, nType, 0); }
                   1824: #endif /* WINVER >= 0x030a */
                   1825: 
                   1826: inline CMDIChildWnd::CMDIChildWnd() 
                   1827:        { }
                   1828: inline void CMDIChildWnd::MDIDestroy()
                   1829:        { GetParent()->SendMessage(WM_MDIDESTROY, (UINT)m_hWnd); }
                   1830: inline void CMDIChildWnd::MDIActivate()
                   1831:        { GetParent()->SendMessage(WM_MDIACTIVATE, (UINT)m_hWnd); }
                   1832: inline void CMDIChildWnd::MDIMaximize()
                   1833:        { GetParent()->SendMessage(WM_MDIMAXIMIZE, (UINT)m_hWnd); }
                   1834: inline void CMDIChildWnd::MDIRestore()
                   1835:        { GetParent()->SendMessage(WM_MDIRESTORE, (UINT)m_hWnd); }
                   1836: 
                   1837: // CWinApp inline functions
                   1838: inline HCURSOR CWinApp::LoadCursor(LPCSTR lpCursorName)
                   1839:        { return ::LoadCursor(AfxGetResourceHandle(), lpCursorName); }
                   1840: inline HCURSOR CWinApp::LoadCursor(UINT nIDCursor)
                   1841:        { return ::LoadCursor(AfxGetResourceHandle(),
                   1842:                MAKEINTRESOURCE(nIDCursor)); }
                   1843: inline HCURSOR CWinApp::LoadStandardCursor(LPCSTR lpCursorName)
                   1844:        { return ::LoadCursor(NULL, lpCursorName); }
                   1845: inline HCURSOR CWinApp::LoadOEMCursor(UINT nIDCursor)
                   1846:        { return ::LoadCursor(NULL, MAKEINTRESOURCE(nIDCursor)); }
                   1847: inline HICON    CWinApp::LoadIcon(LPCSTR lpIconName)
                   1848:        { return ::LoadIcon(AfxGetResourceHandle(), lpIconName); }
                   1849: inline HICON    CWinApp::LoadIcon(UINT nIDIcon)
                   1850:        { return ::LoadIcon(AfxGetResourceHandle(), MAKEINTRESOURCE(nIDIcon)); }
                   1851: inline HICON    CWinApp::LoadStandardIcon(LPCSTR lpIconName)
                   1852:        { return ::LoadIcon(NULL, lpIconName); }
                   1853: inline HICON    CWinApp::LoadOEMIcon(UINT nIDIcon)
                   1854:        { return ::LoadIcon(NULL, MAKEINTRESOURCE(nIDIcon)); }
                   1855: 
                   1856: #undef THIS_FILE
                   1857: #define THIS_FILE __FILE__
                   1858: #endif //__AFXWIN_INL__

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.