Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Issues with bitmaps as constraints
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Issues with bitmaps as constraints

 Post Reply Post Reply
Author
Message
nguyena1 View Drop Down
Groupie
Groupie


Joined: 28 November 2005
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote nguyena1 Quote  Post ReplyReply Direct Link To This Post Topic: Issues with bitmaps as constraints
    Posted: 22 August 2008 at 3:18pm
Hello all
          I was wondering if any of you guys have ran into an issue like this. 

I'm trying to do a griditemenum with bitmaps for the constraints.  I can get the bitmaps to show up in the list box portion but in the actual edit box portion, where the bitmap is suppose to appear, constraint string appears instead.

Screenshots:


When i take focus off of the edit box portion and click on another cell, the "psuedo bitmap with my string constraint in it" dissapears and the string contraint only shows.

What I'm doing here works fine with the sample project "PropertyGrid" so I know its something I'm doing wrong.  I have derived classes from cxtppropertygriditemEnum and numerous things that may be setting flags on this griditem that I'm not sure about.  Just wondering if anyone has ran into this and knows what causes this problem.

Code snippet of what I'm doing.

CPropertyTabGridItemLineStyleCB::SetupBitmapConstraints(vector<HBITMAP> & myBitmaps, int nWidth, int nHeight)
{
    //set up images into imagemanager
    CImageList ImageList;
    ImageList.Create(nWidth, nHeight, ILC_COLOR4 | ILC_MASK, myBitmaps.size(), 10);
    m_pTab->GetPropertyGrid().GetImageManager()->SetMaskColor(0xC0C0C0);
    for (int i = 0; i < myBitmaps.size(); i++)\
    {
        CBitmap* btImage = CBitmap::FromHandle(myBitmaps);
        ImageList.Add(btImage, RGB(0,50,255));
    }
    m_pTab->GetPropertyGrid().GetImageManager()->SetIcons(ImageList,0,0,CSize(nWidth, nHeight));
   
    //add the contraints now
    for (int i = 0; i < m_pTab->GetPropertyGrid().GetImageManager()->GetImages()->GetCount(); i++)
    {
        CString strValue;
        strValue.Format("%d", i);
        GetConstraints()->AddConstraint(_T(strValue), i, i);
   
    {
}

Much appreciated
Tony
   


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.094 seconds.