GUI private member in class

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
SamCoding
In need of some credit
In need of some credit
Posts: 1
Joined: Tue Jan 16, 2018 8:14 am

GUI private member in class

Post by SamCoding »

Hi all,
Im new in wxWidgets programming and have two questions. My IDE is Code::Blocks.

Im creating a new wxWidgets Project and add a wxStaticBitmap. Now i want to Change the Bitmap with
StaticBitmap1->SetBitmap(wxImage("/home/../xy.png"));

1. My first Problem is that: class GUIFrame: {privat: wxStaticBitmap* StaticBitmap1; }
so i cant SetBitmap() out of the class GUIFrame

2. My second questions is: where is the int main(void) { } function in the created project?

I would be happy if some one could help me.

Simon
Manolo
Can't get richer than this
Can't get richer than this
Posts: 828
Joined: Mon Apr 30, 2012 11:07 pm

Re: GUI private member in class

Post by Manolo »

class GUIFrame: {privat: wxStaticBitmap* StaticBitmap1; }
This makes StaticBitmap1 to be used only inside GUIFrame class.
If you want to set/change the bitmap then you need to call some public function in GUIFrame that does that job.
where is the int main(void) { } function in the created project?
It's done by the macro wxIMPLEMENT_APP() which you surely use in your app.
Post Reply