Page 1 of 1

THIS problem

Posted: Mon Aug 23, 2004 12:05 pm
by Moons
Hello,

I am dealing with a program with a GUI in C++. I create a panel with different buttons in one class (#1) and define its functionality (open applications) in another class (#2) (I read them from a file and enter the application each button has to open). The problem is that I load the information in class#2 and when I click on a button, it's the 'this' of class#1 which handles the steps and thus all the information of the button is lost!!! How can I have the 'this' of the class#2 when I click on the buttons which were created in class#1???? (I gave ids to each button in #1 and used enum and event declaration in #2)

I know it is confusing..you can ask for more details!

Thx

moons :-\

Re:THIS problem

Posted: Tue Aug 24, 2004 2:22 am
by Legend
What class library (in most cases better: What is your IDE ;) )
are you using?

Re:THIS problem

Posted: Tue Aug 24, 2004 9:37 am
by Moons
I'm not sure if it very known, but I'm using wxWidgets...it's a set of librairies that allows for cross-platform development. The code is somewhat similar to MFC (event tables, enum...)

Moons