How to configure wxdevcpp to automatically set unicode Topic is solved

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
zhvickie
Experienced Solver
Experienced Solver
Posts: 56
Joined: Fri Apr 06, 2007 1:17 pm

How to configure wxdevcpp to automatically set unicode

Post by zhvickie » Wed Apr 25, 2007 5:26 am

How to configure wxdevcpp to automatically set unicode?
I want it to replace all the wxT() with _() by wxDevcpp automatically.

I have set it last year. However, I cannot remember it now.

void DockingWindowsSampleMainFrame::CreateGUIControls()
{

//Do not add custom code between
//GUI Items Creation Start and GUI Items Creation End
//wxDev-C++ designer will remove them.
//Add the custom code before or after the blocks
////GUI Items Creation Start
wxArrayString arrayStringFor_WxCbTimeOrder;
arrayStringFor_WxCbTimeOrder.Add(wxT("One order"));
arrayStringFor_WxCbTimeOrder.Add(wxT("TVD_RK2"));
arrayStringFor_WxCbTimeOrder.Add(wxT("TVD_RK3"));
arrayStringFor_WxCbTimeOrder.Add(wxT("TVD_RK4"));
....
}

I want it to automatically generate the code like this
void DockingWindowsSampleMainFrame::CreateGUIControls()
{

//Do not add custom code between
//GUI Items Creation Start and GUI Items Creation End
//wxDev-C++ designer will remove them.
//Add the custom code before or after the blocks
////GUI Items Creation Start
wxArrayString arrayStringFor_WxCbTimeOrder;
arrayStringFor_WxCbTimeOrder.Add(_("One order"));
arrayStringFor_WxCbTimeOrder.Add(_("TVD_RK2"));
arrayStringFor_WxCbTimeOrder.Add(_("TVD_RK3"));
arrayStringFor_WxCbTimeOrder.Add(_("TVD_RK4"));
....
}

Sof_T
Can't get richer than this
Can't get richer than this
Posts: 864
Joined: Thu Jul 28, 2005 9:48 pm
Location: New Forest, United Kingdom
Contact:

Post by Sof_T » Wed Apr 25, 2007 7:41 am

Right click on a design form, choose designer options, Then you want the code generation tab. The option you need is in the drop down box.

Sof.T
The home of Sof.T http://www.sof-t.site88.net/
Author of Programming with wxDevC++
http://sourceforge.net/projects/wxdevcpp-book/

zhvickie
Experienced Solver
Experienced Solver
Posts: 56
Joined: Fri Apr 06, 2007 1:17 pm

Post by zhvickie » Wed Apr 25, 2007 8:56 am

thank you.
Why wxdevcpp do not set it as default?

lowjoel
Moderator
Moderator
Posts: 1511
Joined: Sun Jun 19, 2005 11:37 am
Location: Singapore
Contact:

Post by lowjoel » Wed Apr 25, 2007 9:26 am

Because not everyone uses translations. There are more projects that just need Unicode but do not support gettext. If you are only using Unicode and not using the Translation stuff then you SHOULD be using wxT and NOT _

Joel

Post Reply