🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.tools
Article #696

Is there tool to write for Windows on C quickly?

#696
From: Andrew M. Gershun
Date: Tue, 15 Dec 1992 22:40
97 lines
4173 bytes
I like Windows. And I like to write programs on C for Windows. But...


          === Is writing for Windows on C easy and quick? ===


I think easy, but ... too much words. Authors of C have escaped of this danger
  (and many C-programs written BW (before Windows) looked like a puzzle or
  memory dump).

1. Many sources of programs for Windows have the same structure, because Windows
     has own style of writing sources.

Now I explane my thought:
  All program has a WinMain() procedure which has ether description
    of class "MainWnd" (or "ProgMan" same) and code for creating main
    window CreateWindow().
    And usually parameters for CreateWindow() are same:
      e.g.
        hWnd = CreateWindow("Bum","Bum",
               WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,CW_USEDEFAULT,
                CW_USEDAFAULT,CW_USEDEFAULT,NULL,NULL,hInstance,NULL);

        And so on on every line....

        How much bytes and how little sense!

  Every program I must begin with this lines (with a small variations),
and all sense of DummyWin program I can describe on 2 lines:

// Voila!

WinMain {
  mainwnd Bum;    // Main window is a main window
}

//and nothing more.

You want to make HelloWin? Ok!
Change line beginnig with "mainwnd" on:
  mainwnd HellowWin "Hello World and Windows!"

You must change only name of application from program to program.

  /*
     When I have wrote my first hello.c for Windows (30 lines as you see
     instead 3 in C for DOS), I was disappointed. Wah! Simple program and so many
     lines! I think so Windows lost many beginner-programmers.
  */

You can say that it is like VB (or other Basics), but I speak that all
  program on C for Windows look like bad Basic with extra parenthis and
  commas.

2. This is an agressive policy of Microsoft on sofware market.
 For example:
   You write an identificator "MakeProcInstance" during 3
       or 2 (or 1) second.
   The Microsoft programmer do not write "M-a-k-a-BackSpace-e-P-r-o-c-
       -I-n-s-t-a-n-c-e",
       he writes Alt-MPI and recives MakeProcInstance( );,
       or maybe $MPI, or simple MPI(); (during 0.5 sec!!!)

   And now compare this! 2-3 to 0.5 is 4-6 times.
   So the Microsoft programmer has advantage against you - real programmer
   because during your life you can write on 5 times progams less than he.

3. Do you know that all Windows functions definitions are writing
     with first letter capital? Why? For clearity?

4. Some other question:
        Why ALL Windows applications have a same skeleton?
        Why case WM_ ?
        Why CW_USEDEFAULT is so long identificator?
        Why my program looks like a novel?
        Why every line of my program exeeds 80 columns? I am not typewriter
           and I do not like to turn my head on every line!
        If Microsoft use undeclared calls in his programs, it can
            use a different notation! And SDK was made for naives?

5. What can solve this problems on my mind:
   a) normal preprocessor (Borland's object OWL is not solution because
      it is not so soft, and there is possibility its incompatibility
      with other windows-like systems in future) for Windows C.
   b) new no-much-word standards on programming for Windows-like
      systems (may be like on Sun).

P.S. I beg pardon Microsoft (thank you for Windows!),
       and many others who speak English and C...

     ==== The program is so long, but the life is so short...====

                                       Andrew M. Gershun.

P.S.S. Am I naives boy in my "far away Russia"? Maybe you write you
  program with same tools as I dream? Or, maybe, there is other
  style than "like-Petzold" or "like-SDK" style? Plase answer me!
Technical Details
Message-ID: <ABWxbBhue5@numond.msk.su>
Path: arc1-ca.pugleaf.net!sparky!uunet!demos!news-server

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.tools
Path: arc1-ca.pugleaf.net!sparky!uunet!demos!news-server
From:  agpro@numond.msk.su (Andrew M. Gershun)
Subject: Is there tool to write for Windows on C quickly?
Date: Tue, 15 Dec 1992 22:40:32 GMT
Reply-To: agpro@numond.msk.su
Organization: APEX corp.
Sender: news-server@moscvax.hq.demos.su
Message-ID: <ABWxbBhue5@numond.msk.su>
Lines: 100