Print Page | Close Window

Png loaded from a file

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=9962
Printed Date: 01 March 2025 at 9:24am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Png loaded from a file
Posted By: himanshu
Subject: Png loaded from a file
Date Posted: 26 March 2008 at 5:09am
HI
 
I have loaded the png for a button usiing following code in my project
 
HBITMAP hBitmap = CXTPImageManagerIcon::LoadBitmapFromFile(_T("E:\\res\\xyz2_16.png") );
CBitmap* pBitmap = CBitmap::FromHandle(hBitmap);
pCommandBars->GetImageManager()->SetIcons(*pBitmap, uiGroupClipboard, _countof(uiGroupClipboard), CSize(16, 16));
 
Now i have another application where i loaded the same png image by using different tool other than codejock.
The two images look differently .The one which is loaded using codejock shows large differences with the original.
 
I am attaching the both images along with the original one.
Could you suggest some way to improve the look of this png file closer to the original one.
 
 
I am getting error that only users with sufficient permission can upload?? But iIn recent time i was able to do the same.
 
 
Thanks
 
 



Replies:
Posted By: Oleg
Date Posted: 26 March 2008 at 5:15am
to free resources better use
 
CBitmap Bitmap; Bitmap.Attach(hBitmap);
pCommandBars->GetImageManager()->SetIcons(&Bitmap, uiGroupClipboard, _countof(uiGroupClipboard), CSize(16, 16));
 
 
Send it to support.codejock.com


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Oleg
Date Posted: 26 March 2008 at 5:17am
btw.... if image has alpha layer, you have to set last parameter bAlpah = TRUE;

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: himanshu
Date Posted: 27 March 2008 at 12:39am
thanks
it did worked



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