
Problems with List box in dynamically created dialog box
In my MFC-app I create a dialog box template in memory,
and use InitModalIndirect to initialize the dialog box.
This works fine for all controls except the List box. Even
though everything indicates that the list box is accepting
my strings, they don't show up in the list when I add them using
AddString.
The returned index is correct, and when I test the GetCount
function of the list box it returns the correct number. THE
STRINGS JUST DOESN'T SHOW UP IN THE LIST.
I must admit I'm very puzzled. I thought it might have to do
with how I add the list box to my template. I use the combination
of 0xFFFF and 0x0083 to indicate the list box class, and the
following style:
WS_CHILD | WS_BORDER | WS_GROUP | WS_TABSTOP | WS_VISIBLE |
LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_NOTIFY | DS_3DLOOK
I can not find any peculiarities here, so I am wondering whether
MFC is doing some strange initialisation of the list boxes that
I am unaware of.
I'd be thankful for any response
P?l K. T?nder