1. 隐藏Tasktbar
打开D:/WINCE600/PUBLIC/SHELL/OAK/HPC/EXPLORER/MAIN 目录,打开explorer.cpp 文件,在WinMain 函数里面屏蔽下面代码即可:
/*
// fork off a thread for the taskbar
hTaskbarSyncEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
if (!hTaskbarSyncEvent)
{
goto Cleanup;
}
hThread = CreateThread(NULL, NULL, CreateTaskBar, &hTaskbarSyncEvent, 0, NULL);
WaitForSingleObject(hTaskbarSyncEvent, INFINITE);
// GetExitCodeThread(); // Test for failure?
CloseHandle(hThread);
CloseHandle(hTaskbarSyncEvent);
*/
(隐藏Tasktbar方法2:
Ⅰ.在platform.reg 里添加:
[HKEY_LOCAL_MACHINE/Software/Microsoft/Shell/SlideTaskBar]
"Default"="0"
[HKEY_LOCAL_MACHINE/Software/Microsoft/Shell/AutoHide]
"Default"=dword:1
[HKEY_LOCAL_MACHINE/Software/Microsoft/Shell/OnTop]
"Default"="0"
Ⅱ.修改D:/WINCE600/PUBLIC/SHELL/OAK/HPC/EXPLORER/INC/taskbar.hxx
#define TASKBAR_HEIGHT_AUTOHIDE 0 //5 hugo
D:/WINCE600/PUBLIC/SHELL/OAK/HPC/EXPLORER/TASKBAR/taskbar.cpp
void CTaskBar::SlideWindow(HWND hwnd, const RECT &rcNew, BOOL fShow)
{
if (m_bTaskBarHidden) //hugo
return;
//********the rest as before***************************//
}
)
2. 去掉桌面图标
① 去掉"My Device"和"Recycle Bin"两个图标
打开注册表shell.reg (D:/WINCE600/PUBLIC/SHELL/OAK/FILES)
[HKEY_LOCAL_MACHINE/Explorer/Desktop]
"{000214A0-0000-0000-C000-000000000046}"="My Device"
"{000214A1-0000-0000-C000-000000000046}"="Recycle Bin"
改为
[HKEY_LOCAL_MACHINE/Explorer/Desktop]
;"{000214A0-0000-0000-C000-000000000046}"="My Device"
;"{000214A1-0000-0000-C000-000000000046}"="Recycle Bin"
② 去掉其它图标
找到所有的*.dat 文件,屏蔽掉所有在桌面上创建的快捷方式。eg:
Directory("/Windows/LOC_DESKTOP_DIR"):-File("LOC_MSPWORD_LNK","/Windows/wordpad.lnk")
改为
;Directory("/Windows/LOC_DESKTOP_DIR"):-File("LOC_MSPWORD_LNK","/Windows/wordpad.lnk")
③ 去掉wince图片
打开D:/WINCE600/PUBLIC/WCESHELLFE/OAK/FILES/ wceshellfe.reg 文件
[HKEY_CURRENT_USER/ControlPanel/Desktop]
; @CESYSGEN IF IMAGING_IMG_JPEGDECODER
"wallpaper"="//Windows//WindowsCE.jpg"
; @CESYSGEN ELSE
"wallpaper"="//Windows//WindowsCE.bmp"
; @CESYSGEN ENDIF IMAGING_IMG_JPEGDECODER
改为:
[HKEY_CURRENT_USER/ControlPanel/Desktop]
; @CESYSGEN IF IMAGING_IMG_JPEGDECODER
; "wallpaper"="//Windows//WindowsCE.jpg"
; @CESYSGEN ELSE
; "wallpaper"="//Windows//WindowsCE.bmp"
; @CESYSGEN ENDIF IMAGING_IMG_JPEGDECODER
3. 修改桌面背景颜色
打开D:/WINCE600/PUBLIC/SHELL/OAK/HPC/CESHELL/UI/desktopview.cpp 文件,找到void CDesktopView::PaintBackground(HDC hdc) const 函数,将
::FillRect(hdc, &rc, ::GetSysColorBrush(COLOR_BACKGROUND));改为
::FillRect(hdc, &rc, ::CreateSolidBrush(RGB(0,0,0)));其中RGB(0,0,0) 即为你想要修改的颜色。(Note: GetSysColorBrush 参数只能是系统定义的21种颜色元素(winuser.h),而不能是其它的颜色值)
屏蔽掉以下代码即可去掉wince 桌面显示版本和日期的字样:
#ifndef SHIP_BUILD
WCHAR wszVersion[256];
OSVERSIONINFO VerInfo;
VerInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
::GetVersionEx(&VerInfo);
::wsprintf(wszVersion, L"Windows Embedded CE v%d.%02d (Build %d on %s) ",
VerInfo.dwMajorVersion, VerInfo.dwMinorVersion, VerInfo.dwBuildNumber, TEXT(__DATE__));
if (m_hbmpDesktop && !fTileBackgroundImage)
{
rc.top = rcBlt.bottom + 5;
}
else
{
rc.top = rc.top + (rc.bottom - rc.top) / 2 - 8;
}
::DrawText(hdc, wszVersion, -1, &rc, DT_SINGLELINE | DT_CENTER | DT_TOP);
#endif
Wince 添加中文字库
1. 在定制wince系统的时候,进入” project Properties”里,在Local/clear, 再选择你想要系统支持的语言,在默认的语言里选择系统默认的语言。
回到Catalog,选择“Core OS”—>“International”—>“Locale Spectific Support”
—> “Chinese[Simplified]”
2. 回到 Catalog, 选择“Core OS”/International/Locale Specific Support/ Chinese[Simplified]
① Monotype Imaging Ac3 Font Compression 选上
② GB18030 Data Converter 选上
③ Fonts/SimSun & NSimSun (Subset 2_50) 选上
补充:在没有压缩字体的情况来,默认选择的新宋字库大小是10M多,文件为simsun.ttc,若选择Subset 2_50版本,文件为simsun_2_50.ttc,字体大小是将近3M,也是对WinCE体积进行裁剪关键所在。当然如果选择了AC3对字库进行压缩,哪么体积还可以进一步缩小,压缩后的文件为simsun_2_50.ac3,体积就只有不到2M。
字库所在目录:D:/WINCE600/PUBLIC/COMMON/OAK/FILES
如果这样还是太大(我今天就是这样),没办法,改系统定义的NK大小了(我用的是Sirf_A4):
IF NOT defined MEM_NK_SIZE (
IF defined IMGMULTIXIP (
IF "%EndStrOfFlatRelDir%"=="Debug" (
set MEM_NK_SIZE=0x02900000
) ELSE (
set MEM_NK_SIZE=0x01500000
)
)
看到这里应该知道改哪里了吧!我将set MEM_NK_SIZE=0x01500000 改为set MEM_NK_SIZE=0x02900000 ,再次编译,一切OK! Very easy!!!