GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 17-May-2005, 11:46
FooFighter FooFighter is offline
New Member
 
Join Date: May 2005
Posts: 1
FooFighter is on a distinguished road

assertion error


VC++ 6.0

hi everyone
I've created two dialog, primary and secondary, in the second dialog i have a combobox and want to add item to it. i've try the following and it gives me assertion error

CPP / C++ / C Code:
int Stock::DoModal() 
{
	// TODO: Add your specialized code here and/or call the base class
	m_list.Adstring("Cds");
	return CDialog::DoModal();
}

m_list is controll variable.

please help
Last edited by LuciWiz : 17-May-2005 at 12:40. Reason: Please insert your C++ code between [c++] & [/c++] tags
  #2  
Old 17-May-2005, 16:03
imbtf imbtf is offline
Junior Member
 
Join Date: Aug 2004
Posts: 41
imbtf will become famous soon enough
You can't add items to the combobox until after it's been created. The DoModal() function process of a dialog takes care of that part for you and at WM_INITDIALOG is the earliest point in time where the controls have been created and you can add items to them. virtual BOOL OnInitDialog( ); has been provided to override for your convenience.
 
 

Recent GIDBlogToyota - 2008 November Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] GUI programming with FLTK dsmith FLTK Forum 10 03-Oct-2005 16:41
What is "Ambigious symbol" ??*( a compilation error) small_ticket C++ Forum 2 07-Jan-2005 22:10
Error C2146: syntax error : missing ',' before identifier 'C4' mattchew008 C++ Forum 2 19-Dec-2004 07:06
Can enum have same name as class? crystalattice C++ Forum 3 08-Dec-2004 17:43
OpenGL always reports error mvt OpenGL Programming 2 04-Jun-2004 07:42

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 05:13.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.