Solved

OnCreate FUNCTION

Posted on 2000-05-05
4
511 Views
Last Modified: 2013-11-20
WM_CREATE calls the OnCreate func. ..before any appl. wnd is created .. How can I call it from some other function ... say a button from the dialog box ..
0
Comment
Question by:arindam042099
  • 2
4 Comments
 
LVL 2

Expert Comment

by:abdij
ID: 2782594
Hi,
 U need to more specific. But i hope this helps,

 Post the WM_CREATE message using PostMessage() or SendMessage().

Hope this helps,
Bye
abdij
0
 
LVL 12

Expert Comment

by:migel
ID: 2783620
Hi!
yor request sounds strange. Why you want call OnCreate method several times? Please avoid direct sending WM_CREATE msg to the window since it is WINDOWS system message and you can get unpredictable results.
If you you want just create new window use CMyWindow::Create(...).
If You want reset window state. just declare public function (say OnResetWindowState() ) and call it in the OnCreate handler and from any another place you want.
0
 

Author Comment

by:arindam042099
ID: 2784343
Let me be more specific here
I have to create a web browser applicationfor my SDI ... Where will I write the membervariable.Navigate() function ?? I was thinking of writing it on the OnCreate() function ...

I tried to create a window on this function ...
int CstabilityView()
{
....
membervariable.Create(....)

....
}
it was giving me a run time error ... handle exception

SORRY ABOUT NOT EXPLAINING MYSELF
0
 
LVL 12

Accepted Solution

by:
migel earned 2 total points
ID: 2796644
hm..
Use OnInitialUpdate method
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

920 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