>-- On Wed, 3 Oct 2007 15:00:58 -0500 John Dubchak wrote --
> Dave,
>
> I believe the question Andreas was asking is how to externalize
> that property so that you can control it from a makefile or some
> other build event, if you will...
>
> Not sure if that helps or not.
>
> John
>
> On 10/3/07, ddotedotsdot < dsilvia%40mchsi.com">dsilvia
mchsi.com> wrote:>
>
>> --- In anthemion-devtools%40yahoogroups.com">anthemion-devtools
yahoogroups.com, Andreas Goebel <a-
>> goebel
...> wrote:
>>
>>>
>>> Hi,
>>>
>>> is there a nice wx- or DB way to automatically insert a version-
>>>
>> number
>>> into the "about"-dialogue? Like itīs done in DialogBlocks, for
>>>
>> instance?
>>
>>> Regards,
>>>
>>> Andreas
>>>
>>
>> Hi!
>>
>> I'm not just exactly sure of what you're meaning. The wxAboutBox
>> dialog uses a wxAboutDialogInfo class that has a version function:
>>
>> ::wxAboutBox
>> void wxAboutBox(const wxAboutDialogInfo& info)
>>
>> This function shows the standard about dialog containing the
>> information specified in info. If the current platform has a
>> native about dialog which is capable of showing all the fields in
>> info, the native dialog is used, otherwise the function falls
>> back to the generic wxWidgets version of the dialog, i.e. does
>> the same thing as wxGenericAboutBox().
>>
>> Here is an example of how this function may be used:
>>
>> void MyFrame::ShowSimpleAboutDialog(wxCommandEvent&
>> WXUNUSED(event)) { wxAboutDialogInfo info; info.SetName(_("My
>> Program")); info.SetVersion(_("1.2.3 Beta"));
>> info.SetDescription(_("This program does something great."));
>> info.SetCopyright(_T("(C) 2007 Me < my%40email.addre.ss">my
email.addre.ss>"));
>>
>> wxAboutBox(info);
>> }
>>
>> Please see the dialogs sample for more examples of using this
>> function and wxAboutDialogInfo for the description of the
>> information which can be shown in the about dialog. Include files
>>
>> <wx/aboutdlg.h>
>>
>> Is this not what you're talking about?
>>
>> HTH:
>>
>> thx,
>> Dave S.
>>
Then the question here is to define a macro for the version (with a failsafe
default), that gets overriden by any specification in the build command. E.G.,
#define MyAppVersion 0.0.0
#ifdef CommandLineVersion
#undef MyAppVersion
#define MyAppVersion CommandLineVersion
#endif
Although, undoubtedly, not the only solution, it is a model that will work.
thx,
Dave S.
Contrary to popular belief, practice does not make perfect... only permanent!
wxMS_developers · Development with wxWidgets on MSWindows
http://tech.groups.yahoo.com/group/wxMS_developers/
wxWidgets Code Exchange
http://www.wxCodex.net/
.