Dialysis wince Control Panel

Source: Internet
Author: User

WindowsCE is the foundation of Microsoft's embedded and mobile computing platforms. It is an open and upgradeable 32-bit embedded operating system, and is an electronic device operating system based on a head-mounted computer, it is a streamlined Windows 95, and the Windows CE graphic user interface is excellent. The Windows CE operating system is the latest member of the Windows family and is specially designed for the computer environment used by HPCS on the palm. Such a operating system can integrate the complete portable technology with the existing Windows desktop technology. Windows CE is designed as a general operating system for small devices (it is a typical non-disk system with limited memory ).
CE can set the hardware platform by designing a layer of code located between the kernel and the hardware. This is the well-known Hardware Abstraction Layer (HAL) (in previous interpretations, this is called the OEMC (original device manufacturing) adaptation layer, namely, oal; kernel compression layer, namely, Kal. to avoid confusion with Microsoft's Windows NT Operating System HAL ).

1. The control panel structure control panel is part of the Windows graphical user interface and can be accessed through the Start Menu. It allows users to view and operate on basic system settings and control, such as adding hardware, adding/deleting software, controlling user accounts, changing auxiliary function options, and so on. The control panel can be accessed through "start"> "Settings"> "Control Panel" in Windows 95, Windows 98, and Windows ME, or directly from the Start menu in Windows XP and Windows Vista. It can also be accessed directly by running the "control" command. The control panel is actually a dynamic link library. The difference is that the suffix is. CPL, and the external interface is cplapplet (). The prototype of the interface is long callback cplapplet (hwnd hwndcpl, uint message, lparam lparam1, lparam lparam2). In the interface function, we need to implement response to specific messages so that the control panel can operate normally. To facilitate observation, the response structure of the message is directly pasted here: // =- =-= // the entry point to the control panel application. // =- =-= extern "C" Long callback cplapplet (hwnd hwndcpl, uint message, lparam lparam1, lparam lparam2) {Switch (Message) {Case cpl_init: // perform global initializations, especially memory // allocations, here. // Return 1 for success or 0 for failure. // control panel does not load if failure is returned. return 1; Case cpl_getcount: // The number of actions supported by this control // panel application. return 1; Case cpl_newinquire: {// This message is sent once for each dialog box, as // determined by the value returned from cpl_getcount. // lparam1 is the 0-based index of the dialog box. // lparam2 I S a pointer to the newcplinfo structure. return 0; // means cplapplet succeed return 1; // nonzero value means cplapplet failed .} case cpl_dblclk: {// The user has double-clicked the icon for the // dialog box in lparam1 (zero-based ). Return 0; // cplapplet succeed. return 1; // cplapplet failed .} case cpl_stop: // called once for each dialog box. used for cleanup. case cpl_exit: // called only once for the application. used for cleanup. default: Return 0;} return 1; // cplapplet failed .} // The functions of the messages cplapplet are: cpl_init: initialization. memory can be allocated here. Cpl_getcount: return the number of control panel programs. Because one. The CPL file may contain multiple applets. cpl_newinquire: returns the newcplinfo structure cpl_dblclk that contains the program name and Icon information. It returns the cpl_stop response when a single component exits and is used to clear cpl_exit, such as resource memory: when you exit the entire CPL program, the definition of the response to these messages can be found in Cpl. H found 2. in explorer, if the customized system contains the explorer UI, you only need to put the compiled file into "\ Windows", and then open "Control Panel" to see it. 3. How to call. CPL is like a PC. The dllfile cannot be run directly, and rundll32.exe is used to run the same file. CPL also needs the corresponding program to call. This program is: "ctlpnl.exe ". for example, we need to call the built-in cplmain. cpl "Power Management", as long as you enter "ctlpnl.exe \ windows \ cplmain. CPL, 5 ". the "5" that follows the path is only because "Power Management" is in cplmain. enter the fifth Applet in Cpl. Therefore, it is not difficult to obtain the method of using the shellexecuteex () function in the program to call the applet of the control panel. The following code calls "Power Management" in the same way as entering a command in the command line ". shellexecuteinfo Info; tchar szcontrolpanelpolicline [200]; swprintf (szcontrolpanelpolicline, l "\ Windows \ cplmain. CPL, 5 "); info. cbsize = sizeof (Info); info. fmask = see_mask_nocloseprocess | see_mask_flag_no_ui; info. lpverb = NULL; info. lpfile = text ("ctlpnl.exe"); info. lpparameters = szcontrolpanelpolicline; info. lpdirectory = NULL; info. nshow = sw_show; info. hinsta Pp = NULL; shellexecuteex (& info); if you want to call other cplmain. Cpl applets, you only need to change the number to the corresponding one. The first item in the following is numbered 0, followed by 1, and then continues to increase. 0 cpl_comm 1 limit 2 cpl_keyboard 3 cpl_password 4 cpl_owner 5 cpl_power 6 cpl_system 7 cpl_screen 8 cpl_mouse 9 limit 10 limit 11 cpl_sip "12 cpl_remove 13 cpl_datetime 14 limit 15 limit 4. the code of the control panel that comes with the system is fully disclosed by Microsoft. If pb4.2 is installed, the code can be found in "\ public \ wceshellfe \ oak \ ctlpnl. The ctlpnl folder contains nine folders corresponding to different CPL files: advbacklight: Advanced backlight management bthpnl: Bluetooth connpnl: Dial-Up Network Control: Main console, the "Control Panel" we see in Explorer should be the cplmain: The cplmain will be generated. CPL, most of the Control Panel options are derived from this ctlpnl: dmpnl associated with control: not used, not clear. However, the RC file should be set to access the Internet. Intl2: Region and language settings stgui: Memory Management

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.