Solved

frame without border

Posted on 1997-05-13
8
995 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.
0
Comment
Question by:ravaioli
8 Comments
 

Expert Comment

by:EHaimerl
ID: 1301514
Try ModifyStyle ( WS_EX_OVERLAPPEDWINDOW, 0); and try if you get new problems during execution.
0
 

Author Comment

by:ravaioli
ID: 1301515
I have tried with
ModifyStyle(WS_EX_OVERLAPPEDWINDOW,0)
I have not got problems during execution, but my frame has  again the borders!!!
0
 
LVL 3

Expert Comment

by:Melange
ID: 1301516
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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

Author Comment

by:ravaioli
ID: 1301517
I have again the border!!!
Really the borders is thiner, but it's again visible.
0
 

Author Comment

by:ravaioli
ID: 1301518
I have again the border!!!
Really the borders is thiner, but it's again visible.
0
 
LVL 1

Expert Comment

by:lwiding
ID: 1301519
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
 

Author Comment

by:ravaioli
ID: 1301520
I've tried, but  have again the borders.
0
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1301521
Try in the PreCreateWindow,

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


0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question