Click here to Skip to main content
14,691,601 members
Home » Discussions » ATL / WTL / STL
   

ATL / WTL / STL

 
SuggestionRe: Issue with CHTMLEditView in CDHTMLDialog Pin
Richard MacCutchan14-Dec-14 4:04
mveRichard MacCutchan14-Dec-14 4:04 
GeneralRe: Issue with CHTMLEditView in CDHTMLDialog Pin
Member 110189678-Jan-15 0:22
MemberMember 110189678-Jan-15 0:22 
GeneralRe: Issue with CHTMLEditView in CDHTMLDialog Pin
Richard MacCutchan8-Jan-15 1:07
mveRichard MacCutchan8-Jan-15 1:07 
Questionusing friend Pin
bkelly139-Dec-14 8:29
Memberbkelly139-Dec-14 8:29 
AnswerRe: using friend Pin
Richard MacCutchan10-Dec-14 6:22
mveRichard MacCutchan10-Dec-14 6:22 
GeneralRe: using friend Pin
bkelly1311-Dec-14 11:24
Memberbkelly1311-Dec-14 11:24 
GeneralRe: using friend Pin
Richard MacCutchan12-Dec-14 0:07
mveRichard MacCutchan12-Dec-14 0:07 
GeneralRe: using friend Pin
Aescleal12-Dec-14 0:52
MemberAescleal12-Dec-14 0:52 
If all instances of C are owned by and created by an instance of M and there are no other clients of C then I can't see a lot of problem in making M a friend of C. You're essentially saying that C is a part of M you don't need all the time so you want to tear it off and discard it after some initialisation process.

Another way of doing it would be to introduce a new class, A that contains the bits of M that C needs to manipulate. M would contain an instance of A and pass a pointer to the instance to C when needed. That gives you a bit more future proofing and decoupling - both C and M don't depend on each other and just depend on A.

Yet another way would be to have a getter/setter interface on M but if C's the only thing that would want to use it then you're complicating the interface of M for no real reason.

Personally I'd go for the first and consider the second or third later if the requirements change and you need more flexibility.
GeneralRe: using friend Pin
bkelly1312-Dec-14 13:12
Memberbkelly1312-Dec-14 13:12 
GeneralRe: using friend Pin
Aescleal15-Dec-14 6:18
MemberAescleal15-Dec-14 6:18 
AnswerRe: using friend Pin
Theo Buys22-Dec-14 5:25
MemberTheo Buys22-Dec-14 5:25 
QuestionHow to create a dll as Unbreakable in C#.Net? Pin
karthickbm7-Dec-14 21:37
Memberkarthickbm7-Dec-14 21:37 
AnswerRe: How to create a dll as Unbreakable in C#.Net? Pin
Richard MacCutchan7-Dec-14 23:52
mveRichard MacCutchan7-Dec-14 23:52 
QuestionTCP/API class basic design Pin
bkelly138-Nov-14 17:31
Memberbkelly138-Nov-14 17:31 
AnswerRe: TCP/API class basic design Pin
Garth J Lancaster8-Nov-14 17:56
professionalGarth J Lancaster8-Nov-14 17:56 
GeneralRe: TCP/API class basic design Pin
bkelly139-Nov-14 3:15
Memberbkelly139-Nov-14 3:15 
AnswerRe: TCP/API class basic design Pin
Garth J Lancaster8-Nov-14 18:06
professionalGarth J Lancaster8-Nov-14 18:06 
GeneralRe: TCP/API class basic design Pin
bkelly139-Nov-14 3:19
Memberbkelly139-Nov-14 3:19 
AnswerRe: TCP/API class basic design Pin
Albert Holguin10-Nov-14 5:58
professionalAlbert Holguin10-Nov-14 5:58 
GeneralRe: TCP/API class basic design Pin
bkelly1310-Nov-14 13:40
Memberbkelly1310-Nov-14 13:40 
AnswerRe: TCP/API class basic design Pin
Albert Holguin10-Nov-14 17:47
professionalAlbert Holguin10-Nov-14 17:47 
GeneralMultiple threads explained Pin
bkelly1311-Nov-14 7:30
Memberbkelly1311-Nov-14 7:30 
GeneralRe: Multiple threads explained Pin
Albert Holguin11-Nov-14 8:01
professionalAlbert Holguin11-Nov-14 8:01 
GeneralRe: Multiple threads explained Pin
bkelly1311-Nov-14 10:58
Memberbkelly1311-Nov-14 10:58 
AnswerRe: TCP/API class basic design Pin
xenotron10-Jan-15 12:06
Memberxenotron10-Jan-15 12:06 

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.