Solved

PreCreateWindow overriding in CDialog

Posted on 1998-12-02
2
856 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 Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 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