2002-12-05 16:18:30 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wince/missing.h
|
2003-12-27 12:17:21 -05:00
|
|
|
// Purpose: Missing things in WinCE
|
2002-12-05 16:18:30 -05:00
|
|
|
// Author: Marco Cavallini
|
|
|
|
// Modified by:
|
|
|
|
// Created: 16/11/2002
|
2004-04-04 08:59:29 -04:00
|
|
|
// RCS-ID:
|
2002-12-05 16:18:30 -05:00
|
|
|
// Copyright: (c) KOAN SAS ( www.koansoftware.com )
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2003-03-17 05:34:04 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2002-12-05 16:18:30 -05:00
|
|
|
|
|
|
|
#ifndef _WX_CE_MISSING_H_
|
|
|
|
#define _WX_CE_MISSING_H_
|
|
|
|
|
2003-12-27 12:17:21 -05:00
|
|
|
#include "wx/msw/private.h"
|
|
|
|
#include "shellapi.h"
|
|
|
|
|
2004-04-04 08:59:29 -04:00
|
|
|
inline BOOL IsIconic( HWND WXUNUSED(hWnd) )
|
2003-07-10 17:14:50 -04:00
|
|
|
{
|
|
|
|
// Probably not right...
|
|
|
|
#if 0
|
|
|
|
long style = GetWindowLong(hWnd, GWL_STYLE);
|
|
|
|
return ((style & WS_MINIMIZE) == 0);
|
|
|
|
#endif
|
|
|
|
return FALSE;
|
|
|
|
}
|
2002-12-05 16:18:30 -05:00
|
|
|
|
2004-05-27 07:31:12 -04:00
|
|
|
#ifdef __POCKETPC__
|
2003-11-18 16:25:44 -05:00
|
|
|
#define SM_CXCURSOR 13
|
|
|
|
#define SM_CYCURSOR 14
|
|
|
|
#endif
|
2002-12-05 16:18:30 -05:00
|
|
|
|
2003-12-27 12:17:21 -05:00
|
|
|
// Missing from eVC 4 for some reason
|
|
|
|
#ifndef I_IMAGENONE
|
|
|
|
#define I_IMAGENONE (-2)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef TBSTYLE_NO_DROPDOWN_ARROW
|
|
|
|
#define TBSTYLE_NO_DROPDOWN_ARROW 0x0080
|
|
|
|
#endif
|
|
|
|
|
2004-04-20 14:52:01 -04:00
|
|
|
#if _WIN32_WCE >= 400 && !defined(SHCMBM_GETMENU)
|
2004-04-04 08:59:29 -04:00
|
|
|
|
2003-12-27 12:17:21 -05:00
|
|
|
// aygshell.h missing from eVC 4 for some reason
|
2004-04-20 14:52:01 -04:00
|
|
|
// NB not missing from Pocket PC 2003, hence the test for SHCMBM_GETMENU
|
|
|
|
|
2003-12-27 12:17:21 -05:00
|
|
|
#define SHCMBM_GETMENU (WM_USER + 402)
|
|
|
|
#define SHCMBM_SETSUBMENU (WM_USER + 400) // wparam == id of button, lParam == hmenu, return is old hmenu
|
|
|
|
#define SHCMBM_GETSUBMENU (WM_USER + 401) // lParam == ID
|
|
|
|
#define SHCMBM_GETMENU (WM_USER + 402) // get the owning hmenu (as specified in the load resource)
|
|
|
|
|
|
|
|
#define SHIDIF_DONEBUTTON 0x0001
|
|
|
|
#define SHIDIF_SIZEDLG 0x0002
|
|
|
|
#define SHIDIF_SIZEDLGFULLSCREEN 0x0004
|
|
|
|
#define SHIDIF_SIPDOWN 0x0008
|
|
|
|
#define SHIDIF_FULLSCREENNOMENUBAR 0x0010
|
|
|
|
#define SHIDIF_EMPTYMENU 0x0020
|
|
|
|
|
|
|
|
#define SHFS_SHOWTASKBAR 0x0001
|
|
|
|
#define SHFS_HIDETASKBAR 0x0002
|
|
|
|
#define SHFS_SHOWSIPBUTTON 0x0004
|
|
|
|
#define SHFS_HIDESIPBUTTON 0x0008
|
|
|
|
#define SHFS_SHOWSTARTICON 0x0010
|
|
|
|
#define SHFS_HIDESTARTICON 0x0020
|
|
|
|
|
|
|
|
typedef struct tagSHMENUBARINFO
|
|
|
|
{
|
|
|
|
DWORD cbSize; // IN - Indicates which members of struct are valid
|
2004-04-04 08:59:29 -04:00
|
|
|
HWND hwndParent; // IN
|
2003-12-27 12:17:21 -05:00
|
|
|
DWORD dwFlags; // IN - Some features we want
|
|
|
|
UINT nToolBarId; // IN - Which toolbar are we using
|
|
|
|
HINSTANCE hInstRes; // IN - Instance that owns the resources
|
|
|
|
int nBmpId;
|
|
|
|
int cBmpImages; // IN - Count of bitmap images
|
2004-04-04 08:59:29 -04:00
|
|
|
HWND hwndMB; // OUT
|
2003-12-27 12:17:21 -05:00
|
|
|
COLORREF clrBk; // IN - background color of the menu bar (excluding sip)
|
|
|
|
} SHMENUBARINFO, *PSHMENUBARINFO;
|
|
|
|
|
2004-04-04 08:59:29 -04:00
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
BOOL SHFullScreen(HWND hwndRequester, DWORD dwState);
|
2003-12-27 12:17:21 -05:00
|
|
|
|
2004-04-04 08:59:29 -04:00
|
|
|
WINSHELLAPI BOOL SHCreateMenuBar(SHMENUBARINFO *pmbi);
|
2003-12-27 12:17:21 -05:00
|
|
|
}
|
|
|
|
|
2004-04-04 08:59:29 -04:00
|
|
|
#endif // _WIN32_WCE >= 400
|
2003-12-23 04:18:16 -05:00
|
|
|
|
|
|
|
// Used in msgdlg.cpp, evtloop.cpp
|
|
|
|
#ifndef MB_TASKMODAL
|
|
|
|
#define MB_TASKMODAL 0x2000
|
|
|
|
#endif
|
|
|
|
|
2004-04-04 08:59:29 -04:00
|
|
|
#ifndef HGDI_ERROR
|
|
|
|
#define HGDI_ERROR ((HANDLE)(0xFFFFFFFFL))
|
2003-07-10 17:14:50 -04:00
|
|
|
#endif
|
|
|
|
|
2004-04-13 08:25:56 -04:00
|
|
|
// some windows styles don't exist in CE SDK, replace them with closest
|
|
|
|
// equivalents
|
|
|
|
#ifndef WS_THICKFRAME
|
|
|
|
#define WS_THICKFRAME WS_BORDER
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef WS_MINIMIZE
|
|
|
|
#define WS_MINIMIZE 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef WS_MAXIMIZE
|
|
|
|
#define WS_MAXIMIZE 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2004-04-04 08:59:29 -04:00
|
|
|
// global memory functions don't exist under CE (good riddance, of course, but
|
|
|
|
// the existing code still uses them in some places, so make it compile)
|
|
|
|
//
|
|
|
|
// update: they're defined in eVC 4 inside "#ifdef UNDER_CE" block
|
|
|
|
#ifndef UNDER_CE
|
|
|
|
#define GlobalAlloc LocalAlloc
|
|
|
|
#define GlobalFree LocalFree
|
|
|
|
#define GlobalSize LocalSize
|
|
|
|
#define GPTR LPTR
|
|
|
|
#define GHND LPTR
|
|
|
|
#define GMEM_MOVEABLE 0
|
|
|
|
#define GMEM_SHARE 0
|
|
|
|
#endif // !UNDER_CE
|
|
|
|
|
|
|
|
// WinCE RTL doesn't implement bsearch() used in encconv.cpp
|
|
|
|
extern "C" void *
|
|
|
|
bsearch(const void *key, const void *base, size_t num, size_t size,
|
|
|
|
int (wxCMPFUNC_CONV *cmp)(const void *, const void *));
|
2002-12-05 16:18:30 -05:00
|
|
|
|
2004-09-28 03:45:37 -04:00
|
|
|
#define O_RDONLY 0x0000 /* open for reading only */
|
|
|
|
#define O_WRONLY 0x0001 /* open for writing only */
|
|
|
|
#define O_RDWR 0x0002 /* open for reading and writing */
|
|
|
|
#define O_APPEND 0x0008 /* writes done at eof */
|
|
|
|
|
|
|
|
#define O_CREAT 0x0100 /* create and open file */
|
|
|
|
#define O_TRUNC 0x0200 /* open and truncate */
|
|
|
|
#define O_EXCL 0x0400 /* open only if file doesn't already exist */
|
|
|
|
|
|
|
|
#define O_TEXT 0x4000 /* file mode is text (translated) */
|
|
|
|
#define O_BINARY 0x8000 /* file mode is binary (untranslated) */
|
|
|
|
|
2002-12-05 16:18:30 -05:00
|
|
|
#endif // _WX_CE_MISSING_H_
|
2004-04-04 08:59:29 -04:00
|
|
|
|