Sunday, August 15, 2010

Learning wxWidgets programming (1): String Literal

I've just started to learn wxWidgets programming.

All string literal must be changed to _T(string).
For example, in stead of
wxFrame *frame = new wxFrame((wxFrame *)NULL, -1, "Hello World",
                               wxPoint(50, 50), wxSize(450, 340));
Use:
wxFrame *frame = new wxFrame((wxFrame *)NULL, -1, _T("Hello World"),
                               wxPoint(50, 50), wxSize(450, 340));


(See also: Converting everything to and from wxString.)

No comments:

Post a Comment