News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Next steps

Started by bf2, June 22, 2011, 10:51:35 PM

Previous topic - Next topic

bf2

I know C but don't know much about Windows programming. I am learning MASM and I should be able to move on to learning Windows programming soon.

My question is: is there any value in learning Windows programming in C first, or should I go straight to the Iczellion tutorials?

Although I envisage using only MASM for my (hobbyist's) programming, the vast majority of Windows source codes out there is in C/++, so gaining some knowledge may not be a bad idea. On the other hand, both Petzold and Rector-Newcomer are massive books, and Iczellion is much more compact. I also totally dislike C.

Am I going to miss anything if I learn Windows programming only using MASM?

Thoughts please?

raymond

You need to learn the functionality and requirements of the Windows API before you can use them, regardless of which programming environment you use. Once you have learned them, it's simply a question of "grammar" to port your knowledge to other programming languages.
When you assume something, you risk being wrong half the time
http://www.ray.masmcode.com

qWord

Quote from: bf2 on June 22, 2011, 10:51:35 PMAm I going to miss anything if I learn Windows programming only using MASM?
surly not.
FPU in a trice: SmplMath
It's that simple!

dedndave

the windows API functions are documented on MSDN
they are documented with C programmers in mind
however, it doesn't take long to adapt   :P

here are a couple examples...
http://msdn.microsoft.com/en-us/library/ms645505%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/ms632680%28v=vs.85%29.aspx

notice the indexes on the left
expand them to see more functions, structures, and other reference info

Tedd

You may not 'miss' anything vital, but you will find it much easier if you learn some C in addition.
No snowflake in an avalanche feels responsible.

dedndave

that's right
actually, you will wind up learning a little about C, as you learn ASM
many sample code snippets are in C and you can't avoid picking it up by osmosis

bf2

Thank you all. Your replies have helped me decide that I should learn Windows programming using both MASM and C.

In MASM for my own use and interest, and in C mainly to understand and reuse other people's code.

baltoro

Hey, BF2,
As you are aware, most source code for the existing Win32 APIs are written in C++. If you download the Windows Platform SDK all the code examples included are written in C/C++.
If you want to learn the Windows APIs, one of the best ways is to get a copy of this book: Programming Windows, Fifth Edition, by Charles Petzold. 1998
For all practical purposes, your choice of programming language will depend mainly on which compiler you use.
Baltoro

bf2

I have both Petzold and Rector-Newcomer. Having browsed the initial chapters of both, I find I like the latter much more.

Quote from: baltoro on June 23, 2011, 04:01:02 PM
If you want to learn the Windows APIs, one of the best ways is to get a copy of this book: Programming Windows, Fifth Edition, by Charles Petzold. 1998

baltoro

Assembly language is the mother of qll the higher languages,...and, it is highly under-rated.
I program in both C++ and assembly language,...which represemts the best of all possible worlds,...
If you have a version of Visual Studio,...you can write alot of your code in a higher language. It's easier, and faster, and the compiler catches almost all of your errors (unless you are really creative). Assembly programming is alot more difficult (especially for a novice), and, it is more error prone,...because the compiler will allow you to do almost anything. You can compile your assembly language routines into a DLL that exports those routines, and, if the calling conventions are compatible, you can use those assembly routines just like you were calling a Win32 API from one of the standard Windows DLLs.
Baltoro