User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 397,771 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,518 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:
Views: 5024 | Replies: 11
Reply
Join Date: Apr 2004
Posts: 555
Reputation: Dark_Omen is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 6
Dark_Omen Dark_Omen is offline Offline
Posting Pro

Having trouble with library in dev-c++ (wxWindows)

  #1  
Dec 18th, 2004
Hello,

I am using dev-c++ on a windows computer. I download a gui package off of the bloodshed dev site. I installed and everything seem to work. I was making a simple gui off of this tutorial I found online that used the library. The library is wxWindows. Here is the code of the header file and of the main file.

The header file (base.h)
#ifndef __BASE_H
#define __BASE_H
class MainApp: public wxApp
{
	public:
			virtual bool OnInit();
};
class MainFrame: public wxFrame
{
	public:
			MainFrame(const wxString &title, const wxPoint &pos, const wxSize &size);
};
#endif  


the main program (base.cpp)
 
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
#include <base.h>
IMPLEMENT_APP(MainApp)
bool MainApp::OnInit()
{
		MainFrame *MainWin = new MainFrame("Hello, World!", wxDefaultPosition,
		wxSize(300, 200));
		MainWin->Show(TRUE);
		SetTopWindow(MainWin);
		
		return TRUE;
}
MainFrame::MainFrame(const wxString &title, const wxPoint &pos, const wxSize &size)
		 :wxFrame((wxFrame *) NULL, -1, title, pos, size)
{
   //this is not needed right now. From what i know this does the controls of the program, and it was not needed for a simple window. 
}
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2004
Location: Mojave Desert
Posts: 2,414
Reputation: vegaseat will become famous soon enough vegaseat will become famous soon enough 
Rep Power: 9
Solved Threads: 173
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
Kickbutt Moderator

Solution Re: Having trouble with library in dev-c++ (wxWindows)

  #2  
Dec 18th, 2004
What is your question?

Are you using the wxWidgets IDE for Dev-Cpp?
If not, check:
http://wxdsgn.sourceforge.net/

This IDE turns Dev-Cpp into the closest free thing to Visual C++.
May 'the Google' be with you!
Reply With Quote  
Join Date: Apr 2004
Posts: 555
Reputation: Dark_Omen is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 6
Dark_Omen Dark_Omen is offline Offline
Posting Pro

Re: Having trouble with library in dev-c++ (wxWindows)

  #3  
Dec 18th, 2004
No, I download and installed wxWindows. It was a package for dev-c++, and it is a GUI library. When I tried to compile the program a lot of errors came up. I was asking if anyone who used or is using wxWindow can help me make sure the compiler can compile the program. I am not using wxWidget, btw what is that?
Reply With Quote  
Join Date: Oct 2004
Location: Mojave Desert
Posts: 2,414
Reputation: vegaseat will become famous soon enough vegaseat will become famous soon enough 
Rep Power: 9
Solved Threads: 173
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
Kickbutt Moderator

Solution Re: Having trouble with library in dev-c++ (wxWindows)

  #4  
Dec 19th, 2004
Originally Posted by Dark_Omen
No, I download and installed wxWindows. It was a package for dev-c++, and it is a GUI library. When I tried to compile the program a lot of errors came up. I was asking if anyone who used or is using wxWindow can help me make sure the compiler can compile the program. I am not using wxWidget, btw what is that?
The wxWidget IDE ties Dev-C++ and wxWindows together. It is a complete development package and includes Dev-C++, the beta download is free. Check:
http://wxwidgets.org/
May 'the Google' be with you!
Reply With Quote  
Join Date: Apr 2004
Posts: 555
Reputation: Dark_Omen is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 6
Dark_Omen Dark_Omen is offline Offline
Posting Pro

Re: Having trouble with library in dev-c++ (wxWindows)

  #5  
Dec 19th, 2004
I installed it, but I don't know what to do from here. It has sample program that shows all of the things it can do, and you can modify and change stuff.
Reply With Quote  
Join Date: Oct 2004
Location: Mojave Desert
Posts: 2,414
Reputation: vegaseat will become famous soon enough vegaseat will become famous soon enough 
Rep Power: 9
Solved Threads: 173
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
Kickbutt Moderator

Solution Re: Having trouble with library in dev-c++ (wxWindows)

  #6  
Dec 19th, 2004
That reminds me of the days when I installed Delphi 1.0 on my computer. It was a heck of a learning curve. This idea of RAD programming was later copied by VB and VC. If you have any experience with these, then you know what to do with the wxWidget IDE.

BTW, they do have a forum to ask questions:
http://www.solidsteel.nl/users/wxwidgets/viewforum.php?f=19&sid=684b4abb463a3d085c5ab463e17473ea
May 'the Google' be with you!
Reply With Quote  
Join Date: Apr 2004
Posts: 555
Reputation: Dark_Omen is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 6
Dark_Omen Dark_Omen is offline Offline
Posting Pro

Re: Having trouble with library in dev-c++ (wxWindows)

  #7  
Dec 19th, 2004
I went to the forum, and they said I was missing DECLARE_APP. I have no idea where this would go. The person who responded said it might go after the mainapp class in the header file, I tried it and it did not work. Does anyone have any idea?
Reply With Quote  
Join Date: Apr 2004
Posts: 555
Reputation: Dark_Omen is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 6
Dark_Omen Dark_Omen is offline Offline
Posting Pro

Re: Having trouble with library in dev-c++ (wxWindows)

  #8  
Dec 22nd, 2004
Well, I found a solution to my problem. When you install the package in dev C++, you have to go to new project, then you go to the gui tab and open up the wxWindows template. Another thing that can be done is to download the wx-Dev C++ which has everything set up already and has a visual building program built in, that you can creat and then you can add code to the buttons and everything else in the program.
Reply With Quote  
Join Date: Oct 2004
Location: Mojave Desert
Posts: 2,414
Reputation: vegaseat will become famous soon enough vegaseat will become famous soon enough 
Rep Power: 9
Solved Threads: 173
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
Kickbutt Moderator

Solution Re: Having trouble with library in dev-c++ (wxWindows)

  #9  
Dec 22nd, 2004
Originally Posted by Dark_Omen
Well, I found a solution to my problem. When you install the package in dev C++, you have to go to new project, then you go to the gui tab and open up the wxWindows template. Another thing that can be done is to download the wx-Dev C++ which has everything set up already and has a visual building program built in, that you can creat and then you can add code to the buttons and everything else in the program.
Congratulations!! I am glad you got this thing to go!! I played around with wx a few months ago. Sort of enjoyed it, despite the bloated executables! Then I got involved with c#. There is a lot of good stuff out there and not enough time to experience it all!!!!!
May 'the Google' be with you!
Reply With Quote  
Join Date: Apr 2004
Posts: 555
Reputation: Dark_Omen is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 6
Dark_Omen Dark_Omen is offline Offline
Posting Pro

Re: Having trouble with library in dev-c++ (wxWindows)

  #10  
Dec 23rd, 2004
Yeah, after I figured download the wxWindows with dev-c++, I was looking at my original code and found some mistakes. I hate the mistakes that are not always obvisous. wxWindows is pretty good from what i have done so far (altough it was tricky to install and make it work). BTW, I have heard about c# but I dont exactly know what it is about, can you possibly tell me about it.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb C++ Marketplace
Thread Tools Display Modes

Other Threads in the C++ Forum

All times are GMT -4. The time now is 4:25 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC