Click here to Skip to main content
15,923,389 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: AES Problem Pin
BadKarma24-Feb-08 22:19
BadKarma24-Feb-08 22:19 
GeneralRe: AES Problem Pin
bob1697225-Feb-08 2:01
bob1697225-Feb-08 2:01 
GeneralCall of OnCreate in a CTreeCtrl derived class Pin
madmax000124-Feb-08 2:54
madmax000124-Feb-08 2:54 
QuestionRe: Call of OnCreate in a CTreeCtrl derived class Pin
prasad_som24-Feb-08 3:10
prasad_som24-Feb-08 3:10 
GeneralRe: Call of OnCreate in a CTreeCtrl derived class Pin
madmax000124-Feb-08 3:24
madmax000124-Feb-08 3:24 
GeneralRe: Call of OnCreate in a CTreeCtrl derived class Pin
prasad_som24-Feb-08 3:34
prasad_som24-Feb-08 3:34 
GeneralRe: Call of OnCreate in a CTreeCtrl derived class Pin
madmax000124-Feb-08 3:51
madmax000124-Feb-08 3:51 
GeneralRe: Call of OnCreate in a CTreeCtrl derived class Pin
Mark Salsbery24-Feb-08 9:00
Mark Salsbery24-Feb-08 9:00 
This isn't going to work.

The control in a dialog resource template is created before you get a chance
to catch the WM_CREATE for the control, which ends up going to the default window
procedure for the control class.

DDX isn't going to help either, since the first DDX operation done is subclassing the control,
which is done way after the control is created.


You have two options AFAIK -

1) Create a custom window class which wraps the windows control window class.  This class needs
to be registered with Windows.  The control on the dialog resource needs to be this type/class. 
Then your window proc will get called for the control before you pass messages on to the control's
window proc.  This would be window superclassing.

2) Create the control at runtime instead of letting Windows create it from the dialog template.

Note that whatever you need to do in this WM_CREATE handler, you may be able to do in the
dialog class' OnInitDialog(), which is easier than either of the options above.

Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Call of OnCreate in a CTreeCtrl derived class Pin
madmax000124-Feb-08 9:25
madmax000124-Feb-08 9:25 
GeneralRe: Call of OnCreate in a CTreeCtrl derived class Pin
Julberto Danray24-Feb-08 14:59
Julberto Danray24-Feb-08 14:59 
GeneralRe: Call of OnCreate in a CTreeCtrl derived class Pin
Mark Salsbery24-Feb-08 20:49
Mark Salsbery24-Feb-08 20:49 
GeneralRe: Call of OnCreate in a CTreeCtrl derived class Pin
Julberto Danray25-Feb-08 4:19
Julberto Danray25-Feb-08 4:19 
GeneralRe: Call of OnCreate in a CTreeCtrl derived class Pin
Mark Salsbery25-Feb-08 5:40
Mark Salsbery25-Feb-08 5:40 
QuestionFTP Monitor Pin
Golden Lee24-Feb-08 0:10
Golden Lee24-Feb-08 0:10 
GeneralRe: FTP Monitor Pin
Ed.Poore24-Feb-08 7:21
Ed.Poore24-Feb-08 7:21 
GeneralRe: FTP Monitor Pin
Golden Lee24-Feb-08 15:31
Golden Lee24-Feb-08 15:31 
GeneralRe: FTP Monitor Pin
Ed.Poore24-Feb-08 22:46
Ed.Poore24-Feb-08 22:46 
QuestionRe: FTP Monitor Pin
David Crow24-Feb-08 13:20
David Crow24-Feb-08 13:20 
GeneralRe: FTP Monitor Pin
Golden Lee24-Feb-08 15:15
Golden Lee24-Feb-08 15:15 
GeneralRe: FTP Monitor Pin
David Crow25-Feb-08 2:16
David Crow25-Feb-08 2:16 
QuestionTo automatically call a function at the end of each line Pin
Mushtaque Nizamani23-Feb-08 21:29
Mushtaque Nizamani23-Feb-08 21:29 
GeneralRe: To automatically call a function at the end of each line Pin
Christian Graus23-Feb-08 22:12
protectorChristian Graus23-Feb-08 22:12 
GeneralIs there any API or MFC function to read my server status. Pin
Royaltvk23-Feb-08 20:21
Royaltvk23-Feb-08 20:21 
GeneralRe: Is there any API or MFC function to read my server status. Pin
Mark Salsbery24-Feb-08 9:04
Mark Salsbery24-Feb-08 9:04 
QuestionHow can I get the rgb value from an image which is format48bpprgb? Pin
joejph23-Feb-08 17:51
joejph23-Feb-08 17:51 

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.