winapi - How do I extend nonclient area into a window thinner than 16 pixels? -


I am working on the project for which I have to draw a thin line horizontally on the screen and drag it vertically. To add some variation, I am trying to add the DWM glass effect in the window so that windows 7 and 8 can match window boders (although I know I will not get transparency in Windows 8).

I have drawn the line by creating a child window with an extended non-client area in the client area with an era like DumexFontFriendInteractiveAiria:

  margin margin = {-1, -1 , -1, -1}; DwmEnableComposition (DWM_EC_ENABLECOMPOSITION); DwmExtendFrameInClientArea (DIV_HWND, and margin);  

And I will create a window like this:

  hwnd DIV_HWND = CreateWindow (DIV_NAME, NULL, WS_VISIBLE, 0, 0, mon_info.rcWork.right, Mon_info.rcWork.top + 3, top-> HWD, Faucet, H-Instance, Faucet);  

and thus window class:

  const wchar_t DIV_NAME [] = l "DIV"; WNDCLASS DIV = {}; DIV.lpfnWndProc = DIV_PROC; DIV.hInstance = hInstance; DIV.lpszClassName = DIV_NAME; DIV.hCursor = Loaders (NULL, IDC_SIZEALL); RegisterClass (& amp; DIV);  

I have put the window in width of 16 pixels with all the good boundaries and I hope to overcome the shadow effects and deal with the WM_GETMINXXFO message and return it as 2. PtMinTrackSize.x and y but I do not get that smaller than that.

I can get a "lifeless" window using the DwmEnableBlurBehindWindow on the area set with the Setwindro gn, but its color is a background window even when it is in focus, apart from that I have a small shadow And miss the boundary.

It seems that due to border size I can kill size restriction because each limit is 8 pixels wide.

Any help is greatly appreciated!

I've got my answer because I do what I do need it will leave on another occasion, some That was the call code To ensure that DWM rendering policy window was not based on style allows you to use a WS_POPUP window to get into shape I want with the interior of the well known glass.

There are some bugs here:

  1. A strange shadow window's Y dimension is smaller than 16px.
  2. Round windows on Vista \ 7 give the edges window a strange oval shape.

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -