Re: [Dev-C++] wxDialog problems, resource file not being referenced?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Shayne K. <err...@ne...> - 2002-11-18 08:42:46
|
Thanks, I actually had the wrong path to the resource directory. I found that I had to actually set the resource directory to C:\Dev-Cpp\include and the Resource files to ..\Dev-Cpp\include\wx\msw\wx.rc Must be that time of night again ;) -- Shayne http://www.shaynekasai.com On Mon, 18 Nov 2002, Per Westermark wrote: > As the error message says, you have probably forgotten to add the line > #include "wx/msw/wx.rc" > to the resource file for the project. > > /Per W > > On Sun, 17 Nov 2002, Shayne Kasai wrote: > > > Hello everyone, > > > > I'm not sure if this question has been asked, since the mailing list > > search functionality is broken on SF. > > > > First of all, I'm trying to create an app using wxWindows. I've derived > > the wxDialog class and everything compiles. When I run the application > > (app works fine to a point) > > and execute the code to load up the dialog, I get a Debug message that > > says the following: > > > > Assert failed in file ../../src/msw/dialog.cpp at line 174: Failed to > > create dialog. You probably forgot to include wx/msw/wx.rc in your > > resources. Do you want to stop the program? You can also choose [Cancel] > > to suppress further warnings. > > > > I'm pretty sure everything is set up (I did a base install of dev-cpp, > > wxWindows libs and used the basic template for the dev-cpp wxWindows app). > > Here's the code I used to derive/call wxDialog, nothing fancy: > > > > /** > > * I don't think you need to see the header.. you can guess what that > > * looks like :) > > */ > > diaAddItem::diaAddItem > > ( wxWindow *parent, wxWindowID id, > > const wxString &title, > > const wxPoint &position, const wxSize& size, > > long style > > ) : > > wxDialog( parent, id, title, position, size, style) > > { > > > > } > > > > ..... and then I just call it like this: > > > > diaAddItem aboutDialog (this, -1, > > "Your very own dialog", > > wxPoint(100,100), > > wxSize(200,200) > > ); > > > > aboutDialog.ShowModal(); > > > > > > > > This is called in an event function AppFrame::OnAbout(wxCommandEvent > > &WXUNUSED(event)); > > > > Any ideas? > > > > Thanks in advance > > > > - Shayne > > > > > > http://www.shaynekasai.com > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by: To learn the basics of securing > > your web site with SSL, click here to get a FREE TRIAL of a Thawte > > Server Certificate: http://www.gothawte.com/rd524.html > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > |