Click here to Skip to main content
15,913,773 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MIMESniffer.DLL MIME to HTML Conversion Problem ( if MIME tag starts with <DIV>,<P> or <UL> Pin
Jose Lamas Rios19-Aug-05 2:55
Jose Lamas Rios19-Aug-05 2:55 
GeneralMIMESniffer.dll MIME to HTML conversion problem Pin
chandan kumar19-Aug-05 2:06
chandan kumar19-Aug-05 2:06 
QuestionCreate a button that can be dragged and dropped?? Pin
Hachaso19-Aug-05 1:15
Hachaso19-Aug-05 1:15 
AnswerRe: Create a button that can be dragged and dropped?? Pin
toxcct19-Aug-05 1:51
toxcct19-Aug-05 1:51 
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 
Hi Guys,

I hope someone here knows more about managed c++ than i do. Smile | :)

The problem: I get a char* from a structure, and i need to convert it to a String*(or a Stringbuilder). The way i do it is hopelessly inefficient. Is there any way to improve on this.
<br />
Mail *mail = new Mail();<br />
<br />
for (int a=0;a < 1000;a++)<br />
{<br />
  //String is initialized a 1000 times over, very inefficient<br />
  mail->String = new String(struct[a].subject,0,struct[a].subjectSize); <br />
}<br />


What i'd like to do is some thing like this. But i dont know how.
<br />
Mail *mail = new Mail();<br />
mail->String = new String( ///Init new string only once.<br />
<br />
for (int a=0;a < 1000;a++)<br />
{<br />
  mail->String = //the subject of the structure.<br />
}<br />


Thanks
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 
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 

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.