frame without border

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.
ravaioliAsked:
Who is Participating?
 
chensuConnect With a Mentor Commented:
Try in the PreCreateWindow,

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


0
 
EHaimerlCommented:
Try ModifyStyle ( WS_EX_OVERLAPPEDWINDOW, 0); and try if you get new problems during execution.
0
 
ravaioliAuthor Commented:
I have tried with
ModifyStyle(WS_EX_OVERLAPPEDWINDOW,0)
I have not got problems during execution, but my frame has  again the borders!!!
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
MelangeCommented:
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.
0
 
ravaioliAuthor Commented:
I have again the border!!!
Really the borders is thiner, but it's again visible.
0
 
ravaioliAuthor Commented:
I have again the border!!!
Really the borders is thiner, but it's again visible.
0
 
lwidingCommented:
There are several border style flags. You should make sure that all of them are off. These are:
  WS_BORDER
  WS_DLGFRAME
  WS_THICKFRAME
0
 
ravaioliAuthor Commented:
I've tried, but  have again the borders.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.