S
Ohne statische Dialogprozedur geht es nicht. Es ist aber nicht nötig, die anderen Klassenfunktionen auch statisch zu machen. Eine Lösung hatte ich Dir im vorigen Beitrag schon beschrieben.
Mal ungeprüft:
void GUIControl::init(HINSTANCE hInst)
{
InitCommonControls();
// Display the main dialog box.
DialogBoxParam( hInst, MAKEINTRESOURCE(IDD_MOUSE), NULL, &GUIControl::dlgProc, (LPARAM) this);
}
INT_PTR CALLBACK GUIControl::dlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
{
GUIControl* pThis = (GUIControl*) GetWindowLongPtr(hDlg, GWLP_USERDATA);
switch (msg)
{
case WM_INITDIALOG:
SetWindowLongPtrW(hDlg, GWLP_USERDATA, lParam);
break;
case WM_IRGENDWAS:
pThis->MachIrgendwas();
break;
}
return DefDlgProc(hDlg, msg, wParam, lParam);
}