No announcement yet.

properties, methodes, classes, events.... in WinApi what's the main

  • Filter
  • Time
  • Show
Clear All
new posts

  • properties, methodes, classes, events.... in WinApi what's the main

    Hi Support, James Fuller, Tom, Lance

    I buy a book and I look on the microsoft site about Win32API but
    it's very difficult for to learn.
    You have now examples about each function of API.
    It's very difficult WinAPI.

    I have the folowing questions:

    1. What's a classe in WinAPI and PowerBasic DDT?
    2. What's a propertie in WinAPI and PowerBasic DDT?
    3. What's a method in WinApi and PB DDT?
    4. What's a event in WinApi and PB DDT?
    5. What's a supclass is that a class of the Window and then create
    other components like treeview, slider etc?
    6. Is a callback procedure the same as an event in Delphi

    Can you explain it with examples



  • #2
    Classes, properties, methods and events are OOP abstractions that are
    not part of WinAPI or of PowerBASIC. No, an event is not the same as
    a callback, although a callback function has some similarities to an
    event procedure.

    Subclassing and superclassing allows you to intercept the default
    handlers for a window or control, so that you can do things like
    delete messages, change messages, or support your own custom messages.
    This does not require "classes" in the OOP sense of the word.

    There are thousands of examples of using the Windows API in these
    forums and in the Files area, from tiny simple programs to complicated
    works of art. It's an incredible resource. Use it!

    Tom Hanlin
    PowerBASIC Staff


    • #3

      I am glad to see you contribute to the forum instead of just posting
      lists of Borland terminology. What you will find as you explore the
      Windows API interface is that it already has the mechanism to write
      its own implimentation of OOP style software.

      When you create a window with CreateWindowEx(), you must first set the
      window class you require in the WNDCLASSEX structure. When you use a
      standard Windows control from a button upwards, you are using an object
      that is fully reusable and encapsulated in the operating system.

      You can write your own objects once you master writing things like custom
      controls and you can write your own code for many other things in the same

      You will find that there is not a lot of respect among forum members here
      for trying to imitate out of date Borland technology even though many of
      members know their way around the modern implimentations of OOP.

      You will remember a very large thread on OOP that was started by Florent
      Heyworth. This was a very informative one as it had many contributions
      from programmers who understood the low level technology of OOP. If you
      have a technical contribution about the low level technology required to
      make an efficient form of OOP, I am sure that other programmers would be
      interested to hear it but they will not take much notice of what you say
      if you keep posting lists of Borland terminology without any content.

      There seems to be a near religious fervour among some Delphi programmers at
      spreading the virtues of bloat, slow performance, archaic syntax and
      artificially restricted "structured" style programming but it is fair to say
      that many here do not share that fervour.


      [email protected]

      hutch at movsd dot com
      The MASM Forum - SLL Modules and PB Libraries