更换Windows Mobile 6.5 标题栏和菜单栏背景
在Windows Moible 6.5上添加了新特性。下面是微软定义的关于设置Task bar和softkey bar的消息定义,消息定义的很清楚。
// Retrieve the alpha value for taskbar & SoftKeyBar transparency (PPC Only)
#define TSKBM_GETALPHA (WM_USER + 150)
// wParam == 0 (This parameter is not used)
// lParam == 0 (This parameter is not used)
// Return value:The return value is the current alpha value, default is 255 (opaque).
// Set the alpha value for taskbar & menubar transparency (PPC Only)
#define TSKBM_SETALPHA (WM_USER + 151)
// wParam == alpha value (0 - 255) 0 == transparent, 255 == opaque
// lParam == 0 (This parameter is not used)
// Return value: The return value is undefined
// Set the overlap image for the softkeybar
#define WM_SETSOFTKEYBARBACKGROUND (WM_USER + 410)
// wParam == alpha value (0 - 255) 0 == transparent, 255 = opaque
// lParam == an image (HBITMAP)
// Return value: The return value is undefined
// Set the overlap image for the taskbar (PPC Only)
#define WM_SETTASKBARBACKGROUND (WM_USER + 411)
// wParam == alpha value (0 - 255) 0 == transparent, 255 = opaque
// lParam == an image (HBITMAP)
// Return value: The return value is undefined
// Get the overlap image alpha value for the taskbar (PPC Only)
#define WM_GETTASKBARBACKGROUNDALPHA (WM_USER + 412)
// Return value: The return value is the overlap image alpha value of the taskbar
// Get the overlap image DC for the taskbar (PPC Only)
#define WM_GETTASKBARBACKGROUNDDC (WM_USER + 413)
// Return value: The return value is the overlap image DC of the taskbar
设置标题栏和菜单栏背景代码,setVal为透明度
BYTE setVal = 255;
HWND hwndTB = FindWindow(L"HHTaskBar", NULL);
SendMessage(hwndTB, WM_SETTASKBARBACKGROUND, setVal, (LPARAM) m_hTSKImage);
SendMessage(h_Menubar, WM_SETSOFTKEYBARBACKGROUND, setVal, (LPARAM) m_hSOFTKEYImage);