Search found 68 matches

by mikecoon
Tue Aug 08, 2006 8:17 am
Forum: C++ Development
Topic: Dialog ShowModal return values
Replies: 6
Views: 2662

Clyde,
thanks for the help.
just one question: How come you are sending !event.CanVeto() to OnClose? If CanVeto() returns false, you want to send true. Why not just send the value event.CanVeto() returns?
mikecoon
by mikecoon
Tue Aug 08, 2006 1:40 am
Forum: C++ Development
Topic: Dialog ShowModal return values
Replies: 6
Views: 2662

Here is how i created it: // create dialog to allow user to find songs by range of years SCA_Range_Dialog *byYearDialog = new SCA_Range_Dialog(this, msg,msg2); Here is the submit button: // move 25 songs toward end m_btn_submit = new wxButton(this, BTN_SUBMIT, _T("SUBMIT"), wxPoint(70,190), wxSize(5...
by mikecoon
Mon Aug 07, 2006 10:29 am
Forum: C++ Development
Topic: Dialog ShowModal return values
Replies: 6
Views: 2662

Dialog ShowModal return values

dlg->ShowModal() returns two values.

Now when does ShowModal return ID_OK?
When does ShowModal return ID_CANCEL?

I have a dialog box that will crash my program when the user clicks on the "x" button. I am trying to figure out how to ctach that error before it crashes the program.

mikecoon
by mikecoon
Wed Apr 19, 2006 7:24 pm
Forum: Compiler / Linking / IDE Related
Topic: "Semaphore" does not name a type error
Replies: 6
Views: 2381

BTW, what is wrong with using global variables? I still do not see how using global variables will mess up your namespaces.

Besides, they are easier to use then using Getparent pointers when you have classes within classes etc.
by mikecoon
Wed Apr 19, 2006 7:22 pm
Forum: Compiler / Linking / IDE Related
Topic: "Semaphore" does not name a type error
Replies: 6
Views: 2381

oops, i meant i made m_tags a global variable.
by mikecoon
Wed Apr 19, 2006 1:46 pm
Forum: Compiler / Linking / IDE Related
Topic: "Semaphore" does not name a type error
Replies: 6
Views: 2381

Well, I made the Semaphore class a global variable. Notice all the other variables before the line Semaphore m_tags;. They did not require the include statement either because they are in the global_variable.h file. I only get the error on the semphore line only.
by mikecoon
Wed Apr 19, 2006 1:24 am
Forum: Compiler / Linking / IDE Related
Topic: "Semaphore" does not name a type error
Replies: 6
Views: 2381

"Semaphore" does not name a type error

Okay I added a Semaphore class to my project and when I compile, I get the following error : 'Semaphore' does not name a type' Here is my compile log: Compiler: Default compiler Building Makefile: "F:\C++Programs\SCA_V4\Makefile.win" Executing make clean rm -f GUI_classes/SCA_dialog_page.o GUI_class...
by mikecoon
Fri Feb 10, 2006 5:53 am
Forum: C++ Development
Topic: external variables versus using GetParent()
Replies: 3
Views: 749

What is so evil about globals anyways?
mikecoon
by mikecoon
Tue Feb 07, 2006 12:16 am
Forum: C++ Development
Topic: external variables versus using GetParent()
Replies: 3
Views: 749

external variables versus using GetParent()

Let's say you have two classes A and B. Now an instance of B is created in the constructor of A. That is, B is a child of A. The problem is from a function of B, I need to access a member function of A. Which is the better way to do this? Upcast B to A using the GetParent() or declare the instance o...
by mikecoon
Thu Jan 12, 2006 12:45 am
Forum: C++ Development
Topic: problem with combo box
Replies: 4
Views: 775

Well, most of them are under 10 items. So I have to clear the box and then refill them to clear the text area.
hmmmm
mikecoon
by mikecoon
Tue Jan 10, 2006 10:06 pm
Forum: C++ Development
Topic: problem with combo box
Replies: 4
Views: 775

well, it is a drop down read only combo box. I do not want the user to type anything in it. But after the user selects something and the function is executed, I want the program to remove the selection and leave the combo box text area blank.
mike coon
by mikecoon
Sat Jan 07, 2006 8:06 pm
Forum: C++ Development
Topic: problem with combo box
Replies: 4
Views: 775

problem with combo box

Okay, I have the user select a choice in the combo box. After the appropriate function is completed, I want the combo box selection to be cleared from the text area. I use SetValue(""); to try to do this. However, the only thing that happens is the selection is highlighted in blue. I placed the SetV...
by mikecoon
Wed Jan 04, 2006 8:32 am
Forum: wxDev-C++
Topic: wxDevCpp 6.8 compile error
Replies: 2
Views: 807

Well, I had to compile my project first byusing the option 'clean'. Now it works.
mikecoon
by mikecoon
Tue Jan 03, 2006 7:13 pm
Forum: wxDev-C++
Topic: wxDevCpp 6.8 compile error
Replies: 2
Views: 807

wxDevCpp 6.8 compile error

I just installed beta 6.8 and then opened up my current project. I kept got the cannot find -lwxmsw25 file so I changed the parameters from -lwxmsw25 to -lwxmsw26. Now I keep getting the following errors: Compiler: Default compiler Building Makefile: "F:\C++Programs\SCA_V4\Makefile.win" Finding depe...
by mikecoon
Tue Jan 03, 2006 5:21 am
Forum: C++ Development
Topic: Calling a parent object function
Replies: 8
Views: 1487

rrm,
You could also use global variables.
If you have "a" and b where b is a child of a, then make "a" a global variable. So now b can call and member function of "a" by a->memberfunction().