In the modeless dialog's class I added the line
Code:
#define WM_LOADFILE WM_USER+0x100
in the class header and am using sendmessage as so.
Code:
m_pMain->SendMessage(WM_CLOSE);
Where m_pMain is a pointer to the main window I got using..
Code:
m_pMain = CWnd::FindWindow(NULL, _T("New Deal Options"));
in the class's constructor.
In the main window I'm trying to send a message to all I changed was
Code:
BEGIN_MESSAGE_MAP(CSGOptionsBlackBoxDlg, CResizeDialog)
.....
.....
.....
ON_MESSAGE (WM_LOADFILE, OnBnClickedImport)
END_MESSAGE_MAP()
But, when I compile I get this error....
c:\Documents and Settings\office3\My Documents\Visual Studio Projects\SGOptionsBlackBox\SGOptionsBlackBoxDlg.cp p(124) : error C2440: 'static_cast' : cannot convert from 'void (__thiscall CSGOptionsBlackBoxDlg::* )(void)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
None of the functions with this name in scope match the target type
What exactly does this mean? How do I fix it?