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

C / C++ / MFC

 
GeneralRe: Timed Updation Pin
jmkhael11-Feb-04 0:42
jmkhael11-Feb-04 0:42 
QuestionCan do that??? Pin
don7cry10-Feb-04 21:04
don7cry10-Feb-04 21:04 
AnswerRe: Can do that??? Pin
Antti Keskinen10-Feb-04 22:02
Antti Keskinen10-Feb-04 22:02 
GeneralInsert ActiveX wizard trouble Pin
El'Cachubrey10-Feb-04 20:58
El'Cachubrey10-Feb-04 20:58 
GeneralAutomating Outlook Pin
ctbmei10-Feb-04 20:13
ctbmei10-Feb-04 20:13 
GeneralRe: Automating Outlook Pin
jmkhael11-Feb-04 0:37
jmkhael11-Feb-04 0:37 
GeneralDynamic display of MSChart Pin
vidyaby10-Feb-04 19:55
vidyaby10-Feb-04 19:55 
GeneralMemory usage for SetWindowText Pin
Coremn10-Feb-04 19:38
Coremn10-Feb-04 19:38 
I have a simple program used for a video overlay where I use a CStatic object to display the time.

I was looking at the memory usage for the program and discovered that it was increasing by 4k every 3-4 secondsFrown | :( I found that the following code was the culprit, to be more specific, the SetWindowText line. (The code is called every second)
<br />
CTime t1 = CTime::GetCurrentTime();<br />
   std::string time_str = (LPCTSTR)t1.Format("%H:%M:%S %d/%m/%y");<br />
   m_timeStatic.SetWindowText(time_str.c_str());  //memory increase <br />

I swapped over to use a CString object instead but the same problem was encountered.
 <br />
m_timeString = time_str.c_str();<br />
UpdateData(FALSE);<br />

Please Help me!!!! Can anyone explain this!!!Confused | :confused: Confused | :confused:

---
GeneralArray of Objects of a class Pin
Member 38437310-Feb-04 18:16
Member 38437310-Feb-04 18:16 
GeneralRe: Array of Objects of a class Pin
Maxwell Chen10-Feb-04 19:39
Maxwell Chen10-Feb-04 19:39 
GeneralRe: Array of Objects of a class Pin
Member 38437310-Feb-04 21:54
Member 38437310-Feb-04 21:54 
GeneralRe: Array of Objects of a class Pin
Antti Keskinen10-Feb-04 23:37
Antti Keskinen10-Feb-04 23:37 
GeneralRe: Array of Objects of a class Pin
Member 38437311-Feb-04 20:10
Member 38437311-Feb-04 20:10 
GeneralObject ID's dont appear in Class Wizard Pin
SJS_OZ10-Feb-04 18:09
SJS_OZ10-Feb-04 18:09 
Generalweb browser customization Pin
Abhi Lahare10-Feb-04 18:05
Abhi Lahare10-Feb-04 18:05 
GeneralRunning VBscript Pin
pranavamhari10-Feb-04 17:21
pranavamhari10-Feb-04 17:21 
GeneralRe: Running VBscript Pin
Ryan Binns10-Feb-04 17:56
Ryan Binns10-Feb-04 17:56 
GeneralVERSIONINFO in program Pin
shultas10-Feb-04 16:09
shultas10-Feb-04 16:09 
GeneralRe: VERSIONINFO in program Pin
pranavamhari10-Feb-04 17:26
pranavamhari10-Feb-04 17:26 
Generalmax controls on a dialog using vc++ Pin
burnafatty10-Feb-04 14:17
burnafatty10-Feb-04 14:17 
GeneralRe: max controls on a dialog using vc++ Pin
John R. Shaw10-Feb-04 14:48
John R. Shaw10-Feb-04 14:48 
GeneralRe: max controls on a dialog using vc++ Pin
Christian Graus10-Feb-04 15:49
protectorChristian Graus10-Feb-04 15:49 
GeneralRe: max controls on a dialog using vc++ Pin
Tim Smith10-Feb-04 18:18
Tim Smith10-Feb-04 18:18 
GeneralRe: max controls on a dialog using vc++ Pin
burnafatty11-Feb-04 7:35
burnafatty11-Feb-04 7:35 
GeneralRe: max controls on a dialog using vc++ Pin
Christian Graus11-Feb-04 9:46
protectorChristian Graus11-Feb-04 9:46 

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.