Click here to Skip to main content
15,920,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Disable/Enable newly created caption button Pin
prasad_som7-Mar-07 18:34
prasad_som7-Mar-07 18:34 
QuestionHow can I make my main window resizable in win32? Pin
amitmistry_petlad 7-Mar-07 17:37
amitmistry_petlad 7-Mar-07 17:37 
AnswerRe: How can I make my main window resizable in win32? Pin
Hamid_RT7-Mar-07 17:39
Hamid_RT7-Mar-07 17:39 
GeneralRe: How can I make my main window resizable in win32? Pin
amitmistry_petlad 7-Mar-07 17:46
amitmistry_petlad 7-Mar-07 17:46 
AnswerRe: How can I make my main window resizable in win32? Pin
Paresh Chitte7-Mar-07 18:30
Paresh Chitte7-Mar-07 18:30 
AnswerRe: How can I make my main window resizable in win32? Pin
Nibu babu thomas7-Mar-07 18:35
Nibu babu thomas7-Mar-07 18:35 
QuestionUpdateAllViews() in Multithreaded App Pin
Dalfxxx7-Mar-07 16:48
Dalfxxx7-Mar-07 16:48 
AnswerRe: UpdateAllViews() in Multithreaded App Pin
Mark Salsbery8-Mar-07 8:32
Mark Salsbery8-Mar-07 8:32 
Ack! Doc/view architecture really gets in the way here Smile | :)

Dalfxxx wrote:
Q1: Can UpdateAllViews(NULL) be called in a thread that is not the main thread?


Not safely

Dalfxxx wrote:
does anyone have a suggestion as to how I can accomplish the graphics?


You're going to have these problems using MFC because windows are associated with the thread they
are created in.

There's nothing wrong with updating windows on different threads BUT it's up to you to synchronize
access to GDI, which is NOT thread safe. This would apply even if UpdateAllViews worked.

Assuming you've made your painting thread safe, you could
1) Provide a direct method in the window classes to do redrawing
2) Use Invalidate()/UpdateWindow() combination to force the windows to be redrawn immediately via
WM_PAINT
3) Just use Invalidate() on the widows and let the UI thread post the WM_PAINT messages.
etc...


"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")

GeneralRe: UpdateAllViews() in Multithreaded App Pin
Blake Miller9-Mar-07 5:33
Blake Miller9-Mar-07 5:33 
GeneralRe: UpdateAllViews() in Multithreaded App Pin
Mark Salsbery9-Mar-07 11:25
Mark Salsbery9-Mar-07 11:25 
GeneralRe: UpdateAllViews() in Multithreaded App Pin
Dalfxxx9-Mar-07 10:28
Dalfxxx9-Mar-07 10:28 
GeneralRe: UpdateAllViews() in Multithreaded App Pin
Mark Salsbery9-Mar-07 11:29
Mark Salsbery9-Mar-07 11:29 
QuestionNamed pipe question Pin
mhp1307-Mar-07 15:34
mhp1307-Mar-07 15:34 
AnswerRe: Named pipe question Pin
Mark Salsbery7-Mar-07 16:27
Mark Salsbery7-Mar-07 16:27 
QuestionAssociate menu with dialog boxes on a tab control Pin
Trevy7-Mar-07 15:05
Trevy7-Mar-07 15:05 
AnswerRe: Associate menu with dialog boxes on a tab control Pin
Nibu babu thomas7-Mar-07 16:21
Nibu babu thomas7-Mar-07 16:21 
Questionc++ list sorting Pin
mehmetned7-Mar-07 14:36
mehmetned7-Mar-07 14:36 
AnswerRe: c++ list sorting Pin
Stephen Hewitt7-Mar-07 15:34
Stephen Hewitt7-Mar-07 15:34 
QuestionBase class to subclass conversion Pin
mehmetned7-Mar-07 13:10
mehmetned7-Mar-07 13:10 
AnswerRe: Base class to subclass conversion Pin
Stephen Hewitt7-Mar-07 15:42
Stephen Hewitt7-Mar-07 15:42 
Questionreturn a bitmap Pin
Zapacila7-Mar-07 10:51
Zapacila7-Mar-07 10:51 
AnswerRe: return a bitmap Pin
Paresh Chitte7-Mar-07 17:27
Paresh Chitte7-Mar-07 17:27 
GeneralRe: return a bitmap Pin
Zapacila7-Mar-07 18:31
Zapacila7-Mar-07 18:31 
AnswerRe: return a bitmap Pin
Paresh Chitte7-Mar-07 20:17
Paresh Chitte7-Mar-07 20:17 
GeneralRe: return a bitmap Pin
Zapacila8-Mar-07 1:56
Zapacila8-Mar-07 1:56 

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.