What SW_HIDE is ShowWindow does?
-
I want to create and drawn to CScrollView that is invisible from the user. Sould I show it using a ShowWindow(SW_HIDE)? Will this permit me to draw on it?
-
I want to create and drawn to CScrollView that is invisible from the user. Sould I show it using a ShowWindow(SW_HIDE)? Will this permit me to draw on it?
Hi Yes, the standard CWnd-derived behaviour (such as ShowWindow) will work - you'll have to ensure the focus isn't set to the invisible view if you want the keyboard active, and make sure the window isn't displayed by accident elsewhere, such as a custom OnSize handler, etc. And yes, I believe you can still process OnPaint, OnDraw messages even if the window is not visible - as you can with most messages. I would just not expect the OS to initiate these (WM_PAINT messages) as the window would not require painting in this state. That said, calling UpdateWindow forces a visit of the paint routine (SendMessage(WM_PAINT, ...) I believe). Anyway, let me leave you to your devices.... ;-) HTH Martin