Click here to Skip to main content
15,910,118 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questioninput multi language in C for window Pin
Nguyen Sy Bang2-Mar-11 17:16
Nguyen Sy Bang2-Mar-11 17:16 
AnswerRe: input multi language in C for window Pin
Andrew Brock2-Mar-11 20:31
Andrew Brock2-Mar-11 20:31 
GeneralRe: input multi language in C for window Pin
Nguyen Sy Bang3-Mar-11 4:40
Nguyen Sy Bang3-Mar-11 4:40 
Questionhow to make CtreeCtrl In CListCtrl Pin
so0_lanhlung22-Mar-11 15:48
so0_lanhlung22-Mar-11 15:48 
AnswerRe: how to make CtreeCtrl In CListCtrl Pin
Hans Dietrich2-Mar-11 16:41
mentorHans Dietrich2-Mar-11 16:41 
AnswerRe: how to make CtreeCtrl In CListCtrl Pin
Rolf Kristensen3-Mar-11 9:19
Rolf Kristensen3-Mar-11 9:19 
QuestionRestoring File Streams with BackupWrite Pin
Richard Andrew x642-Mar-11 15:16
professionalRichard Andrew x642-Mar-11 15:16 
QuestionMFC app doesn't repaint when a non-MFC dll shows a modal dialog [modified] Pin
Mikhail Edoshin2-Mar-11 9:10
Mikhail Edoshin2-Mar-11 9:10 
I write a Win32 DLL for a MFC app. The DLL needs to show a modal dialog at some point. When I move the dialog, the underlying app doesn't repaint all controls; it repaints window borders, MDI client area, a bunch of control inside MDI windows, but NOT the client area of MDI windows. Here's a screenshot[^].

Spy++ shows that WM_NCPAINT, WM_ERASEBKG, and WM_PAINT are sent and that DC of WM_PAINT is 0 (!), which seems to be similar to this topic on CodeProject[^].

I'm a beginner and I more or less follow the explanation there (a custom control subclasses wrong control ID), but don't quite understand if my case is same and if yes, how I can use the info to solve the problem.

Other info: the host app is a third-party app and I don't have the sources; I think it's MFC, because when I move the mouse over them, it says "Wizards" the classes of MDI windows are 'AFX:something'. My primary goal is not to find a bug in the host app, but to solve the redrawing issue; I know it must be possible because there are many other plug-ins that display such dialogs and they somehow solved this. The app makes a synchronous call into the plug-in; everything happens in the same thread. The Win32 DLL embeds Python and the calls are actually made from Python via 'ctypes'; the dialog code is very basic and only uses a couple of API calls, which all seem to work OK (i.e. the dialog shows up and closes), except for the redrawing.

Please help?

Update: please disregards the note about DC = 0, I've just re-read the WM_PAINT specs and saw that this and the whole question I referred to were not relevant to my case. At all.
modified on Wednesday, March 2, 2011 3:44 PM

AnswerRe: MFC app doesn't repaint when a non-MFC dll shows a modal dialog Pin
Albert Holguin2-Mar-11 12:53
professionalAlbert Holguin2-Mar-11 12:53 
GeneralRe: MFC app doesn't repaint when a non-MFC dll shows a modal dialog Pin
Mikhail Edoshin2-Mar-11 23:08
Mikhail Edoshin2-Mar-11 23:08 
GeneralRe: MFC app doesn't repaint when a non-MFC dll shows a modal dialog Pin
Albert Holguin3-Mar-11 3:48
professionalAlbert Holguin3-Mar-11 3:48 
GeneralRe: MFC app doesn't repaint when a non-MFC dll shows a modal dialog Pin
Mikhail Edoshin2-Mar-11 23:29
Mikhail Edoshin2-Mar-11 23:29 
AnswerRe: MFC app doesn't repaint when a non-MFC dll shows a modal dialog Pin
Hans Dietrich2-Mar-11 16:45
mentorHans Dietrich2-Mar-11 16:45 
GeneralRe: MFC app doesn't repaint when a non-MFC dll shows a modal dialog Pin
Mikhail Edoshin2-Mar-11 23:22
Mikhail Edoshin2-Mar-11 23:22 
QuestionOpening Disk Defragmenter from inside a WIN32 app [modified] Pin
dipuks2-Mar-11 9:04
dipuks2-Mar-11 9:04 
AnswerRe: Opening Disk Defragmenter from inside a WIN32 app Pin
David Crow2-Mar-11 9:24
David Crow2-Mar-11 9:24 
AnswerRe: Opening Disk Defragmenter from inside a WIN32 app Pin
Niklas L2-Mar-11 9:25
Niklas L2-Mar-11 9:25 
GeneralRe: Opening Disk Defragmenter from inside a WIN32 app Pin
dipuks2-Mar-11 12:35
dipuks2-Mar-11 12:35 
QuestionStretchBlt problem Pin
csrss2-Mar-11 4:14
csrss2-Mar-11 4:14 
AnswerRe: StretchBlt problem Pin
Hans Dietrich2-Mar-11 4:26
mentorHans Dietrich2-Mar-11 4:26 
GeneralRe: StretchBlt problem Pin
csrss2-Mar-11 7:02
csrss2-Mar-11 7:02 
QuestionRe: StretchBlt problem Pin
CPallini2-Mar-11 4:57
mveCPallini2-Mar-11 4:57 
GeneralRe: StretchBlt problem Pin
csrss2-Mar-11 5:14
csrss2-Mar-11 5:14 
AnswerRe: StretchBlt problem Pin
Chris Meech2-Mar-11 6:15
Chris Meech2-Mar-11 6:15 
GeneralRe: StretchBlt problem [Solved] Pin
csrss2-Mar-11 6:58
csrss2-Mar-11 6:58 

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.