HWND * phwnd, hwnd;
phwnd = (HWND *) AppFrame::GetHandle();
hwnd = *phwnd;
MessageBox(hwnd, _("Text"), _("Title"), MB_OK);
The first parameter of MessageBox() must be a HWND value, and Get handle returns a value of void pointer value. I defined "phwnd" and "hwnd" to match these two types.
Do you have any idea how to reduce this 4-line code to a single line?
I also tried
MessageBox((HWND) *AppFrame::GetHandle(), _("Text"), _("Title"), MB_OK); // Line #118
It gives the following error message:
Quote:C:\...\AppMain.cpp|118|error: `void*' is not a pointer-to-object type|
IDE: Code::Blocks (wxSmith)
Compiler: wxWidgets