Click here to Skip to main content
15,893,337 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: What does (need to clear the background) mean? Pin
JoneLe8619-Jul-13 13:46
JoneLe8619-Jul-13 13:46 
GeneralRe: What does (need to clear the background) mean? Pin
David Crow19-Jul-13 13:51
David Crow19-Jul-13 13:51 
AnswerRe: What does (need to clear the background) mean? Pin
Jochen Arndt19-Jul-13 22:04
professionalJochen Arndt19-Jul-13 22:04 
GeneralRe: What does (need to clear the background) mean? Pin
JoneLe8620-Jul-13 11:14
JoneLe8620-Jul-13 11:14 
GeneralRe: What does (need to clear the background) mean? Pin
Jochen Arndt20-Jul-13 23:26
professionalJochen Arndt20-Jul-13 23:26 
GeneralRe: What does (need to clear the background) mean? Pin
JoneLe8624-Aug-13 9:34
JoneLe8624-Aug-13 9:34 
SuggestionRe: What does (need to clear the background) mean? Pin
Richard MacCutchan19-Jul-13 22:09
mveRichard MacCutchan19-Jul-13 22:09 
Suggestionerror C2039: 'DebugString' : is not a member of '_DEBUG_EVENT' Pin
ForNow19-Jul-13 4:46
ForNow19-Jul-13 4:46 
GeneralRe: error C2039: 'DebugString' : is not a member of '_DEBUG_EVENT' Pin
Richard MacCutchan19-Jul-13 5:00
mveRichard MacCutchan19-Jul-13 5:00 
GeneralRe: error C2039: 'DebugString' : is not a member of '_DEBUG_EVENT' Pin
ForNow19-Jul-13 5:32
ForNow19-Jul-13 5:32 
QuestionHow can I move CProgressCtrl in CListCtrl? Pin
YannGEF18-Jul-13 22:44
YannGEF18-Jul-13 22:44 
Questiontexture2D stretch Pin
boxfile18-Jul-13 22:29
boxfile18-Jul-13 22:29 
AnswerRe: texture2D stretch Pin
boxfile26-Jul-13 16:40
boxfile26-Jul-13 16:40 
Questionhook game for d3d10 or d3d11 Pin
boxfile18-Jul-13 16:36
boxfile18-Jul-13 16:36 
AnswerRe: hook game for d3d10 or d3d11 Pin
boxfile18-Jul-13 19:47
boxfile18-Jul-13 19:47 
QuestionCalling GUI functions from a worker thread in MFC?? Pin
Kiran Satish18-Jul-13 9:25
Kiran Satish18-Jul-13 9:25 
AnswerRe: Calling GUI functions from a worker thread in MFC?? Pin
pasztorpisti18-Jul-13 11:39
pasztorpisti18-Jul-13 11:39 
GeneralRe: Calling GUI functions from a worker thread in MFC?? Pin
«_Superman_»18-Jul-13 21:25
professional«_Superman_»18-Jul-13 21:25 
GeneralRe: Calling GUI functions from a worker thread in MFC?? Pin
pasztorpisti18-Jul-13 22:56
pasztorpisti18-Jul-13 22:56 
GeneralRe: Calling GUI functions from a worker thread in MFC?? Pin
Kiran Satish19-Jul-13 10:46
Kiran Satish19-Jul-13 10:46 
GeneralRe: Calling GUI functions from a worker thread in MFC?? Pin
pasztorpisti19-Jul-13 14:01
pasztorpisti19-Jul-13 14:01 
If you don't call MFC functions from your worker thread (its best not to call them) then its OK to go with non MFC threads so the kind of your thread doesn't matter. As I see you have already used up your pParam to send the doc pointer. You can send any number of parameters to your thread this way:
C++
struct MyThreadParamStruct
{
  CMainDoc* parent;
  CWnd* mainwnd;
};

void StartThreadTask()
{
  MyThreadParamStruct* thread_param = new MyThreadParamStruct;
  // TODO: filling thread_param
  CreateThread(..., thread_param, ...)
  ...
}

DWORD WINAPI CMainDoc::ThreadProcess(LPVOID pParam)
{
   std::unique_ptr<MyThreadParamStruct> thread_param((MyThreadParamStruct*)pParam);
   // TODO: use thread_param
   ...
}

GeneralRe: Calling GUI functions from a worker thread in MFC?? Pin
Kiran Satish19-Jul-13 16:18
Kiran Satish19-Jul-13 16:18 
GeneralRe: Calling GUI functions from a worker thread in MFC?? Pin
pasztorpisti20-Jul-13 6:07
pasztorpisti20-Jul-13 6:07 
AnswerRe: Calling GUI functions from a worker thread in MFC?? Pin
David Crow19-Jul-13 4:43
David Crow19-Jul-13 4:43 
AnswerRe: Calling GUI functions from a worker thread in MFC?? Pin
Erudite_Eric22-Jul-13 4:59
Erudite_Eric22-Jul-13 4: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.