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

C / C++ / MFC

 
AnswerRe: Case Sensitive Pin
Chatura Dilan25-Jul-06 22:13
Chatura Dilan25-Jul-06 22:13 
QuestionRe: Case Sensitive Pin
David Crow27-Jul-06 2:46
David Crow27-Jul-06 2:46 
QuestionImplementing a custom Dialogbox Pin
Kamal Shankar25-Jul-06 15:59
Kamal Shankar25-Jul-06 15:59 
AnswerRe: Implementing a custom Dialogbox Pin
spacecadet1025-Jul-06 16:25
spacecadet1025-Jul-06 16:25 
QuestionNeed help with ported c++ triangulation routine [modified] Pin
spacecadet1025-Jul-06 15:02
spacecadet1025-Jul-06 15:02 
AnswerRe: Need help with ported c++ triangulation routine Pin
Steve Echols25-Jul-06 20:35
Steve Echols25-Jul-06 20:35 
GeneralRe: Need help with ported c++ triangulation routine Pin
spacecadet1029-Jul-06 16:54
spacecadet1029-Jul-06 16:54 
Questionmfc drawing philosophy question - when is the correct time to draw? Pin
charlieg25-Jul-06 14:10
charlieg25-Jul-06 14:10 
AnswerRe: mfc drawing philosophy question - when is the correct time to draw? Pin
User 58385225-Jul-06 15:09
User 58385225-Jul-06 15:09 
AnswerRe: mfc drawing philosophy question - when is the correct time to draw? Pin
Michael Dunn25-Jul-06 16:10
sitebuilderMichael Dunn25-Jul-06 16:10 
GeneralRe: mfc drawing philosophy question - when is the correct time to draw? Pin
charlieg25-Jul-06 16:45
charlieg25-Jul-06 16:45 
GeneralRe: mfc drawing philosophy question - when is the correct time to draw? Pin
Justin Tay25-Jul-06 20:43
Justin Tay25-Jul-06 20:43 
AnswerRe: mfc drawing philosophy question - when is the correct time to draw? [modified] Pin
charlieg26-Jul-06 1:13
charlieg26-Jul-06 1:13 
GeneralRe: mfc drawing philosophy question - when is the correct time to draw? Pin
Justin Tay26-Jul-06 2:22
Justin Tay26-Jul-06 2:22 
GeneralRe: mfc drawing philosophy question - when is the correct time to draw? Pin
charlieg26-Jul-06 3:39
charlieg26-Jul-06 3:39 
hfry,

hfry wrote:
I'm actually not too sure what you mean by this.


What I'm trying to understand is the initial dialog/window creation sequence and the ramifications on drawing. In a galaxy far away called Unix, they have this beast called X-Windows. A drawing 101 error was trying to draw before something called an expose event. Drawing before this results in all of the drawing going into the bit bucket. Fast forward to today - Windows has it's own little mechanism called the invalid region - if you don't invalidate things, they won't draw. Now, most of my drawing codes does not invalidate anything, it just starts blasting away, and the images show up. My theory is that when a dialog/window is created, everything is invalid, and my drawing appears... just a theory. So, that's why I'm asking how things really work - maybe there is something more subtle.

Okay, so getting to your specific comments:

1) WM_ERASEBKGND - with a couple of very unique situations, I never handle this.
My drawing code regenerates the image in a bitmap. The BitBlt then replaces
the entire region on the window. My rationale was, why bother to erase
something that I'm getting ready to paint over?

FWIW: I added a handler for this message - no effect.

2) As far as "erasing my window" - I simply call InvalidateRect with the same
CRect that I use in the drawing code. Note this this is just the test code
I'm running now. Usually, I do not do an invalidate operation, electing to
draw out of the OnTimer handler. Both *seem* to work (but I have my doubts
Smile | :) ).

Even with relocating the code to the OnPaint handler, the only time the
screen is updated correctly is when I draw directly to it. If I use the
code to fill a bitmap then blit the bitmap, I get white.


I truly appreciate your suggestions and patience. This issue has me a bitMad | :mad: WTF | :WTF:

Charlie Gilley
Will program for food...
Whoever said children were cheaper by the dozen... lied.

My son's PDA is an M249 SAW.

GeneralRe: mfc drawing philosophy question - when is the correct time to draw? Pin
charlieg26-Jul-06 4:02
charlieg26-Jul-06 4:02 
GeneralRe: mfc drawing philosophy question - when is the correct time to draw? Pin
Justin Tay26-Jul-06 4:19
Justin Tay26-Jul-06 4:19 
GeneralRe: mfc drawing philosophy question - when is the correct time to draw? Pin
charlieg26-Jul-06 4:24
charlieg26-Jul-06 4:24 
GeneralRe: mfc drawing philosophy question - when is the correct time to draw? Pin
Justin Tay26-Jul-06 4:13
Justin Tay26-Jul-06 4:13 
GeneralRe: mfc drawing philosophy question - when is the correct time to draw? Pin
charlieg26-Jul-06 4:59
charlieg26-Jul-06 4:59 
GeneralRe: mfc drawing philosophy question - when is the correct time to draw? Pin
Justin Tay26-Jul-06 5:34
Justin Tay26-Jul-06 5:34 
QuestionConvert CString to Unsigned short & Vice Versa Pin
JBAK_CP25-Jul-06 13:00
JBAK_CP25-Jul-06 13:00 
AnswerRe: Convert CString to Unsigned short &Vice Versa Pin
Justin Tay25-Jul-06 13:15
Justin Tay25-Jul-06 13:15 
QuestionBitmap associated with a static control Pin
cphawk25-Jul-06 12:09
cphawk25-Jul-06 12:09 
AnswerRe: Bitmap associated with a static control Pin
sudeesh26-Jul-06 2:40
sudeesh26-Jul-06 2:40 

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.