I don't know how up to date your api version is but here's an overview of how it now works:
H3Dlg now has its own virtual table where you simply override virtual functions to achieve what you need.
e.g.
- Код: Выделить всё
struct MyDlg : H3Dlg
{
MyDlg(int w, int h) : H3Dlg(w, h) {} // _H3API_ H3Dlg(int width, int height, int x = -1, int y = -1, BOOL statusBar = false, BOOL makeBackground = true, INT32 colorIndex = IntAt(0x69CCF4));
int m_myValue;
virtual BOOL OnCreate() override
{
m_myValue = 1234;
return true; // continue running dialog, false to abort
}
virtual BOOL OnLeftClick(INT itemId, H3Msg& msg) override
{
if (itemId != m_myValue)
{ ...
return false; // do not process further messages, skips DefaultProc()
}
return true; // goes to DefaultProc()
}
};
However if you wish to have complete control, you can override vDialogProc which is what provides all these handy overrideable functions in order to implement your own.