Yet another wonderful ListBox initialization problem 
Author Message
 Yet another wonderful ListBox initialization problem

Hey there,
    I am having another problem with ListBox initialization, this time in a
Dialog Box. All I need to know is when the Listbox is attached to a window
handle when it's created by a dialog box.

    Thank you for the help
        Mike Lively



Wed, 14 Nov 2001 03:00:00 GMT  
 Yet another wonderful ListBox initialization problem

Quote:

> Hey there,
>     I am having another problem with ListBox initialization, this time in a
> Dialog Box. All I need to know is when the Listbox is attached to a window
> handle when it's created by a dialog box.

>     Thank you for the help
>         Mike Lively


In OnInitDialog (WM_INITDIALOG), during the call to the base CDialog::OnInitDialog.  After that call you can work with it in your own OnInitDialog.


Thu, 15 Nov 2001 03:00:00 GMT  
 Yet another wonderful ListBox initialization problem

Quote:

>Hey there,
>    I am having another problem with ListBox initialization, this time in a
>Dialog Box. All I need to know is when the Listbox is attached to a window
>handle when it's created by a dialog box.

     At the same time that all your other dialog controls are attached to
their member variables; namely, during OnInitDialog, when your OnInitDialog
handler calls the base class's OnInitDialog.  So any code to initialize a
control--for example, adding the initial set of strings to a listbox--should
generally be in OnInitDialog, after the call to the base class's OnInitDialog.
--
\o\ If you're interested in books and stories with transformation themes, \o\
/o/ please have a look at <URL:http://www.halcyon.com/phaedrus>. Thanks!  /o/
\o\   FC1.21:FC(W/C)p6arw A- C->++ D>++ H+ M>+ P R T++++ W** Z+ Sm RLCT   \o\
/o/              a cmn++++$ d e++ f+++ h- i++wf p-- sm#                   /o/


Fri, 16 Nov 2001 03:00:00 GMT  
 Yet another wonderful ListBox initialization problem
Handle your initialization in OnInitDialog. That is the first time you
are guaranteed that controls actually exist.
                                        joe



Quote:
>Hey there,
>    I am having another problem with ListBox initialization, this time in a
>Dialog Box. All I need to know is when the Listbox is attached to a window
>handle when it's created by a dialog box.

>    Thank you for the help
>        Mike Lively


Joseph M. Newcomer

http://www3.pgh.net/~newcomer


Sat, 17 Nov 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Another wonderful newbie question

2. Yet another small problem

3. Yet-another-realloc problem

4. Yet Another Time Problem

5. Yet another newbie problem.

6. Yet another var-arg problem...

7. Yet another SAFEARRAY problem...

8. vc++ 5.0 debugger problems, any solutions yet?

9. easy yet frustrating variable order problem

10. Yet another problem with virtual functions

11. yamp (yet another malloc problem)

 

 
Powered by phpBB® Forum Software