Try to prevent users from forgetting to include wx.rc from their resources.

Document that some of the standard cursors are defined in this file.

Also add a (hopefully) helpful assert if loading one of such cursors failed.

Closes #11424.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-01-26 12:39:41 +00:00
parent 6900a89752
commit 6b2f55531a
2 changed files with 17 additions and 1 deletions

View File

@@ -349,6 +349,15 @@ void wxCursor::InitFromStock(wxStockCursor idCursor)
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