Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Adding an icon to the property sheet  header
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Adding an icon to the property sheet header

 Post Reply Post Reply
Author
Message
sivavuyyuru View Drop Down
Newbie
Newbie
Avatar

Joined: 17 July 2014
Location: India
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote sivavuyyuru Quote  Post ReplyReply Direct Link To This Post Topic: Adding an icon to the property sheet header
    Posted: 17 July 2014 at 5:22am
Hi,

I had a property sheet (Wizard style(PSH_WIZARD97),as we know that a property sheet of that style consists of header. Exactly here arises my problem.The problem is I got a situation to add a bitmap to the property sheet header and again on that bitmap i must be able to place two icons at two top corners i.e,one icon at left top corner and another at right top corner and a static text control in between them .I hope you might have got what I am trying to say .

1)Creating a property sheet with PSH_WIZARD97 style .-----Done.
2)Adding bitmap to the header of property sheet.-------------Done.
3)Placing two icons at two top corners on the bitmap and those icons should be transparent as mentioned above .-----Need Help.
4)Placing a static text control in between the two icons on the property sheet header and this also should be transparent-----Need Help.

For setting the property sheet header title I added this piece of code in the page's constructor's to set the title on the sheet header,

m_psp.dwFlag |= PSP_DEFAULT|PSP_USEHEADERTITLE;
m_psp.pszHeaderTitle = L"My Application";

Adding this snippet in all the page classes make the header title to appear on all the pages,but here the text which is being set on the header is not transparent and looks ugly .So,I tried implementing WM_CTLCOLOR where I added this piece of code.

pDC->SetBkMode(TRANSPARENT);

But still the text is not transparent and this text is set on the sheet header at left top corner ,but I must place the icon and the text should follow that icon ,but if add as i mentioned above it just overlaps with the icon.


If you want source code for this ,please let me know how to send.

Any suggestions is appreciated.Smile


Thanks in advance..Smile
SivaVuyyuru
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.