Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1792
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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:
typedef MyDlg CLASSNAME;
It is neccessary for the THISBACKs to work (have a look how it is defined Wink ).

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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Dialog boxes : why struc instead of class ?
Next Topic: Install Error
Goto Forum:
  


Current Time: Sun Aug 24 22:48:03 CEST 2025

Total time taken to generate the page: 0.06398 seconds