Click to See Complete Forum and Search --> : Q: How to use a registered class name in a dialog-based app


Ran Dolev
April 28th, 1999, 02:47 AM
I have a dialog-based app where I register my own unique class name in the InitInstance() function. Then I want to use this registered class rather than the default class. How do I do that?
In other apps I have, that are using the doc/view architecture, I override PreCreateWindow() in the CMainFrame object and supply my registered class name to the "lpszClass" member of CREATESTRUCT and it works just fine.
In this dialog-based app, where there is no CMainFrame object, I tried to do the same thing, override PreCreateWindow() in the MainDialog object, but this function never gets called.
Thanks, Ran.

rhuiskens
January 22nd, 2006, 07:58 AM
http://support.microsoft.com/default.aspx?scid=kb%3Bde%3B251059

rob

Andreas Masur
January 22nd, 2006, 08:07 AM
http://support.microsoft.com/default.aspx?scid=kb%3Bde%3B251059

rob
The following is the English translation of the above (German) knowledge base article...

How to provide your own Window class name for an MFC dialog box (http://support.microsoft.com/?scid=kb%3Ben-us%3B251059&x=16&y=15)