Revision: 224
http://modplug.svn.sourceforge.net/modplug/?rev=224&view=rev
Author: xphanoo
Date: 2008-09-11 13:07:33 +0000 (Thu, 11 Sep 2008)
Log Message:
-----------
modifications:
-2 BITMAP files (img_list.bmp and MAINBAR.BMP). they are now in 24-bit and there are new icons inside
-maibar.cpp & mainfrm.cpp, only a few lines added, to enable the support for these new 24-bit (true color) images
Modified Paths:
--------------
branches/devBranch_1_17_03/mptrack/MainFrm.cpp
branches/devBranch_1_17_03/mptrack/Mainbar.cpp
branches/devBranch_1_17_03/mptrack/res/MAINBAR.BMP
branches/devBranch_1_17_03/mptrack/res/img_list.bmp
Modified: branches/devBranch_1_17_03/mptrack/MainFrm.cpp
===================================================================
--- branches/devBranch_1_17_03/mptrack/MainFrm.cpp 2008-09-07 22:13:53 UTC (rev 223)
+++ branches/devBranch_1_17_03/mptrack/MainFrm.cpp 2008-09-11 13:07:33 UTC (rev 224)
@@ -679,9 +679,15 @@
//-----------------------------------------------------
{
if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) return -1;
- // Load resources
+ // Load resources - 24-bit icons
m_hIcon = theApp.LoadIcon(IDR_MAINFRAME);
- m_ImageList.Create(IDB_IMAGELIST, 16, 0, RGB(0,128,128));
+ CBitmap bitmap2;
+ bitmap2.LoadBitmap(IDB_IMAGELIST);
+ m_ImageList.Create(16,16,ILC_COLORDDB|ILC_MASK,17,1);
+ m_ImageList.Add(&bitmap2,RGB(255,0,255));
+ SendMessage(TB_SETIMAGELIST,0,(LPARAM)m_ImageList.m_hImageList);
+ bitmap2.Detach();
+
m_hGUIFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
m_hFixedFont = ::CreateFont(12,5, 0,0, 300,
FALSE, FALSE, FALSE,
Modified: branches/devBranch_1_17_03/mptrack/Mainbar.cpp
===================================================================
--- branches/devBranch_1_17_03/mptrack/Mainbar.cpp 2008-09-07 22:13:53 UTC (rev 223)
+++ branches/devBranch_1_17_03/mptrack/Mainbar.cpp 2008-09-11 13:07:33 UTC (rev 224)
@@ -226,7 +226,16 @@
DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_SIZE_DYNAMIC | CBRS_TOOLTIPS | CBRS_FLYBY;
if (!CToolBar::Create(parent, dwStyle)) return FALSE;
- if (!LoadBitmap(IDB_MAINBAR)) return FALSE;
+ // 24-bit icons
+ CImageList imageList;
+ CBitmap bitmap;
+ if (!bitmap.LoadBitmap(IDB_MAINBAR)) return FALSE;
+ imageList.Create(16,16,ILC_COLORDDB|ILC_MASK,17,1);
+ imageList.Add(&bitmap,RGB(255,0,255));
+ SendMessage(TB_SETIMAGELIST,0,(LPARAM)imageList.m_hImageList);
+ imageList.Detach();
+ bitmap.Detach();
+
if (!SetButtons(MainButtons, sizeof(MainButtons)/sizeof(UINT))) return FALSE;
nCurrentSpeed = 6;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|