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

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

User Interface Programming

(Page 12 of 15)
March 2000/User Interface Programming/Listing 2

Listing 2: internal.h — Definitions for internal use

#include <windows.h>
#include <windowsx.h>
#include <tchar.h>
#include <assert.h>
#include "wdjsub.h"

typedef struct SUBCLASSING {
    WNDPROC            wndProc;
    WNDPROC            wndProcSaved;
    void               *pData;
    struct SUBCLASSING *pNext;
} SUBCLASSING;

#ifdef _UNITTEST_
    LPCTSTR getPropertyName( void );
    void trace( HWND hwnd, LPCTSTR psz );
#else
    #ifdef _DEBUG
        #define trace( hwnd, X ) OutputDebugString( X )
    #else
        #define trace( hwnd, X )
    #endif
#endif

#ifdef _DEBUG
    #define verify assert
    void __cdecl tracef( HWND hwnd, LPCTSTR pszFmt, ... );
    #define trace1( hwnd, fmt, A     ) tracef( hwnd, fmt, A       )
    #define trace2( hwnd, fmt, A,B   ) tracef( hwnd, fmt, A, B    )
    #define trace3( hwnd, fmt, A,B,C ) tracef( hwnd, fmt, A, B, C )
    LPCTSTR getProcName( WNDPROC wndProc );
#else
    #define verify( X ) ( X )
    #define trace1( hwnd, fmt, A     )
    #define trace2( hwnd, fmt, A,B   )
    #define trace3( hwnd, fmt, A,B,C )
#endif

#define getWndProc( hwnd ) \
    ( (WNDPROC) GetWindowLong( hwnd, GWL_WNDPROC ) )
#define getHead( hwnd ) \
    ( (SUBCLASSING *) GetProp( hwnd, getPropertyName() ) )
/* End of File */
Previous Page | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK