變數名 ICON "ICON檔案路徑"
如 logo ICON "../Logo/LOGO.ico"
然後在,[{專案}Frm.cpp]中的CreateGUIControls()函式內加入
SetIcon(wxIcon(wxT("變數名")));
如SetIcon(wxIcon(wxT("logo")));
就行。
XPM文件的基本結構是
/* XPM */
static char *[] = {
};
<character>{ <key><color>} { <key><color>}構成
<extension_name><extension_data_string>單行的擴展
XPMEXT
<extension_name>
<extension_data_string1>
<extension_data_string2><xmp></xmp>
static char * plaid[] =
{
/* plaid pixmap */
/* width height ncolors chars_per_pixel */
"22 22 4 2 0 0 XPMEXT",
/* colors */
" c red m white s light_color",
"Y c green m black s ines_in_mix",
"+ c yellow m white s lines_in_dark ",
"x m black s dark_color ",
/* pixels */
"x x x x x x x x x x x x + x x x x x ",
" x x x x x x x x x x x x x x x x ",
"x x x x x x x x x x x x + x x x x x ",
" x x x x x x x x x x x x x x x x ",
"x x x x x x x x x x x x + x x x x x ",
"Y Y Y Y Y x Y Y Y Y Y + x + x + x + x + x + ",
"x x x x x x x x x x x x + x x x x x ",
" x x x x x x x x x x x x x x x x ",
"x x x x x x x x x x x x + x x x x x ",
" x x x x x x x x x x x x x x x x ",
"x x x x x x x x x x x x + x x x x x ",
" x x x x Y x x x ",
" x x x Y x x ",
" x x x x Y x x x ",
" x x x Y x x ",
" x x x x Y x x x ",
"x x x x x x x x x x x x x x x x x x x x x x ",
" x x x x Y x x x ",
" x x x Y x x ",
" x x x x Y x x x ",
" x x x Y x x ",
" x x x x Y x x x ",
"XPMEXT ext1 data1",
"XPMEXT ext2",
"data2_1",
"data2_2",
"XPMEXT ext3",
"data3",
"XPMEXT",
"data4",
"XPMENDEXT"
};