question

GloryStar-4779 avatar image
0 Votes"
GloryStar-4779 asked GloryStar-4779 edited

The client area doesn't sizing properly

I am experienceless on Windows Desktop programming. I would like to draw the frame window by myself. I searched on the internet and found the Bee Lee's article.

https://beeleeong.wordpress.com/2017/04/23/want-a-better-window-frame/#more-889

Demo :
https://github.com/beelee93/ExtendingWindows

I used the method that descripted in this article , But I encounter a issue about the client area. When I resize the frame window ,the client area size doesn't be changed.

Below is the screenshot of a demo, I just added a status bar in the demo app. The size of status bar will not be changed when window size changed.
https://ibb.co/VY05WPG

Any help would be greatly appreciated!

dotnet-csharpwindows-apiwindows-formswindows-app-sdkdotnet-cli
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Castorix31 avatar image
1 Vote"
Castorix31 answered Castorix31 commented

Ths is the old method
It is done now with DWM (DwmExtendFrameIntoClientArea and so on) : Custom Window Frame Using DWM



· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

It might out of date, But I still would like to figure it out.

0 Votes 0 ·

Child windows like Status Bars are moved/resized in WM_SIZE (mainly with MoveWindow)


0 Votes 0 ·

Thanks for the clue.

But how can I notify all client area controls to resize themself, Just like the behaviors of the status bar in default Form class.

0 Votes 0 ·
Show more comments