Click here to Skip to main content
15,921,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Urgent!! Please Help Pin
Rajkumar R11-Mar-08 5:00
Rajkumar R11-Mar-08 5:00 
GeneralRe: Urgent!! Please Help Pin
Maximilien11-Mar-08 3:04
Maximilien11-Mar-08 3:04 
GeneralRe: Urgent!! Please Help Pin
dheka11-Mar-08 19:09
dheka11-Mar-08 19:09 
GeneralRe: Urgent!! Please Help Pin
kanduripavan11-Mar-08 16:26
kanduripavan11-Mar-08 16:26 
GeneralCWaitCursor doesnot work in thread function Pin
vicky0000010-Mar-08 22:34
vicky0000010-Mar-08 22:34 
GeneralRe: CWaitCursor doesnot work in thread function Pin
CPallini10-Mar-08 22:36
mveCPallini10-Mar-08 22:36 
GeneralRe: CWaitCursor doesnot work in thread function Pin
vicky0000010-Mar-08 23:02
vicky0000010-Mar-08 23:02 
GeneralRe: CWaitCursor doesnot work in thread function Pin
CPallini10-Mar-08 23:24
mveCPallini10-Mar-08 23:24 
Typically you do something like
#define WM_MY_CHANGE_CURSOR      (WM_APP+1)

In a header file included both by your main thread source file and by the worker thread one.
Then, when appropriate (whenever you need to change the cursor), send the message from the worker thread to the main one, for instance
PostMessage(hWnd, WM_MY_CHANGE_CURSOR, wParam, lParam);


Where hWnd is the handle of the main window and wParam, lParam meanings are freely choosen by you (e.g. wParam maybe the index of the intended new cursor).

Finally, you properly handle the message (to do the graphics stuff) in the main thread, for instance using MFC ON_MESSAGE mechanism (see [^]).

Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke


QuestionQuestion about MDI Frame and his Child Frames: Sizing and z-position [modified] Pin
ufowhere10-Mar-08 22:18
ufowhere10-Mar-08 22:18 
GeneralProblem of REFRESH Window. Pin
Le@rner10-Mar-08 21:49
Le@rner10-Mar-08 21:49 
GeneralRe: Problem of REFRESH Window. Pin
Naveen10-Mar-08 22:10
Naveen10-Mar-08 22:10 
GeneralRe: Problem of REFRESH Window. Pin
Le@rner10-Mar-08 22:56
Le@rner10-Mar-08 22:56 
GeneralRe: Problem of REFRESH Window. Pin
Naveen10-Mar-08 23:04
Naveen10-Mar-08 23:04 
GeneralRe: Problem of REFRESH Window. Pin
Le@rner10-Mar-08 23:17
Le@rner10-Mar-08 23:17 
GeneralRe: Problem of REFRESH Window. Pin
Naveen10-Mar-08 23:23
Naveen10-Mar-08 23:23 
GeneralRe: Problem of REFRESH Window. Pin
Le@rner10-Mar-08 23:52
Le@rner10-Mar-08 23:52 
GeneralRe: Problem of REFRESH Window. Pin
Naveen10-Mar-08 23:59
Naveen10-Mar-08 23:59 
GeneralRe: Problem of REFRESH Window. Pin
Le@rner11-Mar-08 0:08
Le@rner11-Mar-08 0:08 
GeneralRe: Problem of REFRESH Window. Pin
Le@rner11-Mar-08 1:42
Le@rner11-Mar-08 1:42 
GeneralRe: Problem of REFRESH Window. Pin
Rajkumar R11-Mar-08 8:32
Rajkumar R11-Mar-08 8:32 
Questionhai Pin
anithaa10-Mar-08 21:29
anithaa10-Mar-08 21:29 
GeneralRe: hai Pin
Peter Weyzen10-Mar-08 21:55
Peter Weyzen10-Mar-08 21:55 
AnswerRe: hai Pin
Rajesh R Subramanian10-Mar-08 22:00
professionalRajesh R Subramanian10-Mar-08 22:00 
GeneralRe: hai Pin
Cedric Moonen10-Mar-08 22:03
Cedric Moonen10-Mar-08 22:03 
GeneralRe: hai Pin
Rajkumar R10-Mar-08 23:41
Rajkumar R10-Mar-08 23:41 

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.