Click here to Skip to main content
15,927,055 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalsending commands to serial port. Pin
Anonymous15-Oct-04 10:57
Anonymous15-Oct-04 10:57 
GeneralRe: sending commands to serial port. Pin
jan larsen16-Oct-04 7:45
jan larsen16-Oct-04 7:45 
GeneralRe: sending commands to serial port. Pin
phanom18-Oct-04 7:27
phanom18-Oct-04 7:27 
GeneralPlease help me!!! With edit boxes!!! Pin
Member 136014415-Oct-04 10:34
Member 136014415-Oct-04 10:34 
GeneralRe: Please help me!!! With edit boxes!!! Pin
Maximilien15-Oct-04 10:43
Maximilien15-Oct-04 10:43 
GeneralRe: Please help me!!! With edit boxes!!! Pin
15-Oct-04 16:08
suss15-Oct-04 16:08 
GeneralRe: Please help me!!! With edit boxes!!! Pin
toxcct15-Oct-04 23:56
toxcct15-Oct-04 23:56 
GeneralCentering the IDR_MAINFRAME title Pin
phanom15-Oct-04 10:02
phanom15-Oct-04 10:02 
GeneralRe: Centering the IDR_MAINFRAME title Pin
David Crow15-Oct-04 10:23
David Crow15-Oct-04 10:23 
GeneralArray of Chckboxes Pin
Grahamfff15-Oct-04 9:54
Grahamfff15-Oct-04 9:54 
GeneralRe: Array of Chckboxes Pin
David Crow15-Oct-04 10:01
David Crow15-Oct-04 10:01 
GeneralRe: Array of Chckboxes Pin
Grahamfff16-Oct-04 6:37
Grahamfff16-Oct-04 6:37 
QuestionExtract JPEG file header ? Pin
auroch5615-Oct-04 8:58
auroch5615-Oct-04 8:58 
AnswerRe: Extract JPEG file header ? Pin
David Crow15-Oct-04 9:05
David Crow15-Oct-04 9:05 
AnswerRe: Extract JPEG file header ? Pin
warl0ck715-Oct-04 9:56
warl0ck715-Oct-04 9:56 
GeneralDialog repaint with no flickering ... Pin
Andre Massada15-Oct-04 8:47
Andre Massada15-Oct-04 8:47 
GeneralRe: Dialog repaint with no flickering ... Pin
Blake Miller15-Oct-04 9:26
Blake Miller15-Oct-04 9:26 
Generalprivate instance of a public struct Pin
elephantstar15-Oct-04 8:34
elephantstar15-Oct-04 8:34 
GeneralRe: private instance of a public struct Pin
Maximilien15-Oct-04 8:51
Maximilien15-Oct-04 8:51 
GeneralRe: private instance of a public struct Pin
elephantstar15-Oct-04 10:04
elephantstar15-Oct-04 10:04 
GeneralRe: private instance of a public struct Pin
Maximilien15-Oct-04 10:22
Maximilien15-Oct-04 10:22 
GeneralRe: private instance of a public struct Pin
elephantstar15-Oct-04 10:57
elephantstar15-Oct-04 10:57 
GeneralRe: private instance of a public struct Pin
Maximilien15-Oct-04 14:53
Maximilien15-Oct-04 14:53 
GeneralRe: private instance of a public struct Pin
elephantstar19-Oct-04 6:33
elephantstar19-Oct-04 6:33 
I don’t think I have time to go back and make it all subform classes part of a big one. Yes you have the right idea in that each item corresponds to a subform. Thus a form view and a data class per subform. The checklist also has a form view class and a data class much like the subforms. Each data class has a structure to hold data as well as functions to handle the data. Such functions include passing the public data members to the private ones and vice versa (accessors and mutators). The reason why I used structs was because it was easier to transfer multiple data members at one time. Writing data to file was also easier. You just need to pass in the struct object as an argument.

Throughout the program, the data members in the checklist class gets set/reset quite often via the class object created in the main class. Each time the value changes, a call is made to the set function to set the private member to the public one.

Now when you suggested I used copy constructors in each subform, how does that make it easier to pass say 20 member variables to the constructor? Wouldn’t my overloaded constructor be very long with 20 arguments?

I don’t know if I’m confusing you but I guess my question is does my method violate the good coding practice of not having any public data members. That was what I was trying to achieve by having public structs hold variables to pass to the private one. Does that make sense to do it that way? Is there no way of avoiding having to create set/get methods for each private variable in the struct?

GeneralLinking Unicode and non-Unicode DLLs in same .EXE Pin
EurekaJim15-Oct-04 8:31
EurekaJim15-Oct-04 8:31 

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.