![]() |
Png loaded from a file |
Post Reply
|
| Author | |
himanshu
Groupie
Joined: 04 January 2008 Status: Offline Points: 81 |
Post Options
Thanks(0)
Quote Reply
Topic: Png loaded from a filePosted: 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
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
himanshu
Groupie
Joined: 04 January 2008 Status: Offline Points: 81 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 March 2008 at 12:39am |
|
thanks
it did worked
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |