wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int hotSpotY)
{
- m_refData = new wxIconRefData;
+ m_refData = new wxCursorRefData;
M_CURSORDATA->m_destroyCursor = FALSE;
M_CURSORDATA->m_hCursor = 0;
M_CURSORDATA->m_ok = FALSE;
if (flags & wxBITMAP_TYPE_CUR_RESOURCE)
{
+#ifdef __WIN95__
+ M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadImage(wxGetInstance(), cursor_file, IMAGE_CURSOR, 0, 0, 0);
+#else
M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), cursor_file);
+#endif
if (M_CURSORDATA->m_hCursor)
M_CURSORDATA->m_ok = TRUE;
else
}
else if (flags & wxBITMAP_TYPE_CUR)
{
+#ifdef __WIN95__
+ M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadImage(wxGetInstance(), cursor_file, IMAGE_CURSOR, 0, 0, LR_LOADFROMFILE);
+#else
#if wxUSE_RESOURCE_LOADING_IN_MSW
M_CURSORDATA->m_hCursor = (WXHCURSOR) ReadCursorFile(WXSTRINGCAST cursor_file, wxGetInstance(), &M_CURSORDATA->m_width, &M_CURSORDATA->m_height);
M_CURSORDATA->m_destroyCursor = TRUE;
+#endif
#endif
}
else if (flags & wxBITMAP_TYPE_ICO)
#if wxUSE_RESOURCE_LOADING_IN_MSW
HBITMAP hBitmap = 0;
HPALETTE hPalette = 0;
- bool success = ReadDIB(MBSTRINGCAST cursor_file.mb_str(wxConvFile), &hBitmap, &hPalette) != 0;
+ bool success = ReadDIB(WXSTRINGCAST cursor_file, &hBitmap, &hPalette) != 0;
if (!success)
return;
if (hPalette)
// Cursors by stock number
wxCursor::wxCursor(int cursor_type)
{
- m_refData = new wxIconRefData;
+ m_refData = new wxCursorRefData;
switch (cursor_type)
{