Simple tutorial: part 2
This tutorial makes a very simple
wxWidgets program, and shows how to insert menus and dialogs. The
aim of the project is to make a window which can be
coloured
- Double click the About menu
replica on the MenuZone; this takes the insertion point onto the
the MyFrame::OnHelpAbout method
body
- Choose Insert Dialog | wx
About and then edit the code to customise the about dialog.
Recompile and test the code out
- Double Click the Color menu
replica, and choose Insert Dialog | wx Colour Dialog.
- The simplest way to use this it
use it to control the background colour; so use the suggested code
to control this. here are some suggestions:
- Add this to the declaration of
myColour :
wxColour myColour = canvas -> GetBackgroundColour ();
- Remove the comments
around
canvas->SetBackgroundColour(myColour);
canvas->Refresh();
wxHatch
Home 