Serial port question
-
Hi I have some code written for a serial port class. Now I want to access the same serial port object from a number of different dialogues etc within my program. So I guess the best way to do this is by making the object global at the start of the application? Or is there another way? Also where do I put the decleration for a global variable in an MDI app? Any suggestions much appreciated Andy
-
Hi I have some code written for a serial port class. Now I want to access the same serial port object from a number of different dialogues etc within my program. So I guess the best way to do this is by making the object global at the start of the application? Or is there another way? Also where do I put the decleration for a global variable in an MDI app? Any suggestions much appreciated Andy
-
create an own class that handles your actions with the serial port. Start the Dialog, SDI or MDI. Create a Member of Your SerialPortClass in the Maindialog. If you start an other Window add an pointer to your dialog class into the window constructor. Now you have acces to the members of the dialog
-
Hi I have some code written for a serial port class. Now I want to access the same serial port object from a number of different dialogues etc within my program. So I guess the best way to do this is by making the object global at the start of the application? Or is there another way? Also where do I put the decleration for a global variable in an MDI app? Any suggestions much appreciated Andy
Put it in the Application class, then refer to it via theApp->member _variable. Elaine :rose: The tigress is here :-D
-
Put it in the Application class, then refer to it via theApp->member _variable. Elaine :rose: The tigress is here :-D