]> git.saurik.com Git - wxWidgets.git/blame - docs/msw/wince/guidelines.txt
Regenerated makefiles.
[wxWidgets.git] / docs / msw / wince / guidelines.txt
CommitLineData
368c9c6d
JS
1General guidelines for
2wxWin/CE porting contributors.
3
41.
5define __WXMSW__ when __WXWINCE__ is defined.
6In other words:
7both __WXMSW__ and __WXWINCE__ defined => wxWinCE compilation
8just __WXMSW__ defined => wxMSW compilation
9Because: Not defining __WXMSW__ for wxWinCE port means that all code doing anything
10Win32-specific would need to be changed to work with wxWinCE which doesn't
11seem at all like a good idea. (VZ)
12
132.
14Shorter way is preferred
15#if (defined(STRICT) || defined(__GNUC__)) && !defined(__WXWINCE__)
16Because: Shorter code, single case intead of multiple one (JS)
17
183.
19it's a good idea to separate GUI details from platform details.
20It would seem logical to do the same for Windows with WIN32 for the "system"
21functions and WXMSW and WXWINCE for the places where GUI's are different.
22If something is really a WIN32 function, #ifdef WIN32 seems much more
23logical than "#if defined(__WXMSW__) || defined(__WXWINCE__)"
24Because: Just imagine all the common unix stuff where within "#if defined(__WXGTK__)||
25defined(__WXMOTIF__)||defined(__WXX11)" and the mess that would create
26when trying to compile any of those 3 ports on OS/2, Windows or MacOS. (SN)
27
284.
29Project that are not involved with the DLL creation should be stored in another level.
30Maybe something like /src/msw/wince/mywxbase
31Because: The main directory remain clearer. (MC)
32
335. Definitely do not use #if defined (__WXWINCE__) in common headers or not MSW headers (JS)
34
35
366. Note that wx/msw/private.h shouldn't be included neither from the
37headers -- only from the .cpp files. And there you should include it after
38everything, i.e.:
39#include "wx/dc.h"
40...
41#include "wx/msw/private.h"
42(VZ)
43
44 Marco Cavallini
45www.koansoftware.com