Solved

CChildFrame frame border

Posted on 2004-10-08
4
557 Views
Last Modified: 2013-11-20
Hello

How can I change the border of MDI Child frame window. I want to achive very thin border, or better border like in forms of VB applications....

I have already tried but no results:

BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
      // TODO: Modify the Window class or styles here by modifying
      //  the CREATESTRUCT cs
      cs.style&=~(FWS_ADDTOTITLE | WS_THICKFRAME);

      //cs.dwExStyle|=WS_EX_CLIENTEDGE;
      if( !CMDIChildWnd::PreCreateWindow(cs) )
            return FALSE;

      return TRUE;
}

thank you for your help
0
Comment
Question by:LukaKrop
  • 2
  • 2
4 Comments
 

Author Comment

by:LukaKrop
ID: 12258117
Sorry forgot to add:

It must be sizable!!!

thnx
0
 
LVL 13

Accepted Solution

by:
SteH earned 500 total points
ID: 12258420
have you tried the solution given in
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_Changing_the_Styles_of_a_Window_Created_by_MFC.asp
You need to derive a class from MDIChildWnd where you do the coding you showed.
0
 

Author Comment

by:LukaKrop
ID: 12264655
Which style shoul I change to become a MDIChild window with very thin border, title, sizable.

thnx
0
 
LVL 13

Expert Comment

by:SteH
ID: 12274665
WS_THICKFRAME should be removed. It is then up to you to draw a visible frame which allows the user to identify a place where to size. MFC assumes that thick frames can be resized. But when you design a GUI you are free to change that. There are other applications which to a sizing with a thin border (ie firefox).
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

705 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now