User forums > Using Code::Blocks

Designing GUI's?

(1/3) > >>

DarkDepths:
Hello. I have a bit of a problem. I would really like to get started with designing some graphical programs, because console apps get a little boring.

I have looked at the win32 API, but I can't understand it nor can I find any decent resources/tutorials.

I tried to use wxwidgets, but I ran into two problems:

1. I couldn't get mingw to install properly. And just so nobody asks, I'll tell the reason right now. I have two drives, C: has only about 4 gigabytes left on it. So I put it on D:, now the D: drive formats every few days...

2. I thought I might be able to build wx through C::B, but I couldn't figure it out.


So then I started looking around for others, but as far as I can tell, the only other ones out there draw their own graphics instead of the operating systems, which is a bit annoying I think.


Here is my question. Actually, it's a couple questions, but if any can be answered then the rest likely won't need to be!

1. Can anybody recommend any decent resource materials for Win 32?

2. Can somebody tell me if it's possible to build wx through C::B, and if it is, perhaps I could get a little support there?

3. Can somebody recommend anything to make designing a GUI a fairly simple process that uses the OS's native graphics?

Thanks in advance! :shock:

TDragon:

--- Quote from: DarkDepths on April 17, 2007, 06:26:36 am ---1. I couldn't get mingw to install properly. And just so nobody asks, I'll tell the reason right now. I have two drives, C: has only about 4 gigabytes left on it. So I put it on D:, now the D: drive formats every few days...

--- End quote ---
Wha? "Formats every few days"? What do you mean by that?


--- Quote ---2. I thought I might be able to build wx through C::B, but I couldn't figure it out.

--- End quote ---
Nope, it's so easy that you don't even need Code::Blocks. Just open up a command prompt and enter the following two lines (assuming that you extracted wxWidgets to C:\wxMSW-2.8.3):

--- Code: ---cd C:\wxMSW-2.8.3\build\msw
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1

--- End code ---
10 minutes or so later, depending on how fast your PC is, wxWidgets will be built. If you're using Visual C++ instead of MinGW, then you just use the special Visual Studio command shell and replace "mingw32-make -f makefile.gcc" with "nmake -f makefile.vc".


--- Quote ---So then I started looking around for others, but as far as I can tell, the only other ones out there draw their own graphics instead of the operating systems, which is a bit annoying I think.

--- End quote ---
I agree; at least, pretty much the only other usable ones are that way. Some of them are in fact more usable than wxWidgets, but I prefer wxWidgets precisely because it uses native widgets (doesn't draw its own graphics).


--- Quote ---1. Can anybody recommend any decent resource materials for Win 32?

--- End quote ---
Only the MSDN Library. I started with a couple of the Win32 sample and skeleton apps floating around in there and worked up from there. I don't really recommend learning Win32 as your API of choice; it's very outdated.


--- Quote ---2. Can somebody tell me if it's possible to build wx through C::B, and if it is, perhaps I could get a little support there?

--- End quote ---
See above. :)


--- Quote ---3. Can somebody recommend anything to make designing a GUI a fairly simple process that uses the OS's native graphics?

--- End quote ---
Well, I certainly do recommend wxWidgets. Once you get a basic wx app going, you can figure out how to load XRC files and then use a tool like wxSmith (which comes with Code::Blocks) or wxFormBuilder to design dialogs, menus, and such visually. (I'd love to be able to recommend wxSmith as my first choice, but wxFormBuilder at this point is quite a bit easier to use.) Just make sure to learn about sizers, because you can't make GUIs in wxSmith OR wxFormBuilder without them.

Cheers,
JohnE / TDM

rjmyst3:
If you'd rather not worry about having to correctly compile wxWidgets yourself, get wxPack.

DarkDepths:
Well... I mean that my D drive is pretty unstable. Every now and again, when I turn on the computer, D has been emptied. I will look at wxPack, but I fear the file will be too large, (dial-up).

Thanks for the help though!

TDragon:
You mentioned that your other drive had about 4GB of free space left; a full MinGW install takes up only about 80MB. You have plenty of room for it there. In other news, 80GB hard drives can be had for as little as $43US plus shipping from sites like NewEgg.com -- so if you live in the US and own a PC, there's little excuse for being low on hard drive space.

wxPack is an extremely large download for dial-up users. Building wxWidgets yourself is a better alternative, and (as evidenced above) is not too difficult. Understanding what the build options get you and how to use the resulting build is the hard(er) part. Make sure to read INSTALL-MSW.txt, and of course the documentation. (wxWidgets 2.8 series doesn't come with the MS HTML Help docs, which are in my opinion the most usable; you can get them separately on the download page.)

Navigation

[0] Message Index

[#] Next page

Go to full version