James_dean
January 25th, 2007, 03:23 AM
my events are placed in my form1.h file......i want to be able to use my functions in my corresponding .cpp file but i cannot........how do i call functions in my cpp file from my form1.h header file?
|
Click to See Complete Forum and Search --> : events in header file problem James_dean January 25th, 2007, 03:23 AM my events are placed in my form1.h file......i want to be able to use my functions in my corresponding .cpp file but i cannot........how do i call functions in my cpp file from my form1.h header file? cilu January 25th, 2007, 06:30 AM Putting handlers in the header is a design decision. Microsoft wanted a unitary approach for all languages supported in VS. Since in VB and C# there is no separation between declaration and definition it was decided that in C++ the handlers should go to the header. It was impler to implement it in VS. The workaround is that you leave in the header only the declaration of the handler, and manually move the definition in the cpp file. James_dean January 25th, 2007, 08:35 AM you mean you manually copy the event code from the header file to the cpp file?.....like a button click function you would copy the handler and the event function to the c++ file?. cilu January 25th, 2007, 12:47 PM Yes, I mean separate the declaration from definition manually. James_dean January 25th, 2007, 08:08 PM i appreciate your help, thank you....... codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved. |