Print Page | Close Window

Issues with bitmaps as constraints

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=11934
Printed Date: 29 June 2024 at 6:53pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Issues with bitmaps as constraints
Posted By: nguyena1
Subject: Issues with bitmaps as constraints
Date 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
   





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net