Hi José,
somehow I agree, but I also somehow suspect that this approach is used in some other programming language(s) too. I was confused that WM_INITDIALOG is used in these cases, but I could simply achieve this with:
...
SetWindowLongPtr(hMainDlg, DWL_DLGPROC, @DlgProc)
SendMessage(hMainDlg, WM_INITDIALOG)
...
Of course the simplest way is to use resources of a .rc file. But Oxygenbasic is good enough to experiment a little bit with the existing possibilites of MS Windows.
Roland