Click here to Skip to main content
15,909,747 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Parent Window Pin
Nishad S29-Aug-05 19:15
Nishad S29-Aug-05 19:15 
GeneralRe: Parent Window Pin
Christian Graus29-Aug-05 19:17
protectorChristian Graus29-Aug-05 19:17 
GeneralRe: Parent Window Pin
Jörgen Sigvardsson29-Aug-05 20:02
Jörgen Sigvardsson29-Aug-05 20:02 
GeneralRe: Parent Window Pin
John R. Shaw30-Aug-05 14:17
John R. Shaw30-Aug-05 14:17 
QuestionNeed Help (classes and .h files) Pin
SummoningDan29-Aug-05 18:06
SummoningDan29-Aug-05 18:06 
AnswerRe: Need Help (classes and .h files) Pin
Christian Graus29-Aug-05 18:38
protectorChristian Graus29-Aug-05 18:38 
GeneralRe: Need Help (classes and .h files) Pin
SummoningDan29-Aug-05 18:51
SummoningDan29-Aug-05 18:51 
GeneralRe: Need Help (classes and .h files) Pin
Christian Graus29-Aug-05 18:54
protectorChristian Graus29-Aug-05 18:54 
replace

struct
{

with

class
{
public:

a class and a struct are the same thing, the only difference is that a class has private as default, and a struct has public. You can add constructors and methods to a struct, like I say, there is no real difference. Of course, if you create a class in a .h and .cpp file, then as your struct has no methods, you'd put it all in the .h file, the .cpp file would be empty except the #include of the header file. If you add methods, they would be declared in the header, and their body would be in the cpp file.

I recommend getting the build in wizards to build a class and add some methods, so you can see how it all gets laid out. Basically you put the class name and a :: before the name of the method in the .cpp file, to differentiate from global methods.

Christian Graus - Microsoft MVP - C++
GeneralRe: Need Help (classes and .h files) Pin
SummoningDan29-Aug-05 20:24
SummoningDan29-Aug-05 20:24 
GeneralRe: Need Help (classes and .h files) Pin
SummoningDan30-Aug-05 1:21
SummoningDan30-Aug-05 1:21 
GeneralRe: Need Help (classes and .h files) Pin
Christian Graus30-Aug-05 12:55
protectorChristian Graus30-Aug-05 12:55 
GeneralRe: Need Help (classes and .h files) Pin
SummoningDan30-Aug-05 17:37
SummoningDan30-Aug-05 17:37 
GeneralRe: Need Help (classes and .h files) Pin
Christian Graus30-Aug-05 17:40
protectorChristian Graus30-Aug-05 17:40 
QuestionError Pin
Member 216100429-Aug-05 17:36
Member 216100429-Aug-05 17:36 
AnswerRe: Error Pin
Barm29-Aug-05 17:48
Barm29-Aug-05 17:48 
Questionselect excel cells with automation Pin
Bayu Ardianto29-Aug-05 17:17
Bayu Ardianto29-Aug-05 17:17 
Questiondial a telephone number ,and play audio file Pin
sunnf29-Aug-05 15:54
sunnf29-Aug-05 15:54 
AnswerRe: dial a telephone number ,and play audio file Pin
Christian Graus29-Aug-05 17:14
protectorChristian Graus29-Aug-05 17:14 
QuestionError C2065 Pin
Member 216100429-Aug-05 15:44
Member 216100429-Aug-05 15:44 
AnswerRe: Error C2065 Pin
Christian Graus29-Aug-05 16:03
protectorChristian Graus29-Aug-05 16:03 
GeneralRe: Error C2065 Pin
Member 216100429-Aug-05 16:33
Member 216100429-Aug-05 16:33 
GeneralRe: Error C2065 Pin
Christian Graus29-Aug-05 16:36
protectorChristian Graus29-Aug-05 16:36 
QuestionVisual C++ Pin
BlitzPackage29-Aug-05 14:59
BlitzPackage29-Aug-05 14:59 
AnswerRe: Visual C++ Pin
Christian Graus29-Aug-05 16:02
protectorChristian Graus29-Aug-05 16:02 
QuestionHow do I use the IActiveDesktop interface Pin
Carlisle Willard29-Aug-05 14:19
Carlisle Willard29-Aug-05 14:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.