Usage: VS2008, Win32, C / C ++
I am trying to encapsulate my entire dialog box into a class for reuse. This is similar to user control. In doing so, I move my individual functions to the class. The following structure design, although it gives me problems with Visual Studio issuing: error C2334 '{'.
This is a simple message card layout. But I can not avoid this error C2334 .: (
Here is my snippet of class code.
class CScrollingListDlg
{
private:
LRESULT DoCommandMain (HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
LRESULT DoPaintMain (HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
LRESULT DoAnimationTimer (HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
LRESULT DoHandleTouch (HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
LRESULT DoDestroyMain (HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
struct decodeUINT {
UINT Code;
LRESULT (*Fxn)(HWND, UINT, WPARAM, LPARAM);
};
struct decodeCMD {
UINT Code;
LRESULT (*Fxn)(HWND, WORD, HWND, WORD);
};
const struct decodeUINT MainMessages[] = {
WM_PAINT, DoPaintMain,
WM_DESTROY, DoDestroyMain,
WM_QUIT, DoDestroyMain,
WM_COMMAND, DoCommandMain,
};
};
What am I missing here?
Thanks.