![]() |
|
#1
|
|||
|
|||
MFC Assertion FailedHi, I new with MFC, I am trying to create a small application for PDA.
I have now created a ComboBox Control and when I try .AddString() I'll get Assertion Failed. Why is that? Thanks In advance Patrik |
|||
|
#2
|
|||
|
|||
|
Quote:
Hi, You have this message because your COMBO Control is not Yet created. the variable that reference it = undifined value. i think you have added this code (combo.AddString("")) in the OnCreate() handler. if your combo is on top of a dialog box, try adding the AddString() in the OnInitDilaog() just before the "return TRUE". wish this help u. Xirtam. |
|
#3
|
|||
|
|||
|
Quote:
YES, Thanks alot! I don't understand exacly how it is like this, but now it works. Best Regards Patrik |
|
#4
|
||||
|
||||
|
Quote:
Well, did you create the combo via the Graphical Interface, or did you add it manually, by code? In case you went for the second, you need to both create the control and add it to the dialog (or whatever): CPP / C++ / C Code:
This is an example from a lame program of mine. Modify the values from CRect - or better yet find a formula to position the combo relative to your dialog box - so they better suit your needs. In case this wasn't the problem, please let me know. If that is the case, please provide a short and relevant piece of code showing the way you handle the combo. Kind regards, Lucian [edit] it seems I replied too late... [/edit] __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
Recent GIDBlog
Problems with the Navy (Officers) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| assertion error | FooFighter | MS Visual C++ / MFC Forum | 1 | 17-May-2005 15:03 |
| fltk-2.0 cvs | Plumb | FLTK Forum | 20 | 13-Nov-2004 07:10 |
| Non-local heaps and assertion errors | Marius | MS Visual C++ / MFC Forum | 1 | 03-Sep-2004 05:45 |
| Assertion Error | spudtheimpaler | C Programming Language | 6 | 20-Feb-2004 09:30 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The