Solved

PreCreateWindow overriding in CDialog

Posted on 1998-12-02
2
883 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

617 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