home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / mswindo / programm / tools / 1749 < prev    next >
Encoding:
Text File  |  1992-12-18  |  4.0 KB  |  112 lines

  1. Newsgroups: comp.os.ms-windows.programmer.tools
  2. Path: sparky!uunet!demos!news-server
  3. From:  agpro@numond.msk.su (Andrew M. Gershun)
  4. Subject: Is there tool to write for Windows on C quickly?
  5. Date: Tue, 15 Dec 1992 22:40:32 GMT
  6. Reply-To: agpro@numond.msk.su
  7. Organization: APEX corp.
  8. Sender: news-server@moscvax.hq.demos.su
  9. Message-ID: <ABWxbBhue5@numond.msk.su>
  10. Lines: 100
  11.  
  12. I like Windows. And I like to write programs on C for Windows. But...
  13.  
  14.  
  15.           === Is writing for Windows on C easy and quick? ===
  16.  
  17.  
  18. I think easy, but ... too much words. Authors of C have escaped of this danger
  19.   (and many C-programs written BW (before Windows) looked like a puzzle or
  20.   memory dump).
  21.  
  22. 1. Many sources of programs for Windows have the same structure, because Windows
  23.      has own style of writing sources.
  24.  
  25. Now I explane my thought:
  26.   All program has a WinMain() procedure which has ether description
  27.     of class "MainWnd" (or "ProgMan" same) and code for creating main
  28.     window CreateWindow().
  29.     And usually parameters for CreateWindow() are same:
  30.       e.g.
  31.         hWnd = CreateWindow("Bum","Bum",
  32.                WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,CW_USEDEFAULT,
  33.                 CW_USEDAFAULT,CW_USEDEFAULT,NULL,NULL,hInstance,NULL);
  34.  
  35.         And so on on every line....
  36.  
  37.         How much bytes and how little sense!
  38.  
  39.   Every program I must begin with this lines (with a small variations),
  40. and all sense of DummyWin program I can describe on 2 lines:
  41.  
  42. // Voila!
  43.  
  44. WinMain {
  45.   mainwnd Bum;    // Main window is a main window
  46. }
  47.  
  48. //and nothing more.
  49.  
  50. You want to make HelloWin? Ok!
  51. Change line beginnig with "mainwnd" on:
  52.   mainwnd HellowWin "Hello World and Windows!"
  53.  
  54. You must change only name of application from program to program.
  55.  
  56.   /*
  57.      When I have wrote my first hello.c for Windows (30 lines as you see
  58.      instead 3 in C for DOS), I was disappointed. Wah! Simple program and so many
  59.      lines! I think so Windows lost many beginner-programmers.
  60.   */
  61.  
  62. You can say that it is like VB (or other Basics), but I speak that all
  63.   program on C for Windows look like bad Basic with extra parenthis and
  64.   commas.
  65.  
  66. 2. This is an agressive policy of Microsoft on sofware market.
  67.  For example:
  68.    You write an identificator "MakeProcInstance" during 3
  69.        or 2 (or 1) second.
  70.    The Microsoft programmer do not write "M-a-k-a-BackSpace-e-P-r-o-c-
  71.        -I-n-s-t-a-n-c-e",
  72.        he writes Alt-MPI and recives MakeProcInstance( );,
  73.        or maybe $MPI, or simple MPI(); (during 0.5 sec!!!)
  74.  
  75.    And now compare this! 2-3 to 0.5 is 4-6 times.
  76.    So the Microsoft programmer has advantage against you - real programmer
  77.    because during your life you can write on 5 times progams less than he.
  78.  
  79. 3. Do you know that all Windows functions definitions are writing
  80.      with first letter capital? Why? For clearity?
  81.  
  82. 4. Some other question:
  83.         Why ALL Windows applications have a same skeleton?
  84.         Why case WM_ ?
  85.         Why CW_USEDEFAULT is so long identificator?
  86.         Why my program looks like a novel?
  87.         Why every line of my program exeeds 80 columns? I am not typewriter
  88.            and I do not like to turn my head on every line!
  89.         If Microsoft use undeclared calls in his programs, it can
  90.             use a different notation! And SDK was made for naives?
  91.  
  92. 5. What can solve this problems on my mind:
  93.    a) normal preprocessor (Borland's object OWL is not solution because
  94.       it is not so soft, and there is possibility its incompatibility
  95.       with other windows-like systems in future) for Windows C.
  96.    b) new no-much-word standards on programming for Windows-like
  97.       systems (may be like on Sun).
  98.  
  99. P.S. I beg pardon Microsoft (thank you for Windows!),
  100.        and many others who speak English and C...
  101.  
  102.      ==== The program is so long, but the life is so short...====
  103.  
  104.                                        Andrew M. Gershun.
  105.  
  106. P.S.S. Am I naives boy in my "far away Russia"? Maybe you write you
  107.   program with same tools as I dream? Or, maybe, there is other
  108.   style than "like-Petzold" or "like-SDK" style? Plase answer me!
  109.  
  110.  
  111.  
  112.