Link to home
Start Free TrialLog in
Avatar of balajis79
balajis79

asked on

I want to remove the Title bar in a CPropertySheet(Not Property page). How do i go about doing this?

I have a Property Sheet with 5 pages. Following is the code i use to add the 5 pages

        CPageAToE * page1=new CPageAToE;
     
      CPageFToJ * page2=new CPageFToJ;

     CPageKToO * page3=new CPageKToO;

     CPagePToT * page4=new CPagePToT;

     CPageUToZ * page5=new CPageUToZ;
 
      CLeavePropSheet * leavesheet= new CLeavePropSheet("New Sheet",NULL,0);
       
      leavesheet->AddPage(page1);
      leavesheet->AddPage(page2);
     leavesheet->AddPage(page3);
     leavesheet->AddPage(page4);
     leavesheet->AddPage(page5);
 
      leavesheet->m_psh.dwFlags |= PSH_NOAPPLYNOW;
     
        leavesheet->DoModal();

Now How do i remove the title Bar of the Property Sheet?(Note i do not need the title "New Sheet".It was just added.)
Avatar of Roshan Davis
Roshan Davis
Flag of United States of America image

b4 DoModal

leavesheet->ModifyStyle(WS_CAPTION, 0);

Avatar of balajis79
balajis79

ASKER

Hi roshmon,
Actually i tried this solution and it did not work. Is there any other method or should i be doing something apart from this.

rgds
Balaji
Try to remove WS_CAPTION also,
if it not working,

Do it this on the OnCreate function of the property sheet class.

Roshmon
Sorry,
Try to remove WS_SYSMENU also,
if it not working,

Do it this on the OnCreate function of the property sheet class.

Roshmon
Your earlier suggestion of removing WS_CAPTION worked when i did it on OnCreate of the property sheet.

Thanks.

rgds
Balaji

btw How do i accept this as an answer? Where is the link for it.
ASKER CERTIFIED SOLUTION
Avatar of Roshan Davis
Roshan Davis
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial