Click here to Skip to main content
15,929,721 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralHosting webbrowser control in sdi app with straight com Pin
nlecren24-Aug-02 18:13
nlecren24-Aug-02 18:13 
GeneralRe: Hosting webbrowser control in sdi app with straight com Pin
Stephane Rodriguez.24-Aug-02 22:40
Stephane Rodriguez.24-Aug-02 22:40 
GeneralRe: Hosting webbrowser control in sdi app with straight com Pin
Anonymous11-Sep-02 4:54
Anonymous11-Sep-02 4:54 
GeneralVanishing Bitmap Pin
Shibu24-Aug-02 17:26
Shibu24-Aug-02 17:26 
GeneralRe: Vanishing Bitmap Pin
Nish Nishant24-Aug-02 17:33
sitebuilderNish Nishant24-Aug-02 17:33 
GeneralRe: Vanishing Bitmap Pin
Shibu24-Aug-02 17:38
Shibu24-Aug-02 17:38 
GeneralOnNcPaint and OnPaint Pin
alex.barylski24-Aug-02 15:23
alex.barylski24-Aug-02 15:23 
GeneralRe: OnNcPaint and OnPaint Pin
Paul M Watt24-Aug-02 21:17
mentorPaul M Watt24-Aug-02 21:17 
I would say that it is possible, but I think that you may cause other problems because of the way that Win32 handles a windows update region. A WM_NCPAINT and WM_PAINT message are only generated when an invalid portion of the window is detected. When you get a WM_PAINT message, and you call BeginPaint, the only portion of the window that you will be allowed to paint in is the invalid region.

What I would suggest that you do is create one bitmap to represent the entire window (border and client area) and use that bitmap to update the window when you get an update message and that should accomplish what you are trying to solve.

The one other optimization that you could make (but you will have to test this) is when you get a WM_NCPAINT message, and the update region is a 1. That means that the entire window needs to be refreshed. You could possibly blt the entire bitmap to teh window, then call ValidateRect(hWnd, NULL) in order to validate the entire window. This would cancel any WM_PAINT message that you may have received because you already updated the window (once again you will have to test this to make sure that there are not any side effects.)

Good Luck


Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!

GeneralRe: OnNcPaint and OnPaint Pin
alex.barylski25-Aug-02 14:02
alex.barylski25-Aug-02 14:02 
GeneralInter-object communication (CPP) Pin
alex.barylski24-Aug-02 15:18
alex.barylski24-Aug-02 15:18 
GeneralRe: Inter-object communication (CPP) Pin
Todd Smith24-Aug-02 17:17
Todd Smith24-Aug-02 17:17 
GeneralRe: Inter-object communication (CPP) Pin
alex.barylski25-Aug-02 13:54
alex.barylski25-Aug-02 13:54 
GeneralConsoleApp class problem Pin
Selevercin24-Aug-02 14:19
Selevercin24-Aug-02 14:19 
GeneralRe: ConsoleApp class problem Pin
PJ Arends24-Aug-02 14:58
professionalPJ Arends24-Aug-02 14:58 
GeneralRe: ConsoleApp class problem Pin
Selevercin24-Aug-02 15:53
Selevercin24-Aug-02 15:53 
GeneralRe: ConsoleApp class problem Pin
PJ Arends24-Aug-02 22:33
professionalPJ Arends24-Aug-02 22:33 
GeneralRe: ConsoleApp class problem Pin
Mike Nordell25-Aug-02 3:08
Mike Nordell25-Aug-02 3:08 
GeneralScreen Splitting in MFC Pin
CitationJet24-Aug-02 13:07
CitationJet24-Aug-02 13:07 
GeneralRe: Screen Splitting in MFC Pin
Jiminy24-Aug-02 18:02
Jiminy24-Aug-02 18:02 
GeneralGetFocus() Pin
Mazdak24-Aug-02 9:47
Mazdak24-Aug-02 9:47 
GeneralRe: GetFocus() Pin
NigelQ24-Aug-02 12:52
NigelQ24-Aug-02 12:52 
GeneralRe: GetFocus() Pin
Mazdak24-Aug-02 19:31
Mazdak24-Aug-02 19:31 
GeneralRe: GetFocus() Pin
Mazdak25-Aug-02 3:49
Mazdak25-Aug-02 3:49 
GeneralCEdit & Enter Pin
Anonymous24-Aug-02 9:27
Anonymous24-Aug-02 9:27 
GeneralRe: CEdit & Enter Pin
PJ Arends24-Aug-02 15:01
professionalPJ Arends24-Aug-02 15:01 

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.