Questions tagged [nonclient-area]

Non-client area of a window is where the window decorations are rendered such as the caption and the frame.

Non-client area is the feature of decorated windows that have a caption and a frame. Typically this area is rendered by the window manager so all decorated windows have the same standard system look. Overriding this behaviour allows making a totally custom visual style, but the implementation depends on the platform.

27 questions
6
votes
1 answer

Custom control with non-client area - doesn't calculate at first

I'm writing a custom control which is simply a container with a non-client area. Within that non-client area, there's one small area which is a button, and the rest of it is transparent. The drawing isn't an exact rectangle. So far, I have it…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
3
votes
1 answer

How to correctly draw simple non-client area (4 px red border)?

I'm trying to draw a custom painted non-client area, instead of default theme border (Windows 10). I handled WM_NCCALCSIZE to resize the non-client area to 4 pixels on each side and then handled WM_NCPAINT to draw the red border. My custom painting…
krsi
  • 1,045
  • 2
  • 14
  • 24
3
votes
0 answers

How to Put Content (Controls) in the Titlebar Area of a Window WPF C# With Regular Buttons

I would like to find a way to put content such as controls into the non-client area of a WPF window without touching the default window control buttons and any other properties of the window. Attempted Solutions: I have tried using a WindowChrome…
Alex Fanat
  • 748
  • 10
  • 22
3
votes
1 answer

Vcl Style Utils - Get rid of default form icon

I've already posted this as an issue on RRUZ's Vcl Style Utils library on GitHub. However, I thought I could get some help here too. I'm using VCL Styles to create a Windows 10 user interface, specifically using the "Windows 10 Dark" style. I'm also…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
3
votes
1 answer

How to reflect the changes after I resize the non-client area?

I want to make a custom control with a selectable border size. See the code below. The border is drawn in the non-client area and his width can be 0, 1 or 2 pixels. I've successfully done the border drawings in the WM_NCPAINT. The problem is that…
Marus Gradinaru
  • 2,824
  • 1
  • 26
  • 55
3
votes
1 answer

Forcing a repaint of TMainMenu when handling WM_NCPAINT yourself

I'm custom painting my caption bar in a rather large application with many forms and have decided to try and do it the old-fashioned way by handling some messages myself and dong the drawing when I'm handling WM_NCPAINT. The painting itself is going…
overactor
  • 1,759
  • 2
  • 15
  • 23
3
votes
3 answers

How to determine correctly the Non-Client Area Size for Aero?

How to determine correctly with VBNET or C# code the Non-Client Area Size when Aero is activated for a COMPILED application? (Yes, this problem only occurs when running a compiled application, not when launching the app from the IDE) When I resize…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
2
votes
1 answer

How to draw a close button like Visual Studio?

Visual Studio's windows have a close button (as well as other frame controls) that blend into the caption color and appear like so: I was wondering if there's an accepted way of drawing controls like that. Do controls like these use…
user15284017
2
votes
1 answer

How to set the client area (ClientRectangle) in a borderless form?

I want to know if it's possible to set the client area of a borderless form. Say for example I define a form like so: Code public class MyForm : Form { public MyForm() { this.FormBorderStyle = FormBorderStyle.None; …
Matthew Layton
  • 39,871
  • 52
  • 185
  • 313
2
votes
1 answer

How to handle event of push button on non client area

EDIT: I’ve used the following code to draw a push button at the non client area (the title bar) of my window. So my question is: Is possible to handle mouse click event from this button? bool MainWindow::winEvent(MSG *pMessage, long *result) { …
Antonio Dias
  • 2,751
  • 20
  • 40
1
vote
1 answer

How to use DWMWA_ALLOW_NCPAINT

I would like to use the DWMWA_ALLOW_NCPAINT to draw in the Non Client area but I cant figure out how to use it, can anyone help me?
Jakob
  • 23
  • 7
1
vote
1 answer

Smooth WM_NCPAINT in Win32

I am wanting to handle WM_NCPAINT messages to draw my own window frame. I wrote some simple code to draw just a rectangle, which should give a black border around it. Here was the code: LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam,…
Garhoogin
  • 91
  • 2
  • 9
1
vote
1 answer

DrawText on Windows Title Bar no longer works

In order to write some text at the right hand end of the title bar, my program catches WM_NCPAINT, gets the device context, calculates the position to write the text and then calls DrawText. This code used to work, but with Windows 8 and Windows 10,…
Morag Hughson
  • 7,255
  • 15
  • 44
1
vote
1 answer

How can I remove a window's non-client area completely?

I need a window featuring no title bar, none of the control boxes, no system menu, and no frames (all that functionality is provided with separate controls). I suspect that this should be possible to do with CreateWindowExA's window styles argument…
user1889116
1
vote
2 answers

Why does my vb.net title bar come out white

For some reason, when I am designing my Windows Application, the form outline/title bar is blue in colour, but when the application runs, it comes out white. Why does it do this and how do I get it to display the normal colour that all windows…
1
2