G
Guest
I have a form which has a custom Non-client area. When the note is activated
the NC area is inflated, keeping the client area at the same location on the
screen. I manage the size of the NC area using the WM_NCCALCSIZE message and
paint it during the WM_NCPAINT. All works well as long as I do not set the
opacity on the window. Setting the opacity to anything other than 1 causes
all sorts of problems. For example, the DC returned by GetWindowDC is not
aligned with the actual location of the window so the window is drawn in an
incorrect location (it's offest by the width and height of the NC border),
the drawing area in the DC is the wrong size so I cannot paint the entire NC
area, the client area is not correctly positioned and the mouse hit testing
is incorrect. In general things are a mess when opacity is set to anything
other than 1.
Any thoughts or comments?
the NC area is inflated, keeping the client area at the same location on the
screen. I manage the size of the NC area using the WM_NCCALCSIZE message and
paint it during the WM_NCPAINT. All works well as long as I do not set the
opacity on the window. Setting the opacity to anything other than 1 causes
all sorts of problems. For example, the DC returned by GetWindowDC is not
aligned with the actual location of the window so the window is drawn in an
incorrect location (it's offest by the width and height of the NC border),
the drawing area in the DC is the wrong size so I cannot paint the entire NC
area, the client area is not correctly positioned and the mouse hit testing
is incorrect. In general things are a mess when opacity is set to anything
other than 1.
Any thoughts or comments?