Home » Community » Newbie corner » Dialog box with some internal actions
Re: Dialog box with some internal actions [message #31629 is a reply to message #31623] |
Fri, 18 March 2011 13:19   |
|
Hi Jibe,
jibe wrote on Fri, 18 March 2011 09:52 | I think that the difficulty for me is that I don't understand well what the code
WithMydialogLayout<TopWindow>
is doing...
|
Actually the problem is not in WithXYZLayout<> template, but in the THISBACK macro... You are missing here is the CLASSNAME typedef inside the MyDlg: It is neccessary for the THISBACKs to work (have a look how it is defined ).
jibe wrote on Fri, 18 March 2011 09:52 | I suppose that we ask to construct a dialog box from the Layout, with 'TopWindow' as base class ? But what are the possible base classes for dialog boxes ?
|
Yes, you suppose right. It creates class with TopWindow as base, which has all the Ctrl you defined in the layout. In 95% of cases TopWindow is the correct base class to use, especially in case of dialogs. Alternatively, in other cases, you can use Ctrl as base class (to create Ctrl composed from other Ctrls) or some Frame derived class (when you want to create frame that contains Ctrls). Generally, you can use any class that is derived from Ctrl as a base class (both TopWindow and Frame are Ctrl-derived).
Best regards,
Honza
|
|
|
Goto Forum:
Current Time: Sun Aug 24 22:48:03 CEST 2025
Total time taken to generate the page: 0.06398 seconds
|