943,724 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 389
  • C++ RSS
Mar 31st, 2009
0

wxWidgets question

Expand Post »
c++ Syntax (Toggle Plain Text)
  1.  
  2. #include <wx/wx.h>
  3.  
  4. class Hello : public wxApp
  5. {
  6. public:
  7. virtual bool OnInit();
  8. };
  9.  
  10. IMPLEMENT_APP(Hello)
  11.  
  12. bool Hello::OnInit()
  13. {
  14. wxFrame *frame = new wxFrame(NULL, -1, _T("Hello"), wxPoint(60, 70), wxSize(500, 600));
  15.  
  16. frame -> show(true);
  17.  
  18. SetTopWindow(frame);
  19.  
  20. return true;
  21. }


C:\Documents and Settings\Levi\Desktop\C+++\Makefile.win [Build Error] exe: *** [Output/MingW/Project1.exe] Error 1

Why do i get this error when i try to compile a simple wxFrame app in wxDev-cpp

thanks

Edit:


Well, im an idiot, i didnt have my source file saved lol. But the new question is, my compiler says show is not a member of wxFrame, so how am i supposed to show the actual window?
Last edited by clutchkiller; Mar 31st, 2009 at 6:14 am.
Similar Threads
Reputation Points: 23
Solved Threads: 3
Junior Poster
clutchkiller is offline Offline
181 posts
since Jul 2008
Mar 31st, 2009
0

Re: wxWidgets question

frame -> Show(true);
Reputation Points: 395
Solved Threads: 71
Posting Whiz
jencas is offline Offline
362 posts
since Dec 2007
Mar 31st, 2009
0

Re: wxWidgets question

o wow, thank you that worked
Reputation Points: 23
Solved Threads: 3
Junior Poster
clutchkiller is offline Offline
181 posts
since Jul 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Help with header file
Next Thread in C++ Forum Timeline: Find suitable equation for given data...





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC