wrapcctl.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/msw/wrapcctl.h
  3. // Purpose: Wrapper for the standard <commctrl.h> header
  4. // Author: Vadim Zeitlin
  5. // Modified by:
  6. // Created: 03.08.2003
  7. // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
  8. // Licence: wxWindows licence
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_MSW_WRAPCCTL_H_
  11. #define _WX_MSW_WRAPCCTL_H_
  12. #include "wx/msw/wrapwin.h"
  13. #include <commctrl.h>
  14. // define things which might be missing from our commctrl.h
  15. #include "wx/msw/missing.h"
  16. // Set Unicode format for a common control
  17. inline void wxSetCCUnicodeFormat(HWND WXUNUSED_IN_WINCE(hwnd))
  18. {
  19. #ifndef __WXWINCE__
  20. ::SendMessage(hwnd, CCM_SETUNICODEFORMAT, wxUSE_UNICODE, 0);
  21. #else // !__WXWINCE__
  22. // here it should be already in Unicode anyhow
  23. #endif // __WXWINCE__/!__WXWINCE__
  24. }
  25. #if wxUSE_GUI
  26. // Return the default font for the common controls
  27. //
  28. // this is implemented in msw/settings.cpp
  29. class wxFont;
  30. extern wxFont wxGetCCDefaultFont();
  31. // this is just a wrapper for HDITEM which we can't use in the public header
  32. // because we don't want to include commctrl.h (and hence windows.h) from there
  33. struct wxHDITEM : public HDITEM
  34. {
  35. wxHDITEM()
  36. {
  37. ::ZeroMemory(this, sizeof(*this));
  38. }
  39. };
  40. #endif // wxUSE_GUI
  41. #endif // _WX_MSW_WRAPCCTL_H_