Click here to Skip to main content
12,453,873 members (56,409 online)

C / C++ / MFC

 
Generalusing unicode symbols in embedded VC++ Pin
bo11-Jun-01 17:01
memberbo11-Jun-01 17:01 
GeneralProgram crashes when I try to assign values to a CListBox in a dialog window created from my main dialog window Pin
Anonymous11-Jun-01 16:06
memberAnonymous11-Jun-01 16:06 
GeneralRe: Program crashes when I try to assign values to a CListBox in a dialog window created from my main dialog window Pin
Radif Masud11-Jun-01 18:14
memberRadif Masud11-Jun-01 18:14 
GeneralNope Pin
Anonymous11-Jun-01 23:44
memberAnonymous11-Jun-01 23:44 
GeneralRe: Program crashes when I try to assign values to a CListBox in a dialog window created from my main dialog window Pin
Ben Burnett11-Jun-01 19:27
memberBen Burnett11-Jun-01 19:27 
GeneralCrashes no matter where Pin
Anonymous11-Jun-01 23:47
memberAnonymous11-Jun-01 23:47 
GeneralRe: Crashes no matter where Pin
Michael P Butler12-Jun-01 0:08
memberMichael P Butler12-Jun-01 0:08 
GeneralRe: Crashes no matter where Pin
Anonymous12-Jun-01 0:26
memberAnonymous12-Jun-01 0:26 
GeneralRe: Program crashes when I try to assign values to a CListBox in a dialog window created from my main dialog window Pin
Ulf12-Jun-01 0:16
memberUlf12-Jun-01 0:16 
GeneralRe: Program crashes when I try to assign values to a CListBox in a dialog window created from my main dialog window Pin
Anonymous12-Jun-01 0:24
memberAnonymous12-Jun-01 0:24 
GeneralNot quite what I do. Pin
Anonymous12-Jun-01 0:34
memberAnonymous12-Jun-01 0:34 
GeneralRe: Not quite what I do. Pin
Ulf12-Jun-01 0:59
memberUlf12-Jun-01 0:59 
GeneralNope, that didn't work Pin
Anonymous12-Jun-01 11:19
memberAnonymous12-Jun-01 11:19 
GeneralRe: Nope, that didn't work Pin
Ulf12-Jun-01 23:19
memberUlf12-Jun-01 23:19 
I created a small test project and it works OK. This is what I did:

1. Create a standard Dialog-based MFC app
2. Add a new dialog resource to the project (IDD_DIALOG1)
3. Put a listbox on the new dialog
4. Open ClassWizard and coose to create a new CDialog class for new dialog resource (CDialog1).
5. With ClassWizard, add a CListBox member for the list (m_wndList)
6. Add a button to the main dialog and add an OnClick handler like this:
#include "Dialog1.h"
...
void CMainDlg::OnButton1() 
{
	CDialog1 dlg;
	dlg.DoModal();
}
7. Add a WM_INITDIALOG handler in CDialog1:
BOOL CDialog1::OnInitDialog() 
{
	CDialog::OnInitDialog();
 
	m_wndList.AddString("String to add"); // Assertion here? Call the X Files immediately:-)	

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

Try this, and if you still get an assertion at CListBox::AddString(), something is very, very strange.


--------------
"Fabricati Diem, Pvnk"
GeneralRe: Not quite what I do. Pin
Michael P Butler12-Jun-01 22:39
memberMichael P Butler12-Jun-01 22:39 
GeneralLPT Port IO In Win2k Pin
Joseph LeBlanc11-Jun-01 15:54
memberJoseph LeBlanc11-Jun-01 15:54 
GeneralChar value for line break in an Edit Box Pin
SiKLyChILd11-Jun-01 14:26
memberSiKLyChILd11-Jun-01 14:26 
GeneralRe: Char value for line break in an Edit Box Pin
Anonymous11-Jun-01 14:45
memberAnonymous11-Jun-01 14:45 
GeneralRe: Char value for line break in an Edit Box Pin
Michael Dunn11-Jun-01 16:29
memberMichael Dunn11-Jun-01 16:29 
GeneralTHANK YOU Pin
SiKLyChILd11-Jun-01 17:57
memberSiKLyChILd11-Jun-01 17:57 
GeneralRe: THANK YOU Pin
Ben Burnett11-Jun-01 19:30
memberBen Burnett11-Jun-01 19:30 
GeneralDocking Windows and MDI Pin
Jamie Nordmeyer11-Jun-01 12:17
memberJamie Nordmeyer11-Jun-01 12:17 
GeneralCreating controls in the client area Pin
Waleed11-Jun-01 10:40
memberWaleed11-Jun-01 10:40 
GeneralRe: Creating controls in the client area Pin
Igor Soukhov11-Jun-01 22:56
memberIgor Soukhov11-Jun-01 22:56 
QuestionDeleting folders with SHFileOperation? Pin
Jim A. Johnson11-Jun-01 9:50
memberJim A. Johnson11-Jun-01 9:50 
AnswerRe: Deleting folders with SHFileOperation? Pin
Jim A. Johnson12-Jun-01 5:55
memberJim A. Johnson12-Jun-01 5:55 
GeneralAdding resource(bitmap) in run-time. Pin
miri11-Jun-01 9:26
membermiri11-Jun-01 9:26 
GeneralRe: Adding resource(bitmap) in run-time. Pin
Igor Soukhov11-Jun-01 9:32
memberIgor Soukhov11-Jun-01 9:32 
GeneralAbout VC++ 7.0 ... Pin
Hadi_Rezaie11-Jun-01 7:05
memberHadi_Rezaie11-Jun-01 7:05 
GeneralRe: About VC++ 7.0 ... Pin
Setsuko11-Jun-01 7:54
memberSetsuko11-Jun-01 7:54 
GeneralCarriage return/Line feed Pin
RobJones11-Jun-01 6:34
memberRobJones11-Jun-01 6:34 
GeneralRe: Carriage return/Line feed Pin
Michael Dunn11-Jun-01 6:39
memberMichael Dunn11-Jun-01 6:39 
GeneralRe: Carriage return/Line feed Pin
Carlos Antollini11-Jun-01 6:46
memberCarlos Antollini11-Jun-01 6:46 
GeneralRe: Carriage return/Line feed Pin
RobJones11-Jun-01 7:16
memberRobJones11-Jun-01 7:16 
GeneralMDI Window List Pin
Setsuko11-Jun-01 6:14
memberSetsuko11-Jun-01 6:14 
GeneralRe: MDI Window List Pin
Tomasz Sowinski11-Jun-01 6:29
memberTomasz Sowinski11-Jun-01 6:29 
GeneralRe: MDI Window List Pin
Setsuko11-Jun-01 6:54
memberSetsuko11-Jun-01 6:54 
GeneralRe: MDI Window List Pin
Tomasz Sowinski11-Jun-01 7:00
memberTomasz Sowinski11-Jun-01 7:00 
GeneralRe: MDI Window List Pin
Setsuko11-Jun-01 7:41
memberSetsuko11-Jun-01 7:41 
GeneralRe: MDI Window List Pin
Tomasz Sowinski11-Jun-01 7:49
memberTomasz Sowinski11-Jun-01 7:49 
GeneralRe: MDI Window List Pin
Setsuko11-Jun-01 8:17
memberSetsuko11-Jun-01 8:17 
GeneralRe: MDI Window List Pin
Tomasz Sowinski11-Jun-01 8:38
memberTomasz Sowinski11-Jun-01 8:38 
GeneralRe: MDI Window List Pin
Setsuko11-Jun-01 8:45
memberSetsuko11-Jun-01 8:45 
GeneralRe: MDI Window List Pin
Tomasz Sowinski11-Jun-01 9:04
memberTomasz Sowinski11-Jun-01 9:04 
GeneralRe: MDI Window List Pin
Setsuko11-Jun-01 9:13
memberSetsuko11-Jun-01 9:13 
GeneralRe: deleteing window menu Pin
Shashikant_200622-Dec-08 1:15
memberShashikant_200622-Dec-08 1:15 
GeneralCTreeCtrl Brounding Rectangle Pin
Jeremy Davis11-Jun-01 6:04
memberJeremy Davis11-Jun-01 6:04 
GeneralRe: CTreeCtrl Brounding Rectangle Pin
Tomasz Sowinski11-Jun-01 6:20
memberTomasz Sowinski11-Jun-01 6:20 
GeneralConstructor/Destructor in MFC Extention dll's Pin
D.D. de Kerf11-Jun-01 5:47
memberD.D. de Kerf11-Jun-01 5:47 
GeneralRe: Constructor/Destructor in MFC Extention dll's Pin
Tomasz Sowinski11-Jun-01 5:55
memberTomasz Sowinski11-Jun-01 5:55 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 29 Aug 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid