Marlon
Marlon

Reputation: 20312

Any tips for structuring C++ code using win32?

I am trying to improve my coding skills by making my code more structured and readable. I code the GUI (thanks edit). I have been reading through Firefox's open source code to improve but it uses GTK+ and not much Win32.

Where can I find an open source (professional) program that is coded in Win32?

One more thing: When should one write pseudocode? I've never done this before, but I know it's much like outlining an essay. Should pseudocode be written before coding the project? or just functions?

Thanks

Upvotes: 1

Views: 739

Answers (4)

Emile Cormier
Emile Cormier

Reputation: 29219

Instead of learning Win32 API, I recommend that you learn how to use portable toolkits and libraries that will run on all major desktop platforms. In particular, check out:

  • C++ standard library: strings, file I/O, containers, algorithms
  • Boost libraries: Smart pointers, network I/O, signals/slots, multithreading, filesystem, serialization, and many more.
  • Qt: Portable GUI toolkit.

These libraries have higher-level APIs that are much more pleasant (IMO) to use than the bare Win32 API.

To "outline" your programs, (especially object-oriented style programs) check out the Unified Modeling Language.

Upvotes: 2

Christian Madsen
Christian Madsen

Reputation: 1748

You should take a look at the chrome source which is both Win32 (and now also Linux) and c++. I learned a lot from it.

PS: When you write Win32, what is your exact interrest? GUI? System calls?

Upvotes: 0

Tim Allman
Tim Allman

Reputation: 1521

As a Unix programmer I can't help much with the Windoze question.

As for pseudocode, think of it as a way of getting your thoughts together, much as you might write an outline of a letter or an essay before the real thing. I like to do it if there is any complexity to work out because I find that the compiling and debugging are easier. However, you know yourself better than I do ...

Upvotes: 0

tomq
tomq

Reputation: 1

pseudocode is usually used to express ideas to people who use different languages. It appears really often in scientific papers (helps to understand solutions, algorithms and so on)

Upvotes: 0

Related Questions