English 中文(简体)
Is there any macro to differentiate between WinCE emulator and WinCE device?
原标题:

I need to perform some file operations on WinCE platform. The paths of file differ in Device compared to Emulator. So i need to choose file according to the environment, like below.

#if defined(WINCE_EMULATOR) //This macro is just for illustration
   #define path ".Storage Card\1.txt" //Emulator configuration
#else
   #define path "\My DocumentsStorage Card\1.txt" //Device configuration
#endif

Is there any macro to differentiate between WinCE emulator and WinCE device ?

最佳回答

There isn t a macro to check this, and couldn t be - the compiler has no idea what target you re going to run on. You have to do a run-time check using something like SystemParametersInfo with SPI_GETOEMINFO and look for emulator-specific text (IIRC it returns something like "Microsoft DeviceEmulator").

问题回答

暂无回答




相关问题
Problem statically linking MFC libraries

I have a Visual Studio 6 workspace I m trying to convert to a Visual Studio 2008 solution. The output of said solution is a .dll. It has to be a .dll and it needs to statically link MFC as I can t ...

Switching to WPF. Is it time?

I m considering switching from MFC to WPF. My first concern is that there are too many users who don t have .NET with WPF installed yet. Can anybody point to a source containing the WPF penetration ...

Crash within CString

I am observing a crash within my application and the call stack shows below mfc42u!CString::AllocBeforeWrite+5 mfc42u!CString::operator=+22 No idea why this occuring. This does not occur ...

C# for UI, c++ for library

I have a numerical library coded in C++. I am going to make a UI for the library. I know some MFC. So one solution is to use MFC and make a native application. The alternative is C#. I know nothing ...

Search by using the keyboard in a list/grid - algorithm

I need to implement a custom search in a grid and I would like to find some user interface guidelines that explain the standard way to implement it. I mean this kind of search that is initiated by ...

MFC List Control

In MFC, I can edit the text of items in the list control but only for the first column by setting the Edit Labels to true. Now when I click the first column item to change its text, I m able to change ...

热门标签