Click here to Skip to main content
15,888,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: passing control variable in a function....?? Pin
Rajesh R Subramanian29-Mar-11 20:45
professionalRajesh R Subramanian29-Mar-11 20:45 
Question890916 - resizing a memory dc Pin
ilostmyid26-Dec-10 22:34
professionalilostmyid26-Dec-10 22:34 
AnswerRe: 890916 - resizing a memory dc PinPopular
pasztorpisti7-Dec-10 0:30
pasztorpisti7-Dec-10 0:30 
GeneralRe: 890916 - resizing a memory dc Pin
ilostmyid27-Dec-10 1:21
professionalilostmyid27-Dec-10 1:21 
QuestionTransparency Of image Pin
002comp6-Dec-10 18:31
002comp6-Dec-10 18:31 
AnswerRe: Transparency Of image Pin
Niklas L6-Dec-10 21:13
Niklas L6-Dec-10 21:13 
GeneralRe: Transparency Of image Pin
002comp7-Dec-10 0:29
002comp7-Dec-10 0:29 
QuestionAfxBeginThread - which form? Pin
charlieg6-Dec-10 6:23
charlieg6-Dec-10 6:23 
I make use of AfxBeginThread to kick off an mfc dialog that does some work for me. Form is:

AfxBeginThread(UI_proc, &threadData, Priority);

My goal is to create a UI thread that will be able to handle messages. In my testing, I clearly see messages delived to this dialog (wm_paint, etc). In migrating the code to another application, I was reading about AfxBeginThread. In the help, it shows two forms for the call:



<br />
CWinThread* AfxBeginThread( <br />
AFX_THREADPROC pfnThreadProc, <br />
LPVOID pParam, <br />
int nPriority = THREAD_PRIORITY_NORMAL, <br />
UINT nStackSize = 0, <br />
DWORD dwCreateFlags = 0, <br />
LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL );<br />




<br />
CWinThread* AfxBeginThread( <br />
CRuntimeClass* pThreadClass, <br />
int nPriority = THREAD_PRIORITY_NORMAL, <br />
UINT nStackSize = 0, <br />
DWORD dwCreateFlags = 0, <br />
LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL );<br />




The online help clearly indicates that the first version is for a worker thread while the latter is for a UI thread. My question is why does my code still receive UI events? Luck?
Charlie Gilley
<italic>You're going to tell me what I want to know, or I'm going to beat you to death in your own house.

"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759


AnswerRe: AfxBeginThread - which form? Pin
«_Superman_»6-Dec-10 6:59
professional«_Superman_»6-Dec-10 6:59 
AnswerRe: AfxBeginThread - which form? Pin
Chris Meech6-Dec-10 7:35
Chris Meech6-Dec-10 7:35 
AnswerRe: AfxBeginThread - which form? Pin
«_Superman_»6-Dec-10 7:59
professional«_Superman_»6-Dec-10 7:59 
AnswerRe: AfxBeginThread - which form? Pin
charlieg6-Dec-10 8:46
charlieg6-Dec-10 8:46 
AnswerRe: AfxBeginThread - which form? Pin
David Crow6-Dec-10 9:18
David Crow6-Dec-10 9:18 
QuestionMessage Removed Pin
5-Dec-10 19:13
Jia1005-Dec-10 19:13 
AnswerRe: CString::Replace() problem Pin
Rajesh R Subramanian5-Dec-10 20:43
professionalRajesh R Subramanian5-Dec-10 20:43 
GeneralMessage Removed Pin
5-Dec-10 20:58
Jia1005-Dec-10 20:58 
GeneralRe: CString::Replace() problem Pin
Rajesh R Subramanian5-Dec-10 21:22
professionalRajesh R Subramanian5-Dec-10 21:22 
GeneralMessage Removed Pin
5-Dec-10 21:33
Jia1005-Dec-10 21:33 
GeneralRe: CString::Replace() problem Pin
Rajesh R Subramanian5-Dec-10 23:04
professionalRajesh R Subramanian5-Dec-10 23:04 
GeneralMessage Removed Pin
5-Dec-10 23:24
Jia1005-Dec-10 23:24 
GeneralRe: CString::Replace() problem Pin
Rajesh R Subramanian6-Dec-10 0:49
professionalRajesh R Subramanian6-Dec-10 0:49 
GeneralMessage Removed Pin
6-Dec-10 3:02
Jia1006-Dec-10 3:02 
GeneralRe: CString::Replace() problem Pin
Rajesh R Subramanian6-Dec-10 3:51
professionalRajesh R Subramanian6-Dec-10 3:51 
GeneralRe: CString::Replace() problem Pin
David Crow6-Dec-10 3:41
David Crow6-Dec-10 3:41 
GeneralRe: CString::Replace() problem Pin
Luc Pattyn5-Dec-10 23:29
sitebuilderLuc Pattyn5-Dec-10 23:29 

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.