Date post: | 02-Jan-2016 |
Category: |
Documents |
Upload: | agnes-craig |
View: | 217 times |
Download: | 0 times |
Introduction to Embedded Introduction to Embedded Software DevelopmentSoftware Development
Frequently Asked QuestionFrequently Asked Question
School of Software EngineeringSchool of Software Engineering
IndexIndex
Windows CE MenuWindows CE Menu Connect to Emulator without EthernetConnect to Emulator without Ethernet EVC can NOT display Chinese CharsEVC can NOT display Chinese Chars CVTRes ErrorCVTRes Error
1. How to create and use 1. How to create and use menu in Windows CE Appsmenu in Windows CE Apps
Problem descriptionProblem description
The menu resource can be inserted The menu resource can be inserted and edited into .rc fileand edited into .rc file
Desktop Windows API does NOT workDesktop Windows API does NOT work CreateMenuCreateMenu SetMenuSetMenu
Problem Root CauseProblem Root Cause
The GUI Shell of Windows CE system The GUI Shell of Windows CE system is somewhat different with desktop is somewhat different with desktop window, the UI elements of Pocket PC window, the UI elements of Pocket PC and Smartphone are different.and Smartphone are different.
Windows CE implements the menu API Windows CE implements the menu API as Common control, named as Common control, named Command Command BarBar..
SolutionSolution
#include <commctrl.h>#pragma comment(lib, “Commctrl.lib”) // link the static library……
case WM_CREATE:hwndCB = CommandBar_Create(hInst, hWnd, 1);CommandBar_InsertMenubar(hwndCB, hInst, IDM_MENU,
0);CommandBar_AddAdornments(hwndCB, 0, 0);
case WM_DESTROY:CommandBar_Destroy(hwndCB);
Related resourcesRelated resourcesProgramming element Description
CommandBar_AddBitmapThis function adds one or more images to the list
of button images available for use in the command bar.
CommandBar_AddAdornmentsThis function adds the Close button (X) to the
command bar.
CommandBar_InsertComboBoxThis function inserts a combo box into the
command bar.
CommandBar_InsertMenubarThis function inserts a menu bar into the
command bar. CommandBar_InsertMenubarEx This function inserts a menu into a command bar. CommandBar_Create This function instantiates a new command bar.
CommandBar_DrawMenuBarThis function repositions and redraws the
command bar after a menu in the command bar has been modified.
CommandBar_GetMenuThis function retrieves the handle to a menu on
the command bar.
CommandBar_HeightThis function retrieves the height of the command
bar in pixels. CommandBar_Show This function shows or hides the command bar.
2. How to use EVC to 2. How to use EVC to connect to emulator if my connect to emulator if my PC has no Ethernet cardPC has no Ethernet card
Problem description & causeProblem description & cause
EVC need to use TCP/IP to connect to EVC need to use TCP/IP to connect to connect to emulatorconnect to emulator
Your PC must have an available Your PC must have an available Ethernet connectionEthernet connection
Platform manager can NOT connect to Platform manager can NOT connect to device without Ethernet connectiondevice without Ethernet connection
Solution : Install Microsoft Solution : Install Microsoft Loopback AdapterLoopback Adapter
控制面板 控制面板 -> -> 添加硬件 添加硬件 -> -> 手动选择 手动选择 -> -> 网网络适配器络适配器 -> Microsoft -> Microsoft -> Microsoft -> Microsoft Loopback AdapterLoopback Adapter
3. EVC can not display 3. EVC can not display Chinese CharactersChinese Characters
Problem description & causeProblem description & cause
The default Standard SDK is built with The default Standard SDK is built with the English language.the English language.
There are no Chinese font installed at There are no Chinese font installed at all.all.
Solution : Build your own Solution : Build your own Platform with Chinese and Platform with Chinese and export your own SDKexport your own SDK
From PB, Platform -> Setting -> LocaleFrom PB, Platform -> Setting -> Locale Be sure that the default language is Be sure that the default language is
Simplified ChineseSimplified Chinese Export SDK and install it.Export SDK and install it.
Correct ResultCorrect Result
Cvtres out of memoryCvtres out of memory
When compile, the compiler complains When compile, the compiler complains cvtres error.cvtres error.
Solution : Solution : http://bbs.tongji.net/index.php?http://bbs.tongji.net/index.php?prog=topic::flat&tid=198858prog=topic::flat&tid=198858