Solved

PreCreateWindow overriding in CDialog

Posted on 1998-12-02
2
843 Views
Last Modified: 2013-11-20
Why my overrided PreCreateWindow function, in a CDialog derived class, is never called?
I need to change the lpszClass field of the CREATESTRUCT;
Thanx.
0
Comment
Question by:wau
  • 2
2 Comments
 
LVL 2

Accepted Solution

by:
wyy_cq earned 50 total points
ID: 1325666
preCreateWindow is the function which let you change the window style before it created .
but the dialog 's style is defined in resource .

in the VC Online help ,it not refer to  changing the style of dialog by preCreateWindow .



if you want to change the style of dialog ,you can call ModifyStyle or ModifyStyleEx in OnInitDialog
0
 
LVL 2

Expert Comment

by:wyy_cq
ID: 1325667
preCreateWindow is the function which let you change the window style before it created .
but the dialog 's style is defined in resource .

in the VC Online help ,it not refer to  changing the style of dialog by preCreateWindow .

if you want to change the style of dialog ,you can call ModifyStyle or ModifyStyleEx in OnInitDialog

you can't do "change the lpszClass field of the CREATESTRUCT"
if you change it ,it will not be a dialog.

i guess you want to create a new window with the looking defined in the resource.

so you can derive the class from CFormView ,CDialogBar, they can be the child window.

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
not able to insert into temp table 68 150
Window placement 17 65
noX challenge 17 76
firstChar challenge 13 85
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now