-Demosthenes- Posted March 1, 2007 Posted March 1, 2007 I've been working with c++ and I can write a simple program, but only in the console. The class that I took, and the text book only talk about console programs. How does one write a program with some sort of UI?
Pangloss Posted March 1, 2007 Posted March 1, 2007 There are a number of different ways to begin to approach making "forms". (You'll hear that term "forms" a lot to describe the visual interface for GUI programs.) But you're going to have to make a decision as to what platform you want to work with. If you're okay with developing Windows programs that won't run on other platforms, you can work with something like Visual Studio (which probably is the best IDE on the planet right now). If you're not okay with that, and want to write apps that work on Windows, Linux or Mac computers, you will probably want to consider making the switch to Java (which should be very easy for you to do -- it's a very similar language) and then you can take advantage of some of the excellent Java IDEs, such as NetBeans, Eclipse or JBuilder. This approach has the slight disadvantage of requiring Windows end users to download a Java component called the JRE, which used to be a problem but it's pretty stable these days. I believe there are still some aging C++ IDEs out there that are independent of Microsoft that will let you build and compile a standalone C++ program for Windows and other platforms, but you'll have to look around. Perhaps someone else can add some relevent information to this thread. Good luck!
1veedo Posted March 1, 2007 Posted March 1, 2007 No no no Pangloss. Assuming you're using Windows, you're going to need to learn what's known as the Windows 32 API. There are other ways to do this of course but win32 should be pretty good for C++. Just use google. (this changes if you want to program 64bit) I've never done this before but I skimmed through a book someone got me called "sams teach yourself game programming in 24 hours" where in the first chapter it outlines what you need for a basic "window." It's mostly a matter of using this template for almost every program you make. This is completely independent of any programing gui. You can continue to use whatever it is that you're currently using (no need to get visual studios or for the most part follow any of Pangloss advice). It just amounts to learning a new way of doing things. Instead of int main() for instance you need a bunch of "basic" code that pretty much doesn't change from program to program. edit-- I forgot to mention about actual graphics programming. Here you use something like OpenGL which is what most opensource 3D games use (you can use directx as well. Contrary to what people say, opengl really isn't much better then directx. The only downside is that directx isn't potable). Again it's kind of like a layer that you program on and requires you just learn new stuff. I found this link w/ google, the same website I learned the basics of sdl from a long time ago lol http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/index edit again-- You might want to look at allegro as well.
Pangloss Posted March 1, 2007 Posted March 1, 2007 Well I did sort of nod in that direction, but I'm glad you expanded on it. I'm afraid I'm so rooted in managed code these days that I don't really know a lot about what's happened in that area. Ironically I have used that particular book in the classroom, sub-ing for our game programming instructor. But you're right, and you don't have to go in a managed code direction. If anything we should be encouraging more of that sort of thing around here, because it seems like the industry is almost entirely focused on client-server database programming these days, much to all of our detriment.
Klaynos Posted March 1, 2007 Posted March 1, 2007 Does anyone do good c++ gtk libs or X11 libs? (Although from what I'm told X11 on dowz is not wonderfull)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now