[comp.lang.c++] Using C++ for Windows Applications

820234d@aucs.AcadiaU.ca (GLENN DAVIDSON) (05/15/91)

I have just started to learn C++ for my summer job. The task that I have
been given is to use it to create Windows applications. Since OOP is new
to me (never having taken a course in my years at university which used it)
and the Windows functions and architecture as well, I have run into some 
problems. First the C++ manuals don't go into any detail about using C++
for this purpose. So then I went out and bought a "QUE" book to explain
it to me and alas they give a good example of using C++ for a Windows 
application but without using OOP structures.

A specific problem I have run into is declaring a Dialogue function to be
a member function of the MainWindow Class and then trying to use this as
a parameter to MakeProcInstance. It will work fine if it is declared to be
static but forget it otherwise (compiler error: cannot cast...). In 
WHELLO.C C++ example program they declare a similar function to be static
and have no problems. My problem is though that my function is modifying
and accessing non static variables that are also members of MainWindow. So
when the function is declared to be static (to remove compiler error) a 
lot of other compiler errors are generated because a static function is
trying to access non static variables.

I don't know if I've explained this very well but I'm at my wits end.
Can someone please give me some assistance? Thank You. 

Newsgroups: comp.lang.c++c
Subject: Object Oriented Features for Windows Applications
Distribution: NA 

I have just started to learn C++ for my summer job. The task that I have
been given is to use it to create Windows applications. Since OOP is new
to me (never having taken a course in my years at university which used it)
and the Windows functions and architecture as well, I have run into some 
problems. First the C++ manuals don't go into any detail about using C++
for this purpose. So then I went out and bought a "QUE" book to explain
it to me and alas they give a good example of using C++ for a Windows 
application but without using OOP structures.

A specific problem I have run into is declaring a Dialogue function to be
a member function of the MainWindow Class and then trying to use this as
a parameter to MakeProcInstance. It will work fine if it is declared to be
static but forget it otherwise (compiler error: cannot cast...). In 
WHELLO.C C++ example program they declare a similar function to be static
and have no problems. My problem is though that my function is modifying
and accessing non static variables that are also members of MainWindow. So
when the function is declared to be static (to remove compiler error) a 
lot of other compiler errors are generated because a static function is
trying to access non static variables.

I don't know if I've explained this very well but I'm at my wits end.
Can someone please give me some assistance? Thank You.