V
valerie.tching
Hello,
I'm trying to make a skinned application, so i'm overriding the paint
methods of the controls.
Concerning the painting of the form itself, it seems that there are 2
options:
- Making the form borderless (FormBorderStyle to None), and building
our own custom window title bar, but just think that this needs some
useless work as we have to rewrite some window functions (move, resize,
....). Moreover, when maximizing the window, it makes it fullscreen.
- This lead me to the second option which was to use the non client
area painting by catching the WM_NCPAINT message in the WndProc method.
With the help of some Win32 functions, i paint on the form
(FormBorderStyle to Sizable) but something weird happens, the system
buttons on the title bar redraw themselves, for example, when i move
the mouse over the window. So they appear on the custom painting...
Does someone have an idea of what happens with the
maximize/minimize/close buttons and/or have a workaround for the second
option ? Cannot find which message makes the buttons to be repainted.
Or is the first option the best solution to make a skinned application
?
Thanks for your help!
Valerie
I'm trying to make a skinned application, so i'm overriding the paint
methods of the controls.
Concerning the painting of the form itself, it seems that there are 2
options:
- Making the form borderless (FormBorderStyle to None), and building
our own custom window title bar, but just think that this needs some
useless work as we have to rewrite some window functions (move, resize,
....). Moreover, when maximizing the window, it makes it fullscreen.
- This lead me to the second option which was to use the non client
area painting by catching the WM_NCPAINT message in the WndProc method.
With the help of some Win32 functions, i paint on the form
(FormBorderStyle to Sizable) but something weird happens, the system
buttons on the title bar redraw themselves, for example, when i move
the mouse over the window. So they appear on the custom painting...
Does someone have an idea of what happens with the
maximize/minimize/close buttons and/or have a workaround for the second
option ? Cannot find which message makes the buttons to be repainted.
Or is the first option the best solution to make a skinned application
?
Thanks for your help!
Valerie