www.digitalmars.com         C & C++   DMDScript  

c++.wxwindows - INITCOMMONCONTROLSEX missing

reply Craig Bowlas <craigbowlas yahoo.co.uk> writes:
Hi,

When I attempt to build the new development snapshot (2.5.4) I get a
compilation error in datectrl.cpp to the effect that the type
INITCOMMONCONTROLSEX is not defined.  This is a windows common control item
and presumably should be included via windows.h, but does not appear to be
in my version of this file.  I have the windows stuff from the digital mars
CD and have patched the compiler to the current level.

Does anyone know what the correct course of action should be to correct
this problem.  I have currently just commented out the affected function.

Regards

Craig
Feb 26 2005
next sibling parent reply Arjan Knepper <arjan ask.me> writes:
Craig Bowlas wrote:
 Hi,
 
 When I attempt to build the new development snapshot (2.5.4) I get a
 compilation error in datectrl.cpp to the effect that the type
 INITCOMMONCONTROLSEX is not defined.  This is a windows common control item
 and presumably should be included via windows.h, but does not appear to be
 in my version of this file.  I have the windows stuff from the digital mars
 CD and have patched the compiler to the current level.
 
 Does anyone know what the correct course of action should be to correct
 this problem.  I have currently just commented out the affected function.
 
 Regards
 
 Craig
Use the latest platform SDK from MS. Arjan
Feb 26 2005
parent reply Hakki Dogusan <dogusanh tr.net> writes:
Hi,

Arjan Knepper wrote:
 Craig Bowlas wrote:
 
 Hi,

 When I attempt to build the new development snapshot (2.5.4) I get a
 compilation error in datectrl.cpp to the effect that the type
 INITCOMMONCONTROLSEX is not defined.  This is a windows common control 
 item
 and presumably should be included via windows.h, but does not appear 
 to be
 in my version of this file.  I have the windows stuff from the digital 
 mars
 CD and have patched the compiler to the current level.

 Does anyone know what the correct course of action should be to correct
 this problem.  I have currently just commented out the affected function.

 Regards

 Craig
Use the latest platform SDK from MS. Arjan
Could you give some details, please ? - Does that mean putting ms-sdk lib/include directories in front of dm's - Copy files from ms-sdk to dm's related directories - ... ? Thanks -- Regards, Hakki Dogusan
Feb 27 2005
parent Arjan Knepper <arjan ask.me> writes:
Hakki Dogusan wrote:
 Hi,
 
 Arjan Knepper wrote:
 
 Craig Bowlas wrote:

 Hi,

 When I attempt to build the new development snapshot (2.5.4) I get a
 compilation error in datectrl.cpp to the effect that the type
 INITCOMMONCONTROLSEX is not defined.  This is a windows common 
 control item
 and presumably should be included via windows.h, but does not appear 
 to be
 in my version of this file.  I have the windows stuff from the 
 digital mars
 CD and have patched the compiler to the current level.

 Does anyone know what the correct course of action should be to correct
 this problem.  I have currently just commented out the affected 
 function.

 Regards

 Craig
Use the latest platform SDK from MS. Arjan
Could you give some details, please ? - Does that mean putting ms-sdk lib/include directories in front of dm's
That is what I normally do. And convert/import the libs when needed.
 - Copy files from ms-sdk to dm's related directories
No I try not to touch those. I changed the sc.ini file for the include and lib to make sure the MS-SDK is always the first. Arjan
Feb 27 2005
prev sibling parent reply chris elliott <biol75 york.ac.uk> writes:
Hi, the usual wxWindows response to these undefined windows controls is 
to add them to the missing.h file

I am testing this for CVS currently...

chris

Craig Bowlas wrote:
 Hi,
 
 When I attempt to build the new development snapshot (2.5.4) I get a
 compilation error in datectrl.cpp to the effect that the type
 INITCOMMONCONTROLSEX is not defined.  This is a windows common control item
 and presumably should be included via windows.h, but does not appear to be
 in my version of this file.  I have the windows stuff from the digital mars
 CD and have patched the compiler to the current level.
 
 Does anyone know what the correct course of action should be to correct
 this problem.  I have currently just commented out the affected function.
 
 Regards
 
 Craig
Feb 28 2005
parent chris elliott <biol75 york.ac.uk> writes:
put this in include\wx\msw\missing.h

#ifdef __DMC__
#define DATETIMEPICK_CLASSW L"SysDateTimePick32"
#define DATETIMEPICK_CLASSA "SysDateTimePick32"

#define ICC_DATE_CLASSES 256

#if (_WIN32_IE >= 0x0300)
typedef struct tagINITCOMMONCONTROLSEX {
	DWORD dwSize;
	DWORD dwICC;
} INITCOMMONCONTROLSEX,*LPINITCOMMONCONTROLSEX;

#define GDTR_MIN 1
#define GDTR_MAX 2

#define GDT_ERROR -1
#define GDT_VALID 0
#define GDT_NONE 1


#define DTS_UPDOWN 1
#define DTS_SHOWNONE 2
#define DTS_SHORTDATEFORMAT 0
#define DTS_LONGDATEFORMAT 4
#define DTS_TIMEFORMAT 9
#define DTS_APPCANPARSE 16
#define DTS_RIGHTALIGN 32
#if ( _WIN32_IE >= 0x500 )
#define DTS_SHORTDATECENTURYFORMAT	0x000C
#endif /* _WIN32_IE >= 0x500 */
#endif



#define DATETIMEPICK_CLASSW L"SysDateTimePick32"
#define DATETIMEPICK_CLASSA "SysDateTimePick32"

#ifdef UNICODE
     #define DATETIMEPICK_CLASS DATETIMEPICK_CLASSW
#else
     #define DATETIMEPICK_CLASS DATETIMEPICK_CLASSA
#endif

#define DTM_GETSYSTEMTIME 0x1001
#define DTM_SETSYSTEMTIME 0x1002
#define DTM_GETRANGE 0x1003
#define DTM_SETRANGE 0x1004
#define DTN_DATETIMECHANGE ((UINT)-759)

#define DateTime_GetMonthCal(hwnd) SNDMSG(hwnd, DTM_GETMONTHCAL, 0, 0)
#define DateTime_GetMonthCalColor(hwnd, icolor) SNDMSG(hwnd, 
DTM_GETMONTHCAL, (WPARAM)icolor,0)
#define DateTime_GetMonthCalFont(hwnd) SNDMSG(hwnd,DTM_GETMCFONT,0,0)
#define DateTime_GetRange(hwnd,lpsystimearray) 
SNDMSG(hwnd,DTM_GETRANGE,0,(LPARAM)lpsystimearray)
#define DateTime_GetSystemTime(hwnd,lpsystime) 
SNDMSG(hwnd,DTM_GETSYSTEMTIME,0,(LPARAM)lpsystime)
#define DateTime_SetFormat(hwnd,lpszformat) 
SNDMSG(hwnd,DTM_SETFORMAT,0,(LPARAM)lpszformat)
#define DateTime_SetMonthCalColor(hwnd,icolor,clr) 
SNDMSG(hwnd,DTM_SETMCCOLOR,(WPARAM)icolor,(LPARAM)clr)
#define DateTime_SetMonthCalFont(hwnd,hfont,lparam) 
SNDMSG(hwnd,DTM_SETMCFONT,(WPARAM)hfont,(LPARAM)lparam)
#define DateTime_SetRange(hwnd,flags,lpsystimearray) 
SNDMSG(hwnd,DTM_SETRANGE,(WPARAM)flags,(LPARAM)lpsystimearray)
#define DateTime_SetSystemTime(hwnd,flag,lpsystime) 
SNDMSG(hwnd,DTM_SETSYSTEMTIME,(WPARAM)flag,(LPARAM)lpsystime)


#endif //__DMC__ date time control IDs

#if defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 2, 4 ) || defined 
(__DMC__)
typedef struct tagNMDATETIMECHANGE
{
     NMHDR       nmhdr;
     DWORD       dwFlags;
     SYSTEMTIME  st;
} NMDATETIMECHANGE;
#endif // old gcc headers

You will need to remove the last #if defined from src/msw/datectrl.cpp

Hope this helps

chris

chris elliott wrote:
 Hi, the usual wxWindows response to these undefined windows controls is 
 to add them to the missing.h file
 
 I am testing this for CVS currently...
 
 chris
 
 Craig Bowlas wrote:
 
 Hi,

 When I attempt to build the new development snapshot (2.5.4) I get a
 compilation error in datectrl.cpp to the effect that the type
 INITCOMMONCONTROLSEX is not defined.  This is a windows common control 
 item
 and presumably should be included via windows.h, but does not appear 
 to be
 in my version of this file.  I have the windows stuff from the digital 
 mars
 CD and have patched the compiler to the current level.

 Does anyone know what the correct course of action should be to correct
 this problem.  I have currently just commented out the affected function.

 Regards

 Craig
Feb 28 2005