FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
C++
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
August 01, 2000

A Lightweight Window Wrapper

(Page 2 of 5)
August 2000/A Lightweight Window Wrapper/Listing 1

Listing 1: Declaration of CWindow

class CWindow
{
public:
    CWindow();
    HWND Create(int x, int y, int nWidth, int nHeight,
            HWND hParent, HMENU hMenu, HINSTANCE hInstance);

    HWND _hwnd;

protected:
    static LRESULT CALLBACK BaseWndProc(HWND hwnd, UINT msg,
        WPARAM wParam, LPARAM lParam);
    
    virtual LRESULT WindowProc(HWND hwnd, UINT msg,
        WPARAM wParam, LPARAM lParam, PBOOL pbProcessed);

    WNDCLASSEX _WndClass;
    DWORD _dwExtendedStyle;
    DWORD _dwStyle;
    LPSTR _pszClassName;
    LPSTR _pszTitle;
};  

class CMainWindow : public CWindow
{
public: 
    CMainWindow();
};

class CChildWindow : public CMainWindow
{
public:
    CChildWindow();

protected:
    virtual LRESULT WindowProc(HWND hwnd, UINT msg,
        WPARAM wParam, LPARAM lParam, PBOOL pbProcessed);

    virtual void OnDestroy(HWND hwnd);
    virtual void OnPaint(HWND hwnd);
};
Previous Page | 1 | 2 | 3 | 4 | 5 Next Page
RELATED ARTICLES
No Related Articles
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK