On Sun, Oct 26, 2008 at 02:34:02PM +0000, Pedro Alves wrote:
> On Sunday 26 October 2008 00:35:14, Eric House wrote:
> > On Sat, Oct 25, 2008 at 11:45:18PM +0100, Pedro Alves wrote:
> > > On Saturday 25 October 2008 18:13:00, Eric House wrote:
> > >
> > > > If there's a bug it's that the headers reference W and A versions and
> > > > turn SHGetSpecialFolderPath into one of them.
> > >
> > > Are you defining _WIN32_IE for some reason? If for no good reason,
> > > don't do it. Also, include shellapi.h to pick the correct declaration.
> >
> > My app doesn't compile without _WIN32_IE defined. I'm using
> > TBBUTTONINFO structs and the TB_GETBUTTONINFO message to manipulate
> > the soft keys on Smartphone. The struct is only available if
> > _WIN32_IE is defined.
>
> That is a bug then. Relying on _WIN32_IE on Windows CE is nonsense.
Ok. I took _WIN32_IE out of my Makefile and kept modifying commctrl.h
until the app would compile again. Once that was done, as you
predicted, I was able to link against SHGetSpecialFolderPath without
#undefing it locally.
I looked up TBBUTTONINFO on msdn and found that it's valid for CE 3.0
and later, and so figured the right change was
-#if (_WIN32_IE >= 0x0400)
+#if (_WIN32_IE >= 0x0400) || (_WIN32_WCE >= 0x0300)
But I had to modify #if (_WIN32_IE >= 0x0N00) in a dozen or so places
and did not check any more of them with MSDN. Please confirm that the
attached patch is on the right track and I'll try to figure out the
best test in each location (or break out the constants I can test into
their own blocks) then resubmit.
Thanks,
--Eric
--
******************************************************************************
* From the desktop of: Eric House, [EMAIL PROTECTED] *
* Crosswords 4.1.4 for PalmOS now ARM-native: xwords.sourceforge.net *
******************************************************************************
Index: cegcc/src/w32api/include/commctrl.h
===================================================================
--- cegcc/src/w32api/include/commctrl.h (revision 1200)
+++ cegcc/src/w32api/include/commctrl.h (working copy)
@@ -400,7 +400,7 @@
#define HDN_GETDISPINFOA (HDN_FIRST-9)
#define HDN_GETDISPINFOW (HDN_FIRST-29)
#endif
-#if (_WIN32_IE >= 0x0400)
+#if (_WIN32_IE >= 0x0400) || (_WIN32_WCE >= 0x0300)
#define HICF_OTHER 0x00
#define HICF_MOUSE 0x01
#define HICF_ARROWKEYS 0x02
@@ -418,7 +418,7 @@
#define IPM_SETRANGE (WM_USER+103)
#define IPM_SETFOCUS (WM_USER+104)
#define IPM_ISBLANK (WM_USER+105)
-#if (_WIN32_IE >= 0x0500)
+#if (_WIN32_IE >= 0x0500) || (_WIN32_WCE >= 0x0300)
#define I_INDENTCALLBACK (-1)
#define I_IMAGENONE (-2)
#endif
@@ -432,7 +432,7 @@
#if (_WIN32_IE >= 0x0300)
#define TBSTATE_ELLIPSES 0x40
#endif
-#if (_WIN32_IE >= 0x0400)
+#if (_WIN32_IE >= 0x0400) || (_WIN32_WCE >= 0x0300)
#define TBSTATE_MARKED 0x0080
#endif
#define TBSTYLE_BUTTON 0
@@ -440,10 +440,10 @@
#define TBSTYLE_CHECK 2
#define TBSTYLE_GROUP 4
#define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP|TBSTYLE_CHECK)
-#if (_WIN32_IE >= 0x0300)
+#if (_WIN32_IE >= 0x0300) || (_WIN32_WCE >= 0x0300)
#define TBSTYLE_DROPDOWN 8
#endif
-#if (_WIN32_IE >= 0x0400)
+#if (_WIN32_IE >= 0x0400) || (_WIN32_WCE >= 0x0300)
#define TBSTYLE_AUTOSIZE 16
#define TBSTYLE_NOPREFIX 32
#endif
@@ -595,7 +595,7 @@
#define TB_SETMAXTEXTROWS (WM_USER+60)
#define TB_GETTEXTROWS (WM_USER+61)
#endif
-#if _WIN32_IE >= 0x400
+#if (_WIN32_IE >= 0x400) || (_WIN32_WCE >= 0x0300)
#define TB_GETOBJECT (WM_USER+62)
#define TB_GETBUTTONINFOW (WM_USER+63)
#define TB_SETBUTTONINFOW (WM_USER+64)
@@ -831,7 +831,7 @@
#if (_WIN32_IE >= 0x0501)
#define TBS_DOWNISLEFT 0x0400
#endif
-#if _WIN32_IE >= 0x400
+#if (_WIN32_IE >= 0x400) || (_WIN32_WCE >= 0x0300)
#define TBIF_BYINDEX 0x80000000
#define TBIF_COMMAND 32
#define TBIF_IMAGE 1
@@ -2028,7 +2028,7 @@
int iString;
} TBBUTTON,*PTBBUTTON,*LPTBBUTTON;
typedef const TBBUTTON *LPCTBBUTTON;
-#if _WIN32_IE >= 0x400
+#if (_WIN32_IE >= 0x400) || (_WIN32_WCE >= 0x0300)
typedef struct {
UINT cbSize;
DWORD dwMask;
@@ -3426,7 +3426,7 @@
#define TB_SAVERESTORE TB_SAVERESTOREW
#define TB_ADDSTRING TB_ADDSTRINGW
#define TBN_GETBUTTONINFO TBN_GETBUTTONINFOW
-#if _WIN32_IE >= 0x400
+#if (_WIN32_IE >= 0x400) || (_WIN32_WCE >= 0x0300)
#define TB_GETBUTTONINFO TB_GETBUTTONINFOW
#define TB_SETBUTTONINFO TB_SETBUTTONINFOW
#define TB_INSERTBUTTON TB_INSERTBUTTONW
@@ -3613,7 +3613,7 @@
#define TB_SAVERESTORE TB_SAVERESTOREA
#define TB_ADDSTRING TB_ADDSTRINGA
#define TBN_GETBUTTONINFO TBN_GETBUTTONINFOA
-#if _WIN32_IE >= 0x400
+#if (_WIN32_IE >= 0x400) || (_WIN32_WCE >= 0x0300)
#define TBBUTTONINFO TBBUTTONINFOA
#define LPTBBUTTONINFO LPTBBUTTONINFOA
#endif
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel