winforms - splitting C++/CLI code between .h and .cpp file -
Is it possible to separate the form class code between .h and .cpp files in C ++ / CLI such as we When I do this, I get a parse error in Designer View
Regards, Rohini
Yes you can.
Put the method in the header, for example Constructor and Distinctor:
Form 1 (zero); ~ Form1 (); Create
and .cpp file or just edit an existing one: include "formName.h"
(do not forget to forget names), next: < / P>
Form 1 :: Form 1 (zero) {// ...} Form 1 :: ~ Form 1 () {// ...}
< P> Load the event (click, load, etc.) for the event, define the method in the header and keep the implementation in the source file. .h:
System :: Zero Button Object ^ Sender, System :: EventArgs ^ E);
. Cpp:
Zero Button (Object ^ Sender, Event Arguments ^ E) {Message Box :: Show ("Hello, World!"); }
Comments
Post a Comment