Click here to Skip to main content
15,924,935 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Linking Unicode and non-Unicode DLLs in same .EXE Pin
Blake Miller15-Oct-04 9:30
Blake Miller15-Oct-04 9:30 
GeneralRe: Linking Unicode and non-Unicode DLLs in same .EXE Pin
EurekaJim15-Oct-04 9:50
EurekaJim15-Oct-04 9:50 
GeneralRe: Linking Unicode and non-Unicode DLLs in same .EXE Pin
Blake Miller15-Oct-04 9:59
Blake Miller15-Oct-04 9:59 
GeneralSafer Timer Thread termination Pin
15-Oct-04 8:26
suss15-Oct-04 8:26 
GeneralRe: Safer Timer Thread termination Pin
Doug Mitchell15-Oct-04 9:05
Doug Mitchell15-Oct-04 9:05 
GeneralRe: Safer Timer Thread termination Pin
Blake Miller15-Oct-04 9:38
Blake Miller15-Oct-04 9:38 
Generalconversion operator not being called for both objects Pin
lino_i15-Oct-04 6:53
lino_i15-Oct-04 6:53 
GeneralRe: conversion operator not being called for both objects Pin
David Crow15-Oct-04 8:09
David Crow15-Oct-04 8:09 
GeneralRe: conversion operator not being called for both objects Pin
lino_i15-Oct-04 8:37
lino_i15-Oct-04 8:37 
GeneralRe: conversion operator not being called for both objects Pin
David Crow15-Oct-04 9:03
David Crow15-Oct-04 9:03 
GeneralRe: conversion operator not being called for both objects Pin
lino_i15-Oct-04 9:25
lino_i15-Oct-04 9:25 
GeneralRe: conversion operator not being called for both objects Pin
David Crow15-Oct-04 9:46
David Crow15-Oct-04 9:46 
GeneralRe: conversion operator not being called for both objects Pin
lino_i15-Oct-04 9:50
lino_i15-Oct-04 9:50 
GeneralRe: conversion operator not being called for both objects Pin
David Crow15-Oct-04 9:59
David Crow15-Oct-04 9:59 
GeneralSkinned dialogs Pin
mtzlplyk15-Oct-04 6:14
mtzlplyk15-Oct-04 6:14 
Generalanalyzing the return value Pin
lino_i15-Oct-04 5:56
lino_i15-Oct-04 5:56 

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.