Click here to Skip to main content
16,016,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual C++/MFC Thread Question Pin
Eytukan11-Aug-05 4:21
Eytukan11-Aug-05 4:21 
GeneralRe: Visual C++/MFC Thread Question Pin
ThatsAlok11-Aug-05 4:48
ThatsAlok11-Aug-05 4:48 
GeneralRe: Visual C++/MFC Thread Question Pin
Ravi Bhavnani11-Aug-05 11:08
professionalRavi Bhavnani11-Aug-05 11:08 
GeneralRe: Visual C++/MFC Thread Question Pin
suzie10011-Aug-05 13:50
suzie10011-Aug-05 13:50 
QuestionWhy doesn't CDC::StretchBlt() work properly, if both DCs are MemoryDCs ? Pin
Achim Klein11-Aug-05 2:27
Achim Klein11-Aug-05 2:27 
AnswerRe: Why doesn Pin
Chris Losinger11-Aug-05 3:15
professionalChris Losinger11-Aug-05 3:15 
GeneralRe: Why doesn Pin
Achim Klein11-Aug-05 3:30
Achim Klein11-Aug-05 3:30 
GeneralThread Problem Pin
Priyank Bolia11-Aug-05 2:11
Priyank Bolia11-Aug-05 2:11 
1.)I have a data source that is continously modified, i.e items added, deleted, changed. I used a static global mutex object to actually allow only one thread to modify it. Now I have a list ctrl that shows that data, the refreshing is done in a different thread. Now in that thread:
DeleteAllItems();
for(unsigned int i=0; i<m_aryCall.Count(); i++)
{
    ..................................................
}

No what if I have a list of 10 elements and I deleted some of them when this thread is running. As the compiler will store the value of m_aryCall.Count() in some temporary variable and when its asks for 10th element, which is not there.


2.)In Modify Data Block a create a thread by new and run it, now the threads are running and the ModifyData is called many times when the previous threads is running. This actually creates memory leak as the thread is not deleting itself.

http://www.priyank.in/
GeneralRe: Thread Problem Pin
SunKnight011-Aug-05 3:21
SunKnight011-Aug-05 3:21 
GeneralRe: Thread Problem Pin
HumanOsc11-Aug-05 5:39
HumanOsc11-Aug-05 5:39 
Questionstatic methods? Pin
Anonymous11-Aug-05 2:08
Anonymous11-Aug-05 2:08 
AnswerRe: static methods? Pin
Achim Klein11-Aug-05 2:14
Achim Klein11-Aug-05 2:14 
GeneralRe: static methods? Pin
Anonymous11-Aug-05 2:20
Anonymous11-Aug-05 2:20 
GeneralRe: static methods? Pin
Cedric Moonen11-Aug-05 2:32
Cedric Moonen11-Aug-05 2:32 
GeneralRe: static methods? Pin
Achim Klein11-Aug-05 2:33
Achim Klein11-Aug-05 2:33 
AnswerRe: static methods? Pin
toxcct11-Aug-05 3:30
toxcct11-Aug-05 3:30 
GeneralRe: static methods? Pin
Anonymous11-Aug-05 4:24
Anonymous11-Aug-05 4:24 
GeneralRe: static methods? Pin
sunit511-Aug-05 5:34
sunit511-Aug-05 5:34 
AnswerRe: static methods? Pin
sunit511-Aug-05 5:39
sunit511-Aug-05 5:39 
QuestionEnum &quot;real&quot; users Pin
peterchen11-Aug-05 1:37
peterchen11-Aug-05 1:37 
Question(Printer Driver)How to Hide Default Document Property sheet ? Pin
Anonymous11-Aug-05 0:51
Anonymous11-Aug-05 0:51 
QuestionHow can i get the length of a line in a multiline edit box? Pin
tl0825411-Aug-05 0:15
tl0825411-Aug-05 0:15 
AnswerRe: How can i get the length of a line in a multiline edit box? Pin
Achim Klein11-Aug-05 1:38
Achim Klein11-Aug-05 1:38 
GeneralWindows Device Manager Pin
nripun11-Aug-05 0:13
nripun11-Aug-05 0:13 
GeneralRe: Windows Device Manager Pin
Alexander M.,11-Aug-05 1:06
Alexander M.,11-Aug-05 1: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.