OnDraw again

  • Thread starter Thread starter rufus
  • Start date Start date
R

rufus

This is wierd. I have a single doc app. I create some buttons in the view
OnDraw method.

When I size my app window - the buttons disappear. But as soon as I click on
any spot inside the window or the window frame they appear.

What is going on here. I have tried everything. I have used WM_SIZE,
WM_SYSCOMMAND, WM_MOVE, pretty much anything - and the same thing happens.


Help!

Bill
 
You need to issue OnPaint() command after you resize the
window -- to repaint the window. By the way, what
commands are you using to resize your main app. window?
 
Tried OnPaint - no diff - I resize by using mouse - Which calls OnSize


It's wierd - everything appears as soon as I click on anything in the
window!
 
You're better off creating a dialog as a resource, and
inserting buttons there, then manipulating them with
visible, not visible, or moving them with MoveWindow().
(Use the Class Wizard to create variables that reference
your buttons and controls).

Drawing directly to the screen, and including controls
also, will give you erratic behavior on repaint.
 
Back
Top