Click here to Skip to main content
15,904,153 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Memory read error on Win2K, but not on XP Pin
Joe Smith IX30-Jul-07 9:08
Joe Smith IX30-Jul-07 9:08 
GeneralRe: Memory read error on Win2K, but not on XP Pin
Mark Salsbery30-Jul-07 9:58
Mark Salsbery30-Jul-07 9:58 
GeneralRe: Memory read error on Win2K, but not on XP Pin
led mike30-Jul-07 11:31
led mike30-Jul-07 11:31 
GeneralRe: Memory read error on Win2K, but not on XP Pin
Mark Salsbery30-Jul-07 14:45
Mark Salsbery30-Jul-07 14:45 
GeneralRe: Memory read error on Win2K, but not on XP [modified] Pin
Joe Smith IX30-Jul-07 16:55
Joe Smith IX30-Jul-07 16:55 
GeneralRe: Memory read error on Win2K, but not on XP Pin
Rick York30-Jul-07 9:52
mveRick York30-Jul-07 9:52 
GeneralRe: Memory read error on Win2K, but not on XP Pin
Joe Smith IX30-Jul-07 17:22
Joe Smith IX30-Jul-07 17:22 
QuestionParsing C files? Pin
julvr230-Jul-07 5:06
julvr230-Jul-07 5:06 
AnswerRe: Parsing C files? Pin
David Crow30-Jul-07 5:21
David Crow30-Jul-07 5:21 
AnswerRe: Parsing C files? Pin
Iain Clarke, Warrior Programmer30-Jul-07 5:38
Iain Clarke, Warrior Programmer30-Jul-07 5:38 
GeneralRe: Parsing C files? Pin
julvr230-Jul-07 6:00
julvr230-Jul-07 6:00 
GeneralRe: Parsing C files? Pin
Robert Surtees31-Jul-07 6:35
Robert Surtees31-Jul-07 6:35 
Questionneed help with thread functions Pin
alberthyc30-Jul-07 4:17
alberthyc30-Jul-07 4:17 
AnswerRe: need help with thread functions Pin
CPallini30-Jul-07 4:33
mveCPallini30-Jul-07 4:33 
GeneralRe: need help with thread functions Pin
alberthyc30-Jul-07 4:42
alberthyc30-Jul-07 4:42 
QuestionA bit generic... Pin
CPallini30-Jul-07 4:50
mveCPallini30-Jul-07 4:50 
GeneralRe: need help with thread functions Pin
julvr230-Jul-07 4:59
julvr230-Jul-07 4:59 
GeneralRe: need help with thread functions Pin
alberthyc30-Jul-07 6:06
alberthyc30-Jul-07 6:06 
GeneralRe: need help with thread functions Pin
led mike30-Jul-07 5:23
led mike30-Jul-07 5:23 
AnswerRe: need help with thread functions Pin
Iain Clarke, Warrior Programmer30-Jul-07 5:45
Iain Clarke, Warrior Programmer30-Jul-07 5:45 
What I do in this sort of case:

class CMyClass
{
...
   UINT MyThread ();
   static UINT __cdecl MyThread (LPVOID pParam)
   {
      CMyThead *pThis = (CMyThread *) lpParam;
      pThis->MyThread ();
   }
   ...
};


    CreateThread (blah, ...,  (LPARAM)this);


As has been said, you have to be careful about CWnds, as the the HWND -> CWnd mapping is done on a per thread basis. But if (eg) m_SliderCtrl already has been attached to a HWND, then you should be OK.

And if you're monitoring something in your thread, don't forget to Sleep (0) occasionally to be a good thread citizen on your PC!

Good luck,

Iain.
QuestionRun an exe from MFC app Pin
koumodaki30-Jul-07 4:09
koumodaki30-Jul-07 4:09 
AnswerRe: Run an exe from MFC app Pin
Iain Clarke, Warrior Programmer30-Jul-07 4:16
Iain Clarke, Warrior Programmer30-Jul-07 4:16 
AnswerRe: Run an exe from MFC app Pin
Roberto Italy30-Jul-07 21:12
Roberto Italy30-Jul-07 21:12 
AnswerRe: Run an exe from MFC app Pin
Hamid_RT31-Jul-07 21:14
Hamid_RT31-Jul-07 21:14 
Questionpost thread message() Pin
shakumar_2230-Jul-07 3:59
shakumar_2230-Jul-07 3:59 

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.