Solved

How to remove title bar of a window through code?

Posted on 2002-07-05
2
311 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
[X]
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
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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 is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

635 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