--- q_a/samples/spincube/spincube.h 2018/08/09 18:29:19 1.1.1.1 +++ q_a/samples/spincube/spincube.h 2018/08/09 18:29:21 1.1.1.2 @@ -1,64 +1,65 @@ -/************************************************************************\ +/******************************************************************************\ * -* SPINCUBE.H +* SPINCUBE.H * -\************************************************************************/ +\******************************************************************************/ #include -/************************************************************************\ -* SYMBOLIC CONSTANTS -\************************************************************************/ +/******************************************************************************\ +* SYMBOLIC CONSTANTS +\******************************************************************************/ #define SPINCUBECLASS "Spincube" #define SPINCUBEDESCRIPTION "An animated control" #define SPINCUBEDEFTEXT ":-)" #define STYLEDEFSTR "0" -#define SPINCUBE_EXTRA 4 /* number of extra bytes for spincube class */ +#define SPINCUBE_EXTRA 4 // number of extra bytes for spincube class -#define SPIN_EVENT 1 /* timer event id to repaint control */ -#define SPIN_INTERVAL 75 /* milliseconds between repaints */ +#define SPIN_EVENT 1 // timer event id to repaint control +#define SPIN_INTERVAL 75 // milliseconds between repaints -#define DID_OK 101 /* dialog control id's */ -#define DID_CANCEL 102 -#define DID_EDIT 103 -#define DID_TEXT 104 +#define DID_OK 101 // dialog control id's +#define DID_CANCEL 102 +#define DID_EDIT 103 +#define DID_TEXT 104 -#define GWL_SPINCUBEDATA 0 /* offset of control's instance data */ +#define GWL_SPINCUBEDATA 0 // offset of control's instance data -#define FLOATS_OK - -/************************************************************************\ -* TYPEDEFs -\************************************************************************/ +/******************************************************************************\ +* TYPEDEFs +\******************************************************************************/ typedef struct -{ float xRotAngle; +{ + float xRotAngle; float yRotAngle; float zRotAngle; BOOL inMotion; + } SPINCUBEINFO, *PSPINCUBEINFO; -/************************************************************************\ -* GLOBAL VARIABLES -\************************************************************************/ - -HANDLE hMod; /* DLL's module handle */ -LPCCSTYLE gpccs; /* global pointer to a CCSTYLE structure */ - - -/************************************************************************\ -* FUNCTION PROTOTYPES -\************************************************************************/ - -INT CALLBACK SpincubeSizeToText (DWORD, DWORD, HFONT, LPSTR); -BOOL CALLBACK SpincubeStyle (HWND, LPCCSTYLE); -LONG SpincubeWndProc (HWND, UINT, UINT, LONG); -BOOL SpincubeDlgProc (HWND, UINT, UINT, LONG); +/******************************************************************************\ +* GLOBAL VARIABLES +\******************************************************************************/ + +HANDLE ghMod; // DLL's module handle +LPCCSTYLE gpccs; // global pointer to a CCSTYLE structure + + + +/******************************************************************************\ +* FUNCTION PROTOTYPES +\******************************************************************************/ + +INT CALLBACK SpincubeSizeToText (DWORD, DWORD, HFONT, LPSTR); +BOOL CALLBACK SpincubeStyle (HWND, LPCCSTYLE); +LRESULT CALLBACK SpincubeWndProc (HWND, UINT, WPARAM, LPARAM); +LRESULT CALLBACK SpincubeDlgProc (HWND, UINT, WPARAM, LPARAM);