 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Tadeusz Jordan Guest
|
Posted: Sun May 13, 2007 6:17 am Post subject: MFC question |
|
|
Hello. I am trying to learn MFC but here is the question for which I was
unable to find the answer. Given this class definition:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) {
What does it exactly do? CMainFrame derives from OnCreate class? What do
arguments of the OnCreate class do?
I would appreciate any help.
Sincerely,
Tadeusz |
|
| Back to top |
|
 |
kingfox Guest
|
Posted: Sun May 13, 2007 6:41 am Post subject: Re: MFC question |
|
|
On 5月13日, 上午9时17分, "Tadeusz Jordan" <t...@poczta.onet.pl> wrote:
| Quote: | Hello. I am trying to learn MFC but here is the question for which I was
unable to find the answer. Given this class definition:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) {
What does it exactly do? CMainFrame derives from OnCreate class? What do
arguments of the OnCreate class do?
I would appreciate any help.
Sincerely,
Tadeusz
|
You should post this topic to a MFC group: microsoft.public.vc.mfc |
|
| Back to top |
|
 |
Phlip Guest
|
Posted: Sun May 13, 2007 9:11 am Post subject: Re: MFC question |
|
|
| Quote: | int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) {
What does it exactly do? CMainFrame derives from OnCreate class?
You should post this topic to a MFC group: microsoft.public.vc.mfc
|
In this case, the original poster should back off of MFC and then learn C++
from scratch. Nothing in the MFC documentation will assume you don't know
C++. Write simple console programs first...
....or switch to a softer language, such as HTML or Visual Basic, if you just
want to create a window with some buttons on it.
--
Phlip
http://flea.sourceforge.net/PiglegToo_1.html |
|
| Back to top |
|
 |
Massimo Guest
|
Posted: Sun May 13, 2007 9:11 am Post subject: Re: MFC question |
|
|
"Tadeusz Jordan" <tedjj (AT) poczta (DOT) onet.pl> ha scritto nel messaggio
news:f25p14$gki$1 (AT) news (DOT) onet.pl...
| Quote: | Hello. I am trying to learn MFC but here is the question for which I was
unable to find the answer. Given this class definition:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) {
What does it exactly do? CMainFrame derives from OnCreate class?
What do arguments of the OnCreate class do?
|
You should *definitely* learn C++ before trying to learn MFC.
An then, you really shouldn't be learning MFC, as it's quite an obsolete
technology; there are much better ones around now.
Anyway, "int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)" means
that's the OnCreate() method of the CMainFrame class, and it takes a
LPCREATESTRUCT as its first and only argument, returning an int upon
completion.
Massimo |
|
| Back to top |
|
 |
Massimo Guest
|
Posted: Sun May 13, 2007 9:11 am Post subject: Re: MFC question |
|
|
"Massimo" <barone (AT) mclink (DOT) it> ha scritto nel messaggio
news:f266j0$2o6c$1 (AT) newsreader1 (DOT) mclink.it...
| Quote: | Anyway, "int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)"
means that's the OnCreate() method of the CMainFrame class, and it takes
a LPCREATESTRUCT as its first and only argument, returning an int upon
completion.
|
Addendum: based on the Hungarian notation which is often used in Windows
programming, I can guess LPCREATESTRUCT is a Long Pointer (LP) to a
CreateStruct data type; so it's probably a pointer to a library-defined data
structure you must supply in order for the method to use it.
That "OnCreate()" is definitely *not* a class definition: it's the
implementation of a method declared in the class CMainFrame, which, I'm
again guessing, is a user-defined frame class, derived from some kind of
super-frame-class declared in the MFC library.
Massimo |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|