引用自:
http://www.sf.org.cn/Article/symbiandev/200511/2579.html
Symbian中的更改應用程序圖標
應用程序的圖標需要在MMP文件中用AIF語句指定,一個MMP的例子
/*
* ============================================================================
* Name : TestDlg.mmp
* Part of : TestDlg
* Created : 2005/09/12 by
* Description:
* This is the project specification file for TestDlg.
* Initial content was generated by Series 60 AppWizard.
*
* Version :
* Copyright:
* ============================================================================
*/
TARGET TestDlg.app
TARGETTYPE app
UID 0x100039CE 0x097A0B44
TARGETPATH \system\apps\TestDlg
SOURCEPATH ..\src
SOURCE TestDlgApp.cpp
SOURCE TestDlgAppUi.cpp
SOURCE TestDlgDocument.cpp
SOURCE TestDlgDialog.cpp
SOURCE MailViewDlg.cpp
RESOURCE ..\data\TestDlg.rss
RESOURCE ..\data\TestDlg_caption.rss
LANG SC
USERINCLUDE .
USERINCLUDE ..\inc
SYSTEMINCLUDE . \epoc32\include
LIBRARY euser.lib apparc.lib cone.lib eikcore.lib
LIBRARY eikcoctl.lib avkon.lib
LIBRARY eikdlg.lib estor.lib msgs.lib etext.lib
AIF TestDlg.aif ..\aif TestDlgaif.rss c8 context_pane_icon.bmp context_pane_icon_mask.bmp list_icon.bmp list_icon_mask.bmp
AIF目錄下的TestDlgaif.rss :
/*
* ============================================================================
* Name : TestDlgaif.rss
* Part of : TestDlg
* Created : 2005/09/12 by
* Description:
* RSS for creating the aif file for TestDlg.
* Initial content was generated by Series 60 AppWizard.
* Version :
* Copyright:
* ============================================================================
*/
#include <aiftool.rh>
RESOURCE AIF_DATA
{
app_uid=0x097A0B44;
num_icons=2;
embeddability=KAppEmbeddable;
newfile=KAppDoesNotSupportNewFile;
}
// End of File
安裝后自動應用。一個MASK文件,就是把圖標存成黑白2位色的文件,習慣上是名字加_mask,上面的例子中,就是context_pane_icon.bmp和context_pane_icon_mask.bmp以及list_icon.bmp和 list_icon_mask.bmp四個文件。當然在資源文件要有說明,也在AIF那行。