Click here to Skip to main content
15,899,126 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Any Experts Like to Challange This Questions??? Pin
percyvimal10-Nov-03 17:29
percyvimal10-Nov-03 17:29 
GeneralRe: Any Experts Like to Challange This Questions??? Pin
Antti Keskinen11-Nov-03 10:50
Antti Keskinen11-Nov-03 10:50 
GeneralIsWindow(m_hwnd) returns 0. Pin
suninwater10-Nov-03 16:48
suninwater10-Nov-03 16:48 
GeneralRe: IsWindow(m_hwnd) returns 0. Pin
Dave Bryant10-Nov-03 17:14
Dave Bryant10-Nov-03 17:14 
GeneralRe: IsWindow(m_hwnd) returns 0. Pin
suninwater10-Nov-03 19:24
suninwater10-Nov-03 19:24 
GeneralRe: IsWindow(m_hwnd) returns 0. Pin
Dave Bryant11-Nov-03 8:26
Dave Bryant11-Nov-03 8:26 
GeneralRe: IsWindow(m_hwnd) returns 0. Pin
MultiThread10-Nov-03 17:27
MultiThread10-Nov-03 17:27 
GeneralRe: IsWindow(m_hwnd) returns 0. Pin
Swinefeaster10-Nov-03 18:19
Swinefeaster10-Nov-03 18:19 
MFC does not support access of CWnd's from threads other than the ui thread, which I think is what you are doing.

There are two approaches you can take:

1. Pass the HWND only to the other thread, and have it use the Windows api directly.

2. Use ::PostMessage() from the other thread on that window handle and trap the message in you main ui thread, and process it there. (I would strongly recommend this approach, as you really shouldn't be accessing windows from threads other than the main ui thread (except to post window messages)).

Cheers,

Swine



[b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.
GeneralCDialogBar Background color Pin
asierra10-Nov-03 16:21
asierra10-Nov-03 16:21 
GeneralDesign opinions/help needed Pin
Steve Messer10-Nov-03 16:06
Steve Messer10-Nov-03 16:06 
GeneralRe: Design opinions/help needed Pin
Antti Keskinen11-Nov-03 11:21
Antti Keskinen11-Nov-03 11:21 
GeneralRe: Design opinions/help needed Pin
Steve Messer11-Nov-03 18:05
Steve Messer11-Nov-03 18:05 
GeneralRe: Design opinions/help needed Pin
Antti Keskinen12-Nov-03 8:25
Antti Keskinen12-Nov-03 8:25 
GeneralRe: Design opinions/help needed Pin
Steve Messer12-Nov-03 12:07
Steve Messer12-Nov-03 12:07 
GeneralRe: Design opinions/help needed Pin
Antti Keskinen13-Nov-03 0:44
Antti Keskinen13-Nov-03 0:44 
GeneralRe: Design opinions/help needed Pin
Steve Messer13-Nov-03 1:35
Steve Messer13-Nov-03 1:35 
GeneralRe: Design opinions/help needed Pin
Antti Keskinen13-Nov-03 5:17
Antti Keskinen13-Nov-03 5:17 
GeneralRe: Design opinions/help needed Pin
Steve Messer13-Nov-03 7:18
Steve Messer13-Nov-03 7:18 
GeneralOnGridEndEdit and MessageBox Pin
adonisv10-Nov-03 12:48
adonisv10-Nov-03 12:48 
GeneralFILETIME compilation error Pin
rmnowick10-Nov-03 12:31
rmnowick10-Nov-03 12:31 
GeneralRe: FILETIME compilation error Pin
Dave Bryant10-Nov-03 14:04
Dave Bryant10-Nov-03 14:04 
QuestionHow to change a toolbar bitmap image? Pin
ElizabethC10-Nov-03 11:08
ElizabethC10-Nov-03 11:08 
AnswerRe: How to change a toolbar bitmap image? Pin
Roger Allen11-Nov-03 0:40
Roger Allen11-Nov-03 0:40 
GeneralRe: How to change a toolbar bitmap image? Pin
ElizabethC12-Nov-03 6:47
ElizabethC12-Nov-03 6:47 
GeneralRe: How to change a toolbar bitmap image? Pin
Roger Allen12-Nov-03 6:49
Roger Allen12-Nov-03 6:49 

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.