Click here to Skip to main content
16,004,969 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Create a button that can be dragged and dropped?? Pin
MailtoGops19-Aug-05 3:11
MailtoGops19-Aug-05 3:11 
GeneralRe: Create a button that can be dragged and dropped?? Pin
Hachaso22-Aug-05 21:43
Hachaso22-Aug-05 21:43 
GeneralRe: Create a button that can be dragged and dropped?? Pin
MailtoGops23-Aug-05 0:29
MailtoGops23-Aug-05 0:29 
GeneralString* char* Memory issue Pin
s2111979219-Aug-05 1:05
s2111979219-Aug-05 1:05 
GeneralRe: String* char* Memory issue Pin
Bob Stanneveld19-Aug-05 1:28
Bob Stanneveld19-Aug-05 1:28 
GeneralRe: String* char* Memory issue Pin
s2111979219-Aug-05 2:21
s2111979219-Aug-05 2:21 
GeneralRe: String* char* Memory issue Pin
Maximilien19-Aug-05 2:44
Maximilien19-Aug-05 2:44 
GeneralRe: String* char* Memory issue Pin
s2111979219-Aug-05 3:13
s2111979219-Aug-05 3:13 
You're spot on. Thats exactly what i'm doing.
I defined the Mail as a managed struct and it contains a bunch of managed c++ Strings.
The Mail struct doesn't allocate the String when it's constructed. (This is exactly what it looks like)

typedef __gc struct Mail
{
String *entryid;
String *tempid;
String *storeid;
String *subject;
String *fromName;
String *fromEmail;
}

The String is "newed" with every iteration. You're right, the garbage collector should take care of this. But why put the garbage collector under strain, when it may be unnecessary.

How can i allocate the memory for the String only once? But change its value a 1000 times?
GeneralRe: String* char* Memory issue Pin
Bob Stanneveld19-Aug-05 3:25
Bob Stanneveld19-Aug-05 3:25 
GeneralControl ghosting during dialog resize Pin
rem-c19-Aug-05 0:38
rem-c19-Aug-05 0:38 
GeneralRe: Control ghosting during dialog resize Pin
Roger Allen19-Aug-05 3:44
Roger Allen19-Aug-05 3:44 
GeneralRe: Control ghosting during dialog resize Pin
Gary R. Wheeler19-Aug-05 4:02
Gary R. Wheeler19-Aug-05 4:02 
GeneralRe: Control ghosting during dialog resize Pin
rem-c19-Aug-05 4:56
rem-c19-Aug-05 4:56 
QuestionI want a file DLL write by VC++ used in VisualBasic ? Pin
Thangnc19-Aug-05 0:30
Thangnc19-Aug-05 0:30 
AnswerRe: I want a file DLL write by VC++ used in VisualBasic ? Pin
David Crow19-Aug-05 2:30
David Crow19-Aug-05 2:30 
GeneralRe: I want a file DLL write by VC++ used in VisualBasic ? Pin
Thangnc19-Aug-05 16:13
Thangnc19-Aug-05 16:13 
GeneralRe: I want a file DLL write by VC++ used in VisualBasic ? Pin
David Crow22-Aug-05 3:13
David Crow22-Aug-05 3:13 
QuestionHelp! CString convert to LPBYTE ? Pin
alias001818-Aug-05 22:28
alias001818-Aug-05 22:28 
AnswerRe: Help! CString convert to LPBYTE ? Pin
try8818-Aug-05 22:51
try8818-Aug-05 22:51 
AnswerRe: Help! CString convert to LPBYTE ? Pin
David Crow19-Aug-05 2:33
David Crow19-Aug-05 2:33 
AnswerRe: Help! CString convert to LPBYTE ? Pin
MailtoGops19-Aug-05 3:27
MailtoGops19-Aug-05 3:27 
GeneralRe: Help! CString convert to LPBYTE ? Pin
Gary R. Wheeler19-Aug-05 4:27
Gary R. Wheeler19-Aug-05 4:27 
GeneralRe: Help! CString convert to LPBYTE ? Pin
alias001819-Aug-05 19:33
alias001819-Aug-05 19:33 
Generalusing TRACE(); Pin
cpprules18-Aug-05 21:50
cpprules18-Aug-05 21:50 
GeneralRe: using TRACE(); Pin
S. Senthil Kumar18-Aug-05 23:14
S. Senthil Kumar18-Aug-05 23:14 

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.