Re: Windows Procedural Programming



* Joe Butler:
> [top-posting, corrected]

Please don't top-post.


* Joe Butler:
>
> * Snooze:
> > I want to begin developing Windows applications, but I don't have any
> > experience with OOP or Windows programming; only procedural programming.
> > Is it possible to develop Windows applications using only a procedural
> > programming language such as C or Pascal rather than an OOP language?
>
> Yes. You can create (complex) windows programs (including DirectX
> applications) using just C.

Right, although not advisable.


> I think Phlip is exagerating the complexity of a Windows SDK program (pure
> C).

No, not really. However, I think he's exaggerating the benefits from using
an OO language. Those benefits are there 100% if you write a program that
is not Windows-specific, but in that case you're not writing a Windows
application; the Windows-specific stuff requires dealing with things that
object oriented abstraction doesn't make simple, although it helps much.


> A pure Windows SDK program has the following structure.
>
> WinMain() - instead of main()

Sorry, that's incorrect.

First because it's a languagecentric view (C or C++), second because
'WinMain' is Microsoft-specific language extension, third because even with
Microsoft tools 'WinMain' has a special meaning (setting tool default
options) that's not "Windows SDK program" but "GUI subsystem program",
fourth because there are several such special functions, e.g. 'wWinMain',
and fifth but absolutely not least because _there is no need_ to use
'WinMain' or the like: you can & should just use standard C/C++ 'main'.


[snip]
> For SDK programming you could start with Programming Windows by Charles
> Petzold.

Good advice.


> One of the things that can be difficult to get right is handling printing
> support (there is no built in Print Preview functionality). Also, loading
> things like bitmaps you have to supply the code yourself - althought I think
> with a new thing called GDI+ that can load bitmaps and jpegs with a single
> function call

Sorry, that's incorrect. You could always use e.g. OleLoadPicturePath.
However, in one practical sense it's correct unless all you want to do is
display a photograph, for the units used for width and height are not pixel
based and are display-dependent, so that accuracy is thrown out the Windows.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
.



Relevant Pages

  • Re: What is the latest version of VB?
    ... I want an easy, user-friendly, and professional programming ... language that can easily manage databases, Multimedia files, Animation ... To make a long story short, Microsoft wants to ... restrict user access to Windows in order to protect ...
    (microsoft.public.vb.general.discussion)
  • Re: Starting from scratch with .Net Framework -- Where to begin?
    ... Pro., IIS is an optional Windows Component to add, but it is typically not ... You'll need your WinXP CD to install it if it is not ... Framework and then there is the language that you wish to interact with the ... "Programming Visual Basic" by Microsoft Press ...
    (microsoft.public.dotnet.framework)
  • Re: [SLE] Developing a Real Time Data System
    ... The KBasic License is valid for both operating systems: Windows and Linux. ... Modern BASIC language ... chapters learning about the programming language. ...
    (SuSE)
  • Re: General Beginner Advice
    ... It is a really nice, neat language, whose goal is, IMO, to reduce complexity ... > programming it even matters. ... I don't want to dissuade you from learning C++. ... > on the Windows platform as well as have the ability to create some web ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Reverse engineering != piracy (was Re: RosAsm disassembler output vs. IDA Pro)
    ... OOPL or fancy "class" keywords to be programming "OOP"...that stuff is ... Rene...one of your RosAsm newbies has just ... under the BASIC language, typing "?" ... surface that works within Windows...but then all "child" windows can ...
    (alt.lang.asm)