March 20th, 2009, 06:22 PM
Run-time error stops dialog when combo box added: codes  and 20
I'm not having a lot of luck declaring a combo box in the class code for my dialog resource. I'm using VC++ ver 2.0, non-MFC, Win32 with SDK calls only. I'm making additions to a large and complex legacy program.
Without the combo box declared in the code, the dialog opens fine when the program launches, but when I add the combo box, I get the following two message boxes:
"Create Dialog failure"
Engineering Note ...
Dialog Creation Error
Be sure that there is a Dialog named, "" amongst the program's resources.
Then: an "OK" box:
Exiting due to Error
 Window Create
Error code-20: Create Dialog failure
When I click on the OK, the entire program exits. I've typed the three last lines of each above, letter-for-letter from the messages displayed.
In my class in my .h file, I've declared the following:
I added the following to my constructor in my .cpp file:
m_PhNoComboBox (this, WMM_IDC_MND_PHNOS_COMBO)
right after the constructor's function identifier and parameters line and the code builds, but gives that run-time error.
Does anyone have any idea what might be causing this? Should anything else be added?
Searching, I found nothing relevant about the error codes 8002 and 20.
Here's how I'm declaring the combo box in the resource description:
WMM_MY_DIALOG DIALOG DISCARDABLE 101, 36, 296, 201
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "My Dialog"
FONT 8, "MS Sans Serif"
COMBOBOX WMM_IDC_MND_PHNOS_COMBO,137,22,137,164,CBS_DROPDOWN | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
March 20th, 2009, 06:59 PM
Re: Run-time error stops dialog when combo box added: codes  and 20
For real? You must be the only one on these forums using that 15 years old (maybe more) tool.
I'd suggest to delete the files that are generated by VC++ for your project. But I never worked on 2.0 (I'm too young for that ) so I'm not sure whether that includes .aps and .ncb.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.