Wince shell 定制

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);

*/

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) 即为你想要修改的颜色。


屏蔽掉以下代码即可去掉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

你可能感兴趣的:(shell)