Click here to Skip to main content
15,892,480 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSetting timeout on socket connect Pin
Rein Hillmann14-Sep-02 11:52
Rein Hillmann14-Sep-02 11:52 
GeneralRe: Setting timeout on socket connect Pin
JohnnyG14-Sep-02 15:32
JohnnyG14-Sep-02 15:32 
GeneralMicrosoft Web Browser ActiveX control Pin
Le centriste14-Sep-02 11:08
Le centriste14-Sep-02 11:08 
GeneralRe: Microsoft Web Browser ActiveX control Pin
Le centriste14-Sep-02 11:13
Le centriste14-Sep-02 11:13 
GeneralRegistering Crystal Report DLLs ! Pin
Hadi Rezaee14-Sep-02 8:56
Hadi Rezaee14-Sep-02 8:56 
GeneralRe: Registering Crystal Report DLLs ! Pin
Shog914-Sep-02 9:29
sitebuilderShog914-Sep-02 9:29 
GeneralRe: Registering Crystal Report DLLs ! Pin
Hadi Rezaee14-Sep-02 14:34
Hadi Rezaee14-Sep-02 14:34 
GeneralCListBox and GetDlgItem Error Pin
Licensed2Code14-Sep-02 8:17
sussLicensed2Code14-Sep-02 8:17 
Hi guys,Smile | :)

I'm getting an assert failure from the following code.

//This is the class which holds the CListBox

CTestDlg::DoDisplay()
{
CListBox *box = (CListBox*)GetDlgItem(IDC_LIST);
//the above line throws an ASSERT
box->InsertString(-1, "It's Good");
}

And.....

//Class which generates the data to be added to the list
CDisplay::Foo()
{
CTestDlg dlg;
dlg.DoDisplay()
}

Assertion Error exactly is:
{ ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_INSERTSTRING, nIndex, (LPARAM)lpszItem); }

And the I've already tried this with modal and modelss dlgs and nothing successful. And yes, the listbox is initialized and is visible in the program. In a nutshell, the DoDisplay() works (adds data to the listbox) inside the class of its own and doesn't when it's invoked outside of its owner class. Can you guys help me? Smile | :)
GeneralRe: CListBox and GetDlgItem Error Pin
Michael Dunn14-Sep-02 8:27
sitebuilderMichael Dunn14-Sep-02 8:27 
GeneralRe: CListBox and GetDlgItem Error Pin
Licensed2Code14-Sep-02 9:19
sussLicensed2Code14-Sep-02 9:19 
GeneralRe: CListBox and GetDlgItem Error Pin
Michael Dunn14-Sep-02 10:24
sitebuilderMichael Dunn14-Sep-02 10:24 
GeneralRe: CListBox and GetDlgItem Error Pin
Licensed2Code16-Sep-02 18:29
sussLicensed2Code16-Sep-02 18:29 
GeneralRe: CListBox and GetDlgItem Error Pin
Pavel Klocek14-Sep-02 9:35
Pavel Klocek14-Sep-02 9:35 
GeneralRe: CListBox and GetDlgItem Error Pin
Licensed2Code16-Sep-02 18:31
sussLicensed2Code16-Sep-02 18:31 
GeneralSimulating doubleclick Pin
Jack Handy14-Sep-02 7:47
Jack Handy14-Sep-02 7:47 
GeneralRe: Simulating doubleclick Pin
Anonymous14-Sep-02 8:25
Anonymous14-Sep-02 8:25 
QuestionWhat causes a "User breakpoint" to be called? Pin
Redeemer-dk14-Sep-02 7:35
Redeemer-dk14-Sep-02 7:35 
AnswerRe: What causes a "User breakpoint" to be called? Pin
Pavel Klocek14-Sep-02 7:43
Pavel Klocek14-Sep-02 7:43 
GeneralRe: What causes a "User breakpoint" to be called? Pin
Anonymous14-Sep-02 8:00
Anonymous14-Sep-02 8:00 
GeneralCutting a MPEG file Pin
Majid Shahabfar14-Sep-02 7:27
Majid Shahabfar14-Sep-02 7:27 
GeneralModifying vcspawn.exe to run processes in low priority Pin
Todd Jeffreys14-Sep-02 6:50
Todd Jeffreys14-Sep-02 6:50 
GeneralRe: Modifying vcspawn.exe to run processes in low priority Pin
Mike Nordell14-Sep-02 7:32
Mike Nordell14-Sep-02 7:32 
GeneralRe: Modifying vcspawn.exe to run processes in low priority Pin
Daniel Lohmann16-Sep-02 6:58
Daniel Lohmann16-Sep-02 6:58 
Generalconvert Pin
Shotgun14-Sep-02 6:08
Shotgun14-Sep-02 6:08 
GeneralRe: convert Pin
Pavel Klocek14-Sep-02 6:19
Pavel Klocek14-Sep-02 6:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.