Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to remove title bar of a window through code?

Posted on 2002-07-05
2
303 Views
Last Modified: 2013-11-20
I am developing an MDI application in Visual C++ 6.0 and I want to remove the title bar of the child windows. I am using CFormView as my View class. I have inserted a chart on the form and when I double click the form I want to hide the title of the window. Similarly when I double click the chart second time I want to show the title bar again.

I have tried ModifyStyle function but it doesnt work. Please help me out.
0
Comment
Question by:UsmanQ
2 Comments
 
LVL 12

Accepted Solution

by:
migel earned 100 total points
ID: 7131646
Hi!
IMHO you try change style on the wrong window
here is example how to switch caption mode for MDI child window from the view:


void CMfcieView::OnHideCaption()
{
     // TODO: Add your command handler code here
     CFrameWnd* pFrame = GetParentFrame();
     if (pFrame)
          {
          DWORD dwStyle = pFrame->GetStyle();
          if (dwStyle & WS_CAPTION)
               pFrame->ModifyStyle(WS_CAPTION, 0, SWP_DRAWFRAME);
          else
               pFrame->ModifyStyle(0, WS_CAPTION, SWP_DRAWFRAME);
          }
}
0
 

Author Comment

by:UsmanQ
ID: 7136826
Thanks migel that solved my problem. It workd fine.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Include multiple hostnames in this command? 3 55
Define unique primary key 9 95
java ^ examples 8 69
SQUD PROXY SERVER, UNIX, SLL/HTTPS 5 103
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: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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 shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

808 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