pocketpc

How to format a number with thousands separator in C/C++

走远了吗. 提交于 2019-12-08 14:09:11
问题 I am trying to do this simple task. Just to format a number using C or C++, but under Windows CE programming. In this environment, neither inbue nor setlocale methods work. Finally I did this with no success: char szValue[10]; sprintf(szValue, "%'8d", iValue); Any idea? 回答1: Here's one way - create a custom locale and imbue it with the appropriately customised facet: #include <locale> #include <iostream> #include <memory> struct separate_thousands : std::numpunct<char> { char_type do

how to show/hide SIP on Pocket PC

与世无争的帅哥 提交于 2019-12-06 01:07:42
I have the following problem: I open the dialog, open the SIP keyboard to fill the form and then minimize the SIP. Then when I close the current dialog and return to the main dialog the SIP keyboard appears again. Does anyone know how could I show/hide SIP keyboard programatically or better what could be done to solve the described problem. Once the user minimizes the keyboard it should not appear on the screen on dialog switching. Thanks! We use SHSipPreference to control the display of the SIP in our applications. I know it works with MFC and it sets the state of the SIP for the window so

Disable CE windows animation, programmatically?

爱⌒轻易说出口 提交于 2019-12-05 14:32:01
Here is how to do it with a registry key. * Go to HKEY_LOCAL_MACHINE\SYSTEM\GWE * Create a DWORD named Animate if it does not already exist * Edit the DWORD value named Animate * 0 - Disables Window Animation 1 - Enables Window Animation However, it needs restart of the device. I would like to know if there is anyway to disable it instantly, programmatically? Take a look at SystemParametersInfo . There is no animation setting, but maybe if you notify GWES of a different change it will also update the animation state. 来源: https://stackoverflow.com/questions/3268631/disable-ce-windows-animation

Running background services on a PocketPC

十年热恋 提交于 2019-12-03 10:10:33
问题 I've recently bought myself a new cellphone, running Windows Mobile 6.1 Professional. And of course I am currently looking into doing some coding for it, on a hobby basis. My plan is to have a service running as a DLL, loaded by Services.exe. This needs to gather som data, and do som processing at regular intervals (every 5-10 minutes). Since I need to run this at regular intervals, it is a bit of a problem for me, that the system typically goes to sleep (suspend) after a short period of

Exception after upgrading .net compact framework version

百般思念 提交于 2019-12-02 09:00:36
I have upgraded my project from .NET 2.0 to .NET 3.5 through visual studio Project-> Upgrade Project . After upgrade when i compile the project i got the error 'The type 'System.Windows.Forms.DataGridTableStyle' exists in both 'c:\Users\VijayVignesh\Desktop\AGMobile4\Dll\Other\System.Windows.Forms.DataGrid.dll' and 'c:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\System.Windows.Forms.dll''. Typically two dlls are refernced in my project System.Windows.Forms.dll and System.Windows.Forms.DataGrid.dll . So, i decided to remove System.Windows.Forms.DataGrid.dll from the

Start Bar Shows Up Over Maximized Form (Pocket PC 2003)

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 08:33:44
问题 Environment Windows XP SP3 x32 Visual Studio 2005 Standard Windows Mobile/Pocket PC 2003 .NET Compact Framework 1.0 SP3 and .NET Framework 1.1 Honeywell Dolphin 9500 Handheld Barcode Scanner Goal I have a three form application and an external class (Program.cs) that has the application entry point, Main() . The main form loads first and then, from within MainForm_Load(...) , instantiates/shows a new form kind of like a splash screen. I want all three forms to be maximized. All three forms

Start Bar Shows Up Over Maximized Form (Pocket PC 2003)

南笙酒味 提交于 2019-12-02 05:00:17
Environment Windows XP SP3 x32 Visual Studio 2005 Standard Windows Mobile/Pocket PC 2003 .NET Compact Framework 1.0 SP3 and .NET Framework 1.1 Honeywell Dolphin 9500 Handheld Barcode Scanner Goal I have a three form application and an external class (Program.cs) that has the application entry point, Main() . The main form loads first and then, from within MainForm_Load(...) , instantiates/shows a new form kind of like a splash screen. I want all three forms to be maximized. All three forms have the following properties set: this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this

Pocket PC/Windows Mobile: How to detect smart minimize

核能气质少年 提交于 2019-11-30 13:50:17
How do I detect when my Compact Framework application is being smart-minimized (smart minimize is what happens when the user clicks the "X" button in the top-right corner on a Pocket PC)? The Deactivate event isn't the right way because it occurs in circumstances other than minimization, such as when a message box or another form is shown on top of the main form. And the form's WindowState doesn't help because there is no "Minimized" WindowState on .NET CF. I heard that by setting MinimizeBox = false, my app will be closed instead of minimized. But I actually don't want my app to close, I just

Disable sleep mode in Windows Mobile 6

て烟熏妆下的殇ゞ 提交于 2019-11-27 14:11:43
Does anyone know how could I programatically disable/enable sleep mode on Windows Mobile? Thanks! If you want your program to not be put to sleep while it's running, the best way is to create a KeepAlive type function that calls SystemIdleTimerReset, SHIdleTimerReset and simulates a key touch. Then you need to call it a lot, basically everywhere. #include <windows.h> #include <commctrl.h> extern "C" { void WINAPI SHIdleTimerReset(); }; void KeepAlive() { static DWORD LastCallTime = 0; DWORD TickCount = GetTickCount(); if ((TickCount - LastCallTime) > 1000 || TickCount < LastCallTime) // watch

Disable sleep mode in Windows Mobile 6

≯℡__Kan透↙ 提交于 2019-11-26 16:37:35
问题 Does anyone know how could I programatically disable/enable sleep mode on Windows Mobile? Thanks! 回答1: If you want your program to not be put to sleep while it's running, the best way is to create a KeepAlive type function that calls SystemIdleTimerReset, SHIdleTimerReset and simulates a key touch. Then you need to call it a lot, basically everywhere. #include <windows.h> #include <commctrl.h> extern "C" { void WINAPI SHIdleTimerReset(); }; void KeepAlive() { static DWORD LastCallTime = 0;