virtual void OnExit()
{
- delete gs_globalCursor;
- gs_globalCursor = NULL;
+ wxDELETE(gs_globalCursor);
}
};
switch ( kind )
{
case wxBITMAP_TYPE_CUR_RESOURCE:
- hcursor = ::LoadCursor(wxGetInstance(), filename.fn_str());
+ hcursor = ::LoadCursor(wxGetInstance(), filename.t_str());
break;
#ifndef __WXWINCE__
case wxBITMAP_TYPE_CUR:
- hcursor = ::LoadCursorFromFile(filename.fn_str());
+ hcursor = ::LoadCursorFromFile(filename.t_str());
break;
#endif
if ( !hcursor )
{
+ if ( !stdCursor.isStd )
+ {
+ // it may be not obvious to the programmer why did loading fail,
+ // try to help by pointing to the by far the most probable reason
+ wxFAIL_MSG(wxT("Loading a cursor defined by wxWidgets failed, ")
+ wxT("did you include include/wx/msw/wx.rc file from ")
+ wxT("your resource file?"));
+ }
+
wxLogLastError(wxT("LoadCursor"));
}
else