Oh me yarm Win32API =(

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

User avatar
War_Hero
Posts: 13
Joined: Sun Feb 17, 2008 7:41 am UTC

Oh me yarm Win32API =(

Postby War_Hero » Sun Feb 17, 2008 7:50 am UTC

So, a few months ago I becamed inspired to learn C++. I wanted to learn C++ because application that I use everyday such as Toribash(http://www.toribash.com) and Photoshop are written in it. I went through the tutorial at http://www.cplusplus.com and learned about C++ function and dos stuff. I went through every tutorial they had. Then I figured that I knew the basics and should move on to making a windows app thingy. I asked my programmer friend how to do that and he suggested googleing Win32API. I went through the first tutorial, hello world windows style, and felt pretty confident to move on to tutorial #2. I clicked the next arrow on the site, and BAM! I get some kind of wtf program tutorial. I have no idea what the hell is going on. Its all in some random order and doesn't even have the winmaker class. I have ditched that site. Could someone please suggest a site or a book that could help me out? Any help would be greatly appreciated.

-War
Image

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: Oh me yarm Win32API =(

Postby EvanED » Sun Feb 17, 2008 4:36 pm UTC

With the warning that the the Windows API is not a pretty thing to behold in any form, the canonical book is Petzold's Programming Windows. Looks like it hasn't been updated in a decade though. (He's been concentrating on other stuff since, like Windows Forms.)

coppro
Posts: 117
Joined: Mon Feb 04, 2008 6:04 am UTC

Re: Oh me yarm Win32API =(

Postby coppro » Sun Feb 17, 2008 5:25 pm UTC

I'd highly recommend wxWidgets, as it's a windowing API that has several advantages:

  • It's written for C++, rather than C
  • It's object-oriented
  • It's cross-platform
  • It's useable

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: Oh me yarm Win32API =(

Postby EvanED » Sun Feb 17, 2008 7:53 pm UTC

IMHO, wxWidgets has most of the uglyness of MFC without any of the support in the Visual Studio UI. If you want a C++-based, cross platform solution and don't mind it being under the GPL, I would look at Qt. (The major downside of that is they have a preprocessor that needs to run, so you're not writing standard C++. Also I *think* Qt emulates widgets, which means they aren't perfect (except on KDE), and wxWidgets uses native widgets when it can.)

qbg
Posts: 586
Joined: Tue Dec 18, 2007 3:37 pm UTC

Re: Oh me yarm Win32API =(

Postby qbg » Sun Feb 17, 2008 10:52 pm UTC

EvanED wrote:IMHO, wxWidgets has most of the uglyness of MFC without any of the support in the Visual Studio UI. If you want a C++-based, cross platform solution and don't mind it being under the GPL, I would look at Qt. (The major downside of that is they have a preprocessor that needs to run, so you're not writing standard C++. Also I *think* Qt emulates widgets, which means they aren't perfect (except on KDE), and wxWidgets uses native widgets when it can.)

Qt uses native widgets when the right style is being used. But yeah, Qt is a very nice.

akashra
Posts: 503
Joined: Tue Jan 01, 2008 6:54 am UTC
Location: Melbourne, AU
Contact:

Re: Oh me yarm Win32API =(

Postby akashra » Mon Feb 18, 2008 12:01 am UTC

There's nothing hard about the Win32 API once you get your head around a few small concepts. I'd just make the effort to learn then and the rest is just building blocks on that.

Definitely not a hard thing to use, IMO, once you've got the hang of it... not like some other APIs (eg, SWT, Swing, or Direct3D for example).
( find / -name \*base\* -exec chown us : us { } \ ; )

User avatar
'; DROP DATABASE;--
Posts: 3284
Joined: Thu Nov 22, 2007 9:38 am UTC
Location: Midwest Alberta, where it's STILL snowy
Contact:

Re: Oh me yarm Win32API =(

Postby '; DROP DATABASE;-- » Mon Feb 18, 2008 9:14 pm UTC

I dunno, I'm pretty familiar with the Win32 API and I still find it a massive pain. I remember how difficult it was to get started with, and finding a resource editor that doesn't suck... I'm still stuck with using one that does suck to create a file and then another one to edit it.
poxic wrote:You suck. And simultaneously rock. I think you've invented a new state of being.

HappySmileMan
Posts: 52
Joined: Fri Nov 09, 2007 11:46 pm UTC

Re: Oh me yarm Win32API =(

Postby HappySmileMan » Tue Feb 19, 2008 12:53 am UTC

I'd second QT, however I'm posting this from a KDE desktop, so I don't know how well it plays on Windows.

It's far easier to program the GUI than using the winAPI and gets the job done fine, it also has network classes, XML classes and wrappers for OpenGL and stuff, so it's well able to handle most tasks. (Though it's best to just handle the GUIs first of all).

However, unless you pay for it you may only make open source programs with it (they must be licensed under the GPL), however you get the full package for free this way, there's no limitations and it's not a trial or a demo version, you just have to agree to let your users see your code.

Also there's an entire Desktop environment built around it on Linux, so it's well tested and very widely used (Adobe apparently use it a lot, Photoshop is apparently made with it, and the Opera web browser is made with it).

I know this seems like a badly written advertisement, and probably makes no sense... but it's 1 in the morning, I have school tomorrow and I've just ended a very long and repetitive/confusing conversation

!xobile
Posts: 26
Joined: Sat Aug 25, 2007 3:04 am UTC
Location: Colorado

Re: Oh me yarm Win32API =(

Postby !xobile » Tue Feb 19, 2008 1:37 am UTC

I used Qt 3.x with windows and had no problems. I've only used Qt 4.x with linux, so i'm not sure how well it will work. Although trolltech puts out some quality products, and if they say it works, it should.
Last edited by !xobile on Wed Feb 20, 2008 5:10 pm UTC, edited 1 time in total.

squark
Posts: 36
Joined: Mon Jul 23, 2007 6:37 am UTC
Location: Washington

Re: Oh me yarm Win32API =(

Postby squark » Wed Feb 20, 2008 1:36 am UTC

I'll put in another vote for Qt. Really easy to get up and running, with a full feature set. I'm using Qt 4.3 on Windows right now with no problems.

Dakman
Posts: 50
Joined: Sat Jul 07, 2007 7:49 am UTC

Re: Oh me yarm Win32API =(

Postby Dakman » Wed Feb 20, 2008 3:22 pm UTC

Qt is alright, but there are a lot of restrictions to how you can distribute it for windows versions (unless they changed it). As for wxWidgets I would suggest that nobody EVER uses it. It's far to restrictive and is bassicaly just a extremley slow abstraction of other GUI systems.

User avatar
phantom
Posts: 69
Joined: Thu Aug 30, 2007 4:10 am UTC
Location: Penn State Main Campus
Contact:

Re: Oh me yarm Win32API =(

Postby phantom » Wed Feb 20, 2008 9:11 pm UTC

Linux programing has always seamed way easier than Windows programing to me, especially once you start making GUIs.
my fairly pointless website: http://radoncube.com/
Gelsamel wrote:
Vaniver wrote:I'm claiming that the programming itself is the free will.

10 PRINT "Hello World"
20 GOTO 10
Yeah, the computer is using it's free will to display "Hello World" over and over again.

HappySmileMan
Posts: 52
Joined: Fri Nov 09, 2007 11:46 pm UTC

Re: Oh me yarm Win32API =(

Postby HappySmileMan » Wed Feb 20, 2008 9:35 pm UTC

phantom wrote:Linux programing has always seamed way easier than Windows programing to me, especially once you start making GUIs.


Agreed, but of course you can use GTK and QT on Windows as well, with some effort (that is, it might require fucking around with your IDE at first, not that it'd require more effort to actually program it when it's set up).

I'll probably upgrade to KDE4 in April and start programming stuff with Kdelibs... Wish me luck guys (not going to to bother yet because I cba to learn KDE3.5 libraries then change in a couple of months.... Of course I've been using that excuse sincce last summer so maybe I just can't be bothered at all)

nteon
Posts: 26
Joined: Sun Oct 07, 2007 9:15 pm UTC

Re: Oh me yarm Win32API =(

Postby nteon » Thu Feb 21, 2008 8:04 pm UTC

I had a class project the end of last semester where we had to write a minesweeper program in assembly (MASM), and for extra credit you could make it a visual program using the Win32 API instead of just a command line one. Let me just say that the majority of my time was spent not figuring out the algorithms in assembly, but trying to figure out what the Win32 api was actually doing. Its a mess with poor documentation, as everyone else is saying.
It's 106 miles to Chicago, we got a full tank of gas, half a pack of cigarettes, it's dark, and we're wearing sunglasses. Hit it.

User avatar
Sc4Freak
Posts: 673
Joined: Thu Jul 12, 2007 4:50 am UTC
Location: Redmond, Washington

Re: Oh me yarm Win32API =(

Postby Sc4Freak » Sat Feb 23, 2008 3:31 am UTC

nteon wrote:I had a class project the end of last semester where we had to write a minesweeper program in assembly (MASM), and for extra credit you could make it a visual program using the Win32 API instead of just a command line one. Let me just say that the majority of my time was spent not figuring out the algorithms in assembly, but trying to figure out what the Win32 api was actually doing. Its a mess with poor documentation, as everyone else is saying.

Not really. The Win32 API is extremely well documented.

It's just too complicated for what it does, especially since there are libraries which provide a wrapper over Win32 which are a vastly easier to use.


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 10 guests