Solved

OnCreate FUNCTION

Posted on 2000-05-05
4
510 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
hm..
Use OnInitialUpdate method
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 85
substring method in java 1 79
sum13 challenge 24 77
lucky13 challenge 11 111
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

763 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

9 Experts available now in Live!

Get 1:1 Help Now