Click here to Skip to main content
15,895,667 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionThe exact size of "string" problem [modified][Solved] Pin
tyftyftyf22-Nov-09 16:19
tyftyftyf22-Nov-09 16:19 
AnswerRe: The exact size of "string" problem [modified] Pin
«_Superman_»22-Nov-09 16:25
professional«_Superman_»22-Nov-09 16:25 
GeneralRe: The exact size of "string" problem Pin
tyftyftyf22-Nov-09 16:46
tyftyftyf22-Nov-09 16:46 
GeneralRe: The exact size of "string" problem Pin
«_Superman_»22-Nov-09 16:53
professional«_Superman_»22-Nov-09 16:53 
GeneralRe: The exact size of "string" problem Pin
tyftyftyf22-Nov-09 17:36
tyftyftyf22-Nov-09 17:36 
AnswerRe: The exact size of "string" problem [modified] Pin
JohnCz22-Nov-09 18:44
JohnCz22-Nov-09 18:44 
GeneralRe: The exact size of "string" problem Pin
tyftyftyf22-Nov-09 19:27
tyftyftyf22-Nov-09 19:27 
GeneralRe: The exact size of "string" problem Pin
JohnCz23-Nov-09 6:10
JohnCz23-Nov-09 6:10 
I have edited my previous post, since code demonstrating new usage was the same (copying I guess).
I do not know if what tool you are using to write your programs. If MSVC and you are using multithreaded runtime libraries, using new is thread safe.
I do not know what function you are using to create thread. Nevertheless if you are concern about memory allocation, allocate your structure in a main thread and pass it as a parameter to a worker thread. After thread terminates, delete object.
I think using new to allocate object is much safer than using other allocation calls.
If you are serious about Windows programming I would suggest writing small Win32 application and see what window procedure does. There is nothing to be confused about windows messages, once you grasp the idea of message loop, dispatching and handling messages. Borland doe not shield you from Windows messages.
I would stay with MS tools and after familiarizing with Windows insides I would suggest using MFC. You can use other higher level languages and packages but they are using separate framework to allow application to run on Windows and make Windows insides transparent to a programmer.

JohnCz
MS C++ MVP

GeneralRe: The exact size of "string" problem Pin
tyftyftyf23-Nov-09 16:55
tyftyftyf23-Nov-09 16:55 
GeneralRe: The exact size of "string" problem Pin
JohnCz23-Nov-09 17:36
JohnCz23-Nov-09 17:36 
Questionrunning time of java pograms Pin
cool_joy222-Nov-09 16:14
cool_joy222-Nov-09 16:14 
AnswerRe: running time of java pograms Pin
Richard MacCutchan22-Nov-09 21:36
mveRichard MacCutchan22-Nov-09 21:36 
GeneralRe: running time of java pograms Pin
cool_joy225-Nov-09 22:34
cool_joy225-Nov-09 22:34 
GeneralRe: running time of java pograms Pin
Richard MacCutchan25-Nov-09 23:49
mveRichard MacCutchan25-Nov-09 23:49 
GeneralRe: running time of java pograms Pin
cool_joy228-Nov-09 1:52
cool_joy228-Nov-09 1:52 
QuestionITextServices::Release() doesn't effect.That causes memory leaking. Pin
hawkgao012922-Nov-09 15:14
hawkgao012922-Nov-09 15:14 
QuestionError during compilation that I dont understand. [Solved] Pin
stianhh22-Nov-09 0:59
stianhh22-Nov-09 0:59 
AnswerRe: Error during compilation that I dont understand. Pin
Richard MacCutchan22-Nov-09 1:11
mveRichard MacCutchan22-Nov-09 1:11 
GeneralRe: Error during compilation that I dont understand. Pin
stianhh22-Nov-09 9:37
stianhh22-Nov-09 9:37 
GeneralRe: Error during compilation that I dont understand. Pin
Richard MacCutchan22-Nov-09 11:41
mveRichard MacCutchan22-Nov-09 11:41 
AnswerRe: Error during compilation that I dont understand. Pin
Cedric Moonen22-Nov-09 3:58
Cedric Moonen22-Nov-09 3:58 
QuestionCode snippet for searching a file in directory (directory can have subdirectories in it) Pin
V K 221-Nov-09 19:16
V K 221-Nov-09 19:16 
AnswerRe: Code snippet for searching a file in directory (directory can have subdirectories in it) Pin
22491721-Nov-09 19:47
22491721-Nov-09 19:47 
AnswerRe: Code snippet for searching a file in directory (directory can have subdirectories in it) Pin
breezes2008_22-Nov-09 0:35
breezes2008_22-Nov-09 0:35 
AnswerRe: Code snippet for searching a file in directory (directory can have subdirectories in it) Pin
T210222-Nov-09 12:28
T210222-Nov-09 12:28 

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.