********************************************************************** * WCE ********************************************************************** ********************************************************************** Time-stamp: <12/01/02 07:52:40 keuchel@netwave.de> ********************************************************************** * Under WINCE, dlls cannot link to exports from exe files. On WinNT that's possible. * Under WINCE300, shared library sections are possible. Under WINCE211, the dll is linked without error, but the segments are *not* shared. You have to use FileMappings when you want to support WCE211. * WinCE has a limit in DLL load capacity. It stopped after loading the 138th small dll, although there was lots of RAM free. I had to combine the dlls. * The MIPS compiler generates incorrect code for old-style vararg functions when these are not declared using (...) (which is normal in old style code) and have less then 4 args. You have to write a va_alist/va_dcl that contains 4 variables, so the args that are passed in regs are always copied to the stack. * The ARM compiler might generate code that does unaligned memory accesses when you add/sub small odd constants to/from pointers, even when you cast these pointers to long. When you use variables instead of constants, it works. The compiler normally seems to generate a kind of "optimization" with strange 'or' instructions. * When closing sockets on WINCE211, not all data might be flushed when the client gets FIN and client and server are on the same wince device. I don't know how to workaround this. * WSAAsyncSelect is not supported. You can write a thread func that does select() and a WSAAsyncSelect() routine that registers sockets, window handles, messages and events in an array. The select thread then posts messages to the registered windows when sockets change state. ********************************************************************** WM_GETFONT: The return value is a handle to the font used by the control, or *NULL if the control is using the system font*. The WM_GETFONT message does not return a font handle if the message is sent to a dialog box created by the DialogBoxParam, DialogBoxIndirectParam, CreateDialogParam, or CreateDialogIndirectParam functions. ********************************************************************** Be careful when using common controls in non-unicode compilations! The message macros have different values for A and W, and the A macros are used in non-unicode builds *and they dont work*! I have just spent several hours (!) guessing what is wrong, until I looked in the header: #define TVM_INSERTITEMA (TV_FIRST + 0) #define TVM_INSERTITEMW (TV_FIRST + 50) #ifdef UNICODE #define TVM_INSERTITEM TVM_INSERTITEMW #else #define TVM_INSERTITEM TVM_INSERTITEMA #endif Why do these %*#&! include ANSI macros and functions when they don't work? ********************************************************************** MFC-Apps for HPC/WCE300 crash on PPC/WCE300. ********************************************************************** Dynamic menus are difficult. It seems that you have to load a dummy menu from resources, clear it and copy popups to it. This way, you can emulate SetMenu(). When a child window (menubar) disturbs your window hierarchy, it might be a solution to create the menubar in a toplevel (overlapped) window.