Microsoft
Software
Hardware
Network
Question : Draw a scroll bar into non-client area
How can I draw a standard scrollbar in the non-client area of my CWnd derived class ?
I try to create a scrollbar child control but it is never refreshed.
I don't want to draw the entire scoll bar myself in the OnNcPaint handler...
Answer : Draw a scroll bar into non-client area
I asked the same question. It is at:
http://www.experts-exchang
e.com/topi
cs/comp/os
-ms-window
s/
programm
ing/owl/Q.
10051718
The summary:
First of all, a child window is confined to its parent windows CLIENT area. So a child window definitly will not work.
There are three ways around this.
First, you might be able to get around this using a pop-up window. That is, a window that doesn't specify the WS_CHILD and that specifies the other window as an owner. You would have to move and size this pop-up window whenever the owner window is moved or sized. Big pain in the ass.
Second, rather than increasing the size of the non-client area, you could put the control in the client area and draw things so that it appears to be in the non-client area. This may not be possible depending on the geometry of the situation however.
Third, impliment them "brute force". You draw the button "manually" when the window gets the non-client paint message. You indicate a hit on the button by handling the non-client hit test message. You react to the button being pressed on a non-client mouse down message witht he appropriate hit test value.
Random Solutions
video card driver
Problem with "like" keyword, when database is in chinese
active directory, W2k8 R2 DC, Kerberos failures, Event ID: 3, 4771, 4769, 4768, 4776, 4625 source: Microsoft Windows security
Date Format problem in Microsoft Access 2000
Out of resources error when moving lots of files
Option Group & Radio Buttons: Which Events To Use
problem opening word attachment with XP professional
SCCM 2007 Constant Despooler error 4406
access 2003 parse data length undetermined
referencing form variables in adp views