Added an assert to dialog.cpp to make it clearer where the failure happened.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -88,6 +88,13 @@ bool wxButton::Create(wxWindow *parent,
|
||||
NULL
|
||||
);
|
||||
|
||||
if (m_hWnd == 0)
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf(wxT("CreateWindowEx failed with error number %ld"), (long) GetLastError());
|
||||
wxFAIL_MSG(msg);
|
||||
}
|
||||
|
||||
// Subclass again for purposes of dialog editing mode
|
||||
SubclassWin(m_hWnd);
|
||||
|
||||
|
@@ -174,7 +174,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
|
||||
|
||||
if ( !hwnd )
|
||||
{
|
||||
wxLogError(_("Failed to create dialog."));
|
||||
wxFAIL_MSG(_("Failed to create dialog. You probably forgot to include wx/msw/wx.rc in your resources."));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user