Wrapping the Dialog Procedure
问题 I've been using the standard method for wrapping dialog procedures, by using a static dialog procedure in a class, and pure virtual dialog procedure that is derived later on. This works perfectly, but I have some design questions. Consider the definition of my static dialog procedure: INT_PTR __stdcall ModalDialog::router(HWND dlg, UINT msg, WPARAM wp, LPARAM lp) { ModalDialog *thisPtr = 0; if (msg == WM_INITDIALOG) { thisPtr = reinterpret_cast< ModalDialog *>(lp); ::SetWindowLongPtr(dlg,