We help IT Professionals succeed at work.

frame without border

ravaioli
ravaioli asked
on
Medium Priority
1,029 Views
Last Modified: 2013-11-20
I'd like to have a frame with no border and no title bar..
I have changed the frame's style in the PreCreateWindow so:

cs.style=~WS_BORDER|WS_CAPTION

but this gives some problems during the execution.

After I have changed the frame's style in OnCreate:
ModifyStyle(WS_CAPTION,0);
ModifyStyle(WS_BORDER,0);

In this way my frame has not the title bar, but has the border!!

I'd like to know what I have to do to delete the border or to colour it as the view's background.

Thanks.
Comment
Watch Question

Commented:
Try ModifyStyle ( WS_EX_OVERLAPPEDWINDOW, 0); and try if you get new problems during execution.

Author

Commented:
I have tried with
ModifyStyle(WS_EX_OVERLAPPEDWINDOW,0)
I have not got problems during execution, but my frame has  again the borders!!!

Commented:
Try this in your PreCreateWindow function

cs.style = WS_CLIPCHILDREN | WS_OVERLAPPED;

if that still fails, then try it with WS_POPUP instead of WS_OVERLAPPED or just simply WS_CLIPCHILDREN only.

Author

Commented:
I have again the border!!!
Really the borders is thiner, but it's again visible.

Author

Commented:
I have again the border!!!
Really the borders is thiner, but it's again visible.

Commented:
There are several border style flags. You should make sure that all of them are off. These are:
  WS_BORDER
  WS_DLGFRAME
  WS_THICKFRAME

Author

Commented:
I've tried, but  have again the borders.
Commented:
Try in the PreCreateWindow,

cs.style = WS_POPUP | WS_VISIBLE;
cs.dwExStyle = 0;


Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.