missing.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/msw/wince/missing.h
  3. // Purpose: Missing things in WinCE
  4. // Author: Marco Cavallini
  5. // Modified by:
  6. // Created: 16/11/2002
  7. // Copyright: (c) KOAN SAS ( www.koansoftware.com )
  8. // Licence: wxWindows licence
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_CE_MISSING_H_
  11. #define _WX_CE_MISSING_H_
  12. #include "wx/msw/private.h"
  13. #include "shellapi.h"
  14. inline BOOL IsIconic( HWND WXUNUSED(hWnd) )
  15. {
  16. // Probably not right...
  17. #if 0
  18. long style = GetWindowLong(hWnd, GWL_STYLE);
  19. return ((style & WS_MINIMIZE) == 0);
  20. #endif
  21. return FALSE;
  22. }
  23. #ifdef __POCKETPC__
  24. #define SM_CXCURSOR 13
  25. #define SM_CYCURSOR 14
  26. #endif
  27. // Missing from eVC 4 for some reason
  28. #ifndef I_IMAGENONE
  29. #define I_IMAGENONE (-2)
  30. #endif
  31. #ifndef TBSTYLE_NO_DROPDOWN_ARROW
  32. #define TBSTYLE_NO_DROPDOWN_ARROW 0x0080
  33. #endif
  34. #ifndef SHCMBM_GETMENU
  35. #define SHCMBM_GETMENU (WM_USER + 402)
  36. #endif
  37. #ifndef SHCMBM_SETSUBMENU
  38. #define SHCMBM_SETSUBMENU (WM_USER + 400) // wparam == id of button, lParam == hmenu, return is old hmenu
  39. #endif
  40. #ifndef SHCMBM_GETSUBMENU
  41. #define SHCMBM_GETSUBMENU (WM_USER + 401) // lParam == ID
  42. #endif
  43. #ifndef LVS_EX_FULLROWSELECT
  44. #define LVS_EX_FULLROWSELECT 0x00000020
  45. #endif
  46. #ifndef TVS_FULLROWSELECT
  47. #define TVS_FULLROWSELECT 0x1000
  48. #endif
  49. #ifndef TVM_SETBKCOLOR
  50. #define TVM_SETBKCOLOR (TV_FIRST + 29)
  51. #define TVM_SETTEXTCOLOR (TV_FIRST + 30)
  52. #endif
  53. // Used in msgdlg.cpp, evtloop.cpp
  54. #ifndef MB_TASKMODAL
  55. #define MB_TASKMODAL 0x2000
  56. #endif
  57. #ifndef HGDI_ERROR
  58. #define HGDI_ERROR ((HANDLE)(0xFFFFFFFFL))
  59. #endif
  60. // some windows styles don't exist in CE SDK, replace them with closest
  61. // equivalents
  62. #ifndef WS_THICKFRAME
  63. #define WS_THICKFRAME WS_BORDER
  64. #endif
  65. #ifndef WS_MINIMIZE
  66. #define WS_MINIMIZE 0
  67. #endif
  68. #ifndef WS_MAXIMIZE
  69. #define WS_MAXIMIZE 0
  70. #endif
  71. // global memory functions don't exist under CE (good riddance, of course, but
  72. // the existing code still uses them in some places, so make it compile)
  73. //
  74. // update: they're defined in eVC 4 inside "#ifdef UNDER_CE" block
  75. #ifndef UNDER_CE
  76. #define GlobalAlloc LocalAlloc
  77. #define GlobalFree LocalFree
  78. #define GlobalSize LocalSize
  79. #define GPTR LPTR
  80. #define GHND LPTR
  81. #define GMEM_MOVEABLE 0
  82. #define GMEM_SHARE 0
  83. #endif // !UNDER_CE
  84. // WinCE RTL doesn't implement bsearch() used in encconv.cpp
  85. extern "C" void *
  86. bsearch(const void *key, const void *base, size_t num, size_t size,
  87. int (wxCMPFUNC_CONV *cmp)(const void *, const void *));
  88. #define O_RDONLY 0x0000 /* open for reading only */
  89. #define O_WRONLY 0x0001 /* open for writing only */
  90. #define O_RDWR 0x0002 /* open for reading and writing */
  91. #define O_APPEND 0x0008 /* writes done at eof */
  92. #define O_CREAT 0x0100 /* create and open file */
  93. #define O_TRUNC 0x0200 /* open and truncate */
  94. #define O_EXCL 0x0400 /* open only if file doesn't already exist */
  95. #define O_TEXT 0x4000 /* file mode is text (translated) */
  96. #define O_BINARY 0x8000 /* file mode is binary (untranslated) */
  97. #ifndef SS_SUNKEN
  98. #define SS_SUNKEN 0x00001000L
  99. #endif
  100. // unsupported flags for WINDOWPOS structure
  101. #ifndef SWP_NOCOPYBITS
  102. #define SWP_NOCOPYBITS 0
  103. #endif
  104. #ifndef SWP_NOOWNERZORDER
  105. #define SWP_NOOWNERZORDER 0
  106. #endif
  107. #ifndef SWP_NOSENDCHANGING
  108. #define SWP_NOSENDCHANGING 0
  109. #endif
  110. #endif // _WX_CE_MISSING_H_