Announcement

Collapse
No announcement yet.

Help: Newbie: Learning windows with Programming Windows by Petzold

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help: Newbie: Learning windows with Programming Windows by Petzold

    I've downloaded Petzold.zip for PowerBasic. Unzipped the files

    20-04-99 09:06a 4,085 CHAPT02.ZIP
    20-04-99 09:06a 14,130 CHAPT03.ZIP
    20-04-99 09:06a 43,131 CHAPT04.ZIP
    20-04-99 09:06a 14,106 CHAPT05.ZIP
    20-04-99 09:36a 18,605 CHAPT06.ZIP
    20-04-99 09:36a 17,019 CHAPT07.ZIP
    20-04-99 09:36a 25,191 CHAPT08.ZIP
    20-04-99 09:36a 13,297 CHAPT09.ZIP
    20-04-99 09:36a 27,634 CHAPT10.ZIP
    20-04-99 09:36a 36,804 CHAPT11.ZIP
    20-04-99 09:36a 51,360 CHAPT12.ZIP
    07-11-01 04:37p 72,243 CHAPT12A.ZIP
    20-04-99 09:36a 1,871 CHAPT13.ZIP
    20-04-99 09:36a 18,046 CHAPT14.ZIP
    20-04-99 09:36a 38,695 CHAPT15.ZIP
    27-04-99 06:10a 3,984 CHAPT16.ZIP
    13-11-00 04:45p 26,026 CHAPT17.ZIP
    21-04-99 10:59a 7,560 CHAPT18.ZIP
    21-04-99 10:59a 24,805 CHAPT19.ZIP
    1727-04-99 06:10a 144,782 INCLUDE.ZIP
    21-04-99 10:59a 182,688 PBINC.ZIP
    and
    opened 17-04-99 11:06a 6,952 NOTES.ASC

    I am familiar at programming in PBCC4 but PBWIN8 I am lost.

    I unzip Chapter 2.

    Ran HelloWin.bas with PBWIN8.01 and got error 549 at line 44
    "lpCmdLine AS ASCIIZ PTR,_ "

    I thought the examples given in http://www.powerbasic.com/support/
    would be working with PBWIN8.01- !

    What should I do to correct the problem with Chapter 1, 2,3,4 etc...?

    Should I setup these examples in a special directory on my computer?

    Does anyone knows if there are PB installation instructions coming with this file?

    I am just guessing the question above.

    Guy




    ------------------
    Private Website:
    Guy's Website -
    SMS me on 0405 161 366 Brisbane, Australia
    Private Website:
    Guy's Website -
    Brisbane, Australia

  • #2
    These examples were taken from the book and modified to work with
    PB. They are meant to be used with the book.. that being said..
    my memory is telling me the error you are getting is due to a minor
    change in PB 8 that you will need to make. Don't take this as gospel
    but I think you need to add BYVAL before the 'lpCmdLine'..


    You may find moving from DOS to windows a bit overwhelming. There is
    a lot of boiler plate code needed simply to make the framework for
    your windows application. There is also a change in the basic working
    of your code.. DOS apps are linear in nature and work from the top down
    so to speak, whereas windows programs are event driven.. once you have
    your framework built your app will work based on controls you include
    in your application.
    It's not real hard, just a shift in the way you think about program flow.

    ------------------
    Warped by the rain, Driven by the snow...

    padgettjatcomcastdotnet



    [This message has been edited by Jim Padgett (edited July 20, 2006).]
    Warped by the rain, Driven by the snow...

    jimatluv2rescue.com

    Comment


    • #3
      Originally posted by G North:
      Ran HelloWin.bas with PBWIN8.01 and got error 549 at line 44
      "lpCmdLine AS ASCIIZ PTR,_ "
      change to :
      BYVAL lpCmdLine AS ASCIIZ PTR,_

      SY,

      P.S.
      PBWin 8.xx requre pass Any pointers ByVal.

      ------------------
      -=Alex=-

      [This message has been edited by Aleksandr Dobrev (edited July 20, 2006).]
      -=Alex=-

      Comment


      • #4
        Don't forget the compiler Help file.

        Error 549 - BYVAL required with pointers

        549 BYVAL required with pointers - Pointers may only be passed BYVAL. Add an explicit BYVAL to the Sub/Function declaration and prototype.
        Previous versions of PowerBASIC used an implied BYVAL.
        The above is from PBCC 4.01 and repeated with PBWin 8.

        ------------------

        Comment


        • #5
          Guy,

          Just put 3rd installment of my Sdk programming series over in
          Source code. Hope it helps. In all Fuller's Petzold adaptations
          you'll have to make sure the Byval override is specified. That
          comes up all the time with me cuz I'm always moving between my
          PB 6.11, 7.04 and 8.1 installations. I tested the program with
          all three and it is OK.

          ------------------
          Fred
          Fred
          "fharris"+Chr$(64)+"evenlink"+Chr$(46)+"com"

          Comment


          • #6
            Guy, I would recommend that you take a look at www.m4ware.com. The owner of this web site
            is Ed Turner who is writing a book for PowerBasic for Windows. You will find the first five
            chapters there in pdf files. Since his book is based on PBWin ver 7, rather than ver 8.01,
            his pointer variables also need to be declared as BYVAL for your ver 8.01 compiler.

            His approach is based on the SDK programming style and is very, very readable, perfect for
            someone coming to Windows programming from DOS. Chapter 1 explains in great detail the
            "helloWin" code you are referring to, and chapter 2 explains a window with a few controls
            added, coded both for SDK and DDT and explained so that you can see the difference.

            I think Ed is doing a fantastic job with this book and when it is finally published, I will
            buy it in a heartbeat. Take a look... I think you will be impressed as well.

            ------------------

            Comment


            • #7
              guy,

              all this was recently discussed at ...
              http://www.powerbasic.com/support/pb...ad.php?t=33425



              ------------------
              fred
              Fred
              "fharris"+Chr$(64)+"evenlink"+Chr$(46)+"com"

              Comment


              • #8
                Guy, You may recall visiting me some years ago when you were working with PB Vision.
                Moving into Windows isn't that easy for an old DOS man but PB makes a big difference.
                You may also care to look at Chris Boss' EZGUI, the latest version of which should be out shortly.
                Regards,
                Brian.


                ------------------
                Brian.

                Comment


                • #9
                  Originally posted by Jim Padgett:
                  ...They are meant to be used with the book...
                  my memory is telling me the error you are getting is due to a minor
                  change in PB 8 that you will need to make. Don't take this as gospel
                  but I think you need to add BYVAL before the 'lpCmdLine'..
                  ..overwhelming... a lot of boiler plate code..
                  framework for your windows application. .. DOS apps are linear
                  .. windows programs are event driven.. once you have
                  your framework built your app will work based on controls you include
                  in your application.
                  It's not real hard, just a shift in the way you think about program flow.
                  Thanks
                  Guy



                  ------------------
                  Private Website:
                  Guy's Website -
                  SMS me on 0405 161 366 Brisbane, Australia
                  Private Website:
                  Guy's Website -
                  Brisbane, Australia

                  Comment


                  • #10
                    Originally posted by Aleksandr Dobrev:
                    change to :
                    BYVAL lpCmdLine AS ASCIIZ PTR,_
                    ..PBWin 8.xx requre pass Any pointers ByVal.
                    Aleksandr thank you for code and tip.
                    It worked well on the first 3 chapters.
                    I'l try the other example later.
                    Guy

                    ------------------
                    Private Website:
                    Guy's Website -
                    SMS me on 0405 161 366 Brisbane, Australia
                    Private Website:
                    Guy's Website -
                    Brisbane, Australia

                    Comment


                    • #11
                      originally posted by fred harris:
                      guy,
                      .. 3rd installment of my sdk programming series.
                      thanks fred.
                      i found your 3 examples at http://www.powerbasic.com/support/pb...ad.php?t=25174
                      and they all work well with excellent explanation.

                      you mention sdk in your header.

                      what exactly is sdk?
                      when i use pbform ( i tried unsuccessfully so far) the code is ddt.

                      what part of the code is ddt?
                      can i mix the 2 codes.

                      in the last 2 years i've read many posting and documents about
                      programming in pbwindows

                      - i am more confused than ever.

                      because at the present i haven't got enough knowledge
                      to detect a code written in sdk or one in ddt.
                      two weeks ago i didn't know there was a difference between sdk and ddt.

                      guy
                      what part of the code is ddt?
                      can i mix the 2 codes.

                      in the last 2 years i've read many posting and documents about
                      programing in pbwindows

                      - i am more confused than ever.

                      because at the present i haven't got enpough knowledge
                      to detect a code writen in sdk or one in ddt.
                      two weeks ago i didn't know there was a difference betwen sdk and ddt.

                      guy


                      ------------------
                      private website:
                      guy's website -
                      sms me on 0405 161 366 brisbane, australia
                      Private Website:
                      Guy's Website -
                      Brisbane, Australia

                      Comment


                      • #12
                        Originally posted by Charles Dietz:
                        Guy, I would recommend that you take a look at www.m4ware.com. The owner of this web site
                        is Ed Turner ... and chapter 2 explains a window with a few controls
                        added, coded both for SDK and DDT and explained so that you can see the difference.

                        I think Ed is doing a fantastic job with this book and when it is finally published, I will
                        buy it in a heartbeat. Take a look... I think you will be impressed as well.

                        Charles thank you.

                        I agree Ed Turner is making a fantastic job because he explaining
                        the difference between SDK and DDT and making many other points.

                        I never had any major problem programming in PBCC4, previous
                        version since 1995 and using 3rd party pgr.
                        Three years ago when I tried to learn PBDLL and PBWN I could not
                        understand the logic of the answers given to me in PB at
                        different levels. There was no tutorial and no sequateur examples.

                        Seeing in the last few months documents like Ed Turner and others,
                        I realized to-day the answers given to me on "PBWIN" at that time
                        were misleading, confusing and irrelevant.

                        Three years ago ++ , why trying to confuse a newbie to PBWIN?

                        Guy


                        ------------------
                        Private Website:
                        Guy's Website -
                        SMS me on 0405 161 366 Brisbane, Australia
                        Private Website:
                        Guy's Website -
                        Brisbane, Australia

                        Comment


                        • #13
                          Originally posted by Brian Reynolds:
                          Guy, You may recall visiting me some years ago when you were working with PB Vision.
                          Moving into Windows isn't that easy for an old DOS man but PB makes a big difference.
                          You may also care to look at Chris Boss' EZGUI, the latest version of which should be out shortly.
                          Regards,
                          Brian.


                          Hello Brian
                          Yes I remember.
                          Chris Boss' EZGUI,--> excellent
                          Thanks

                          Guy


                          ------------------
                          Private Website:
                          Guy's Website -
                          SMS me on 0405 161 366 Brisbane, Australia
                          Private Website:
                          Guy's Website -
                          Brisbane, Australia

                          Comment


                          • #14
                            In all Fuller's Petzold adaptations you'll have to make sure the Byval override is specified.
                            Why do you keep crediting Fuller (Robert) with the Petzold translations? Are we not referring to those by a fellow called Keith Waters at http://www.powerbasic.com/files/pub/pbwin/petzold.zip .


                            ------------------

                            Comment


                            • #15
                              Hi,

                              Maybe stuppid but why are these samples not updated, or at least has stated somewhere
                              that you have to do some tweaking.

                              Adrian

                              ------------------
                              To Ask or Not To Ask ?
                              To Ask or Not To Ask ?

                              Comment


                              • #16
                                The samples were a spin-off from my climbing of the Win32 learning curve several years back. The reason you have to do some tweaking is because of compiler changes since they were written. They are presented “as is” and it is not PB’s responsibility to update them. I doubt if I will ever get round to updating them, but there is nothing to stop you or someone else volunteering.

                                ------------------

                                Comment


                                • #17
                                  Keith,

                                  I'm the dasterdly fellow who originally started the Fuller
                                  myth on the Petzold translations, and it is completely my fault.
                                  I'm very sorry about it. I hope you'll accept my apology. I've
                                  done a fellow wrong here to whom I own instead a lot of thanks
                                  because those translations you did really helped me learn PB.
                                  As soon as I saw your post that really set my head spinning
                                  and I immediately downloaded the files again and finally saw
                                  your name in the HelloWin.bas program. Somehow I must have got
                                  it in my mind (incorrectly) that it was Robert Fuller, possibly
                                  due to the fact that I downloaded his Inc files of the ODBC C
                                  headers, and I guess somehow in my mind associated it incorectly
                                  with yours too. My father always told me a poor excuse is better
                                  than none, so there you have it. I really am sorry about it

                                  Fred

                                  ------------------
                                  Fred
                                  Fred
                                  "fharris"+Chr$(64)+"evenlink"+Chr$(46)+"com"

                                  Comment


                                  • #18
                                    If there aren't copyright issues, maybe it will do and post them in my
                                    forum, that allows attachments of pictures and files, making it easier
                                    to update. Meanwhile, here is an HelloWin program that adds some features
                                    like the call to IsDialogMessage in the message pump to be able to close
                                    the application using the ESC key, how to intercept the %WM_SYSCOMMAND
                                    message and how to ask confirmation to end the program processing the
                                    %WM_CLOSE message.

                                    Code:
                                    ' ========================================================================================
                                    ' HELLOWIN.BAS
                                    ' Displays "Hello, Windows!" in the client area of the main window.
                                    ' ========================================================================================
                                    
                                    #COMPILE EXE
                                    #DIM ALL
                                    #INCLUDE "WIN32API.INC"
                                    
                                    ' ========================================================================================
                                    ' Main
                                    ' ========================================================================================
                                    FUNCTION WinMain ( _
                                       BYVAL hInstance      AS DWORD, _       ' handle of current instance
                                       BYVAL hPrevInstance  AS DWORD, _       ' handle of previous instance (not used in Win32)
                                       BYVAL pszCmdLine     AS ASCIIZ PTR, _  ' address of command line
                                       BYVAL nCmdShow       AS LONG _         ' show state of window
                                       ) AS LONG
                                    
                                       LOCAL szClassName    AS ASCIIZ * 256   ' class name
                                       LOCAL wcex           AS WNDCLASSEX     ' class information
                                       LOCAL Msg            AS tagMsg         ' message information
                                       LOCAL szCaption      AS ASCIIZ * 256   ' window caption
                                       LOCAL hWndMain       AS DWORD          ' handle of main window
                                       LOCAL rc             AS RECT           ' window coordinates
                                       LOCAL nLeft          AS LONG           ' x-coordinate of the upper-left corner of the rectangle
                                       LOCAL nTop           AS LONG           ' y-coordinate of the upper-left corner of the rectangle
                                       LOCAL nWidth         AS LONG           ' x-coordinate of the lower-right corner of the rectangle
                                       LOCAL nHeight        AS LONG           ' y-coordinate of the lower-right corner of the rectangle
                                    
                                       ' -------------------------------------------------------------------------------------
                                       ' Register the window class.
                                       ' The RegisterClassEx function registers a window class for subsequent use in calls
                                       ' to the CreateWindow or CreateWindowEx function. The older RegisterClass function does
                                       ' not allow you to set the small icon. 
                                       ' -------------------------------------------------------------------------------------
                                    
                                       szClassName        = "HelloWin"
                                       wcex.cbSize        = SIZEOF(wcex)                              ' size of WNDCLASSEX structure
                                       wcex.style         = %CS_HREDRAW OR %CS_VREDRAW                ' class styles
                                       wcex.lpfnWndProc   = CODEPTR(WndProc)                          ' address of window procedure used by class
                                       wcex.cbClsExtra    = 0                                         ' extra class bytes
                                       wcex.cbWndExtra    = 0                                         ' extra window bytes
                                       wcex.hInstance     = hInstance                                 ' instance of the process that is registering the window
                                       wcex.hIcon         = LoadIcon(%NULL, BYVAL %IDI_APPLICATION)   ' handle of class icon
                                       wcex.hCursor       = LoadCursor(%NULL, BYVAL %IDC_ARROW)       ' handle of class cursor
                                       wcex.hbrBackground = GetStockObject(%WHITE_BRUSH)              ' brush used to fill background of window's client area
                                       wcex.lpszMenuName  = %NULL                                     ' resource identifier of the class menu
                                       wcex.lpszClassName = VARPTR(szClassName)                       ' class name
                                       wcex.hIconSm       = %NULL                                     ' handle of small icon shown in caption/system Taskbar
                                    
                                       IF ISFALSE RegisterClassEx(wcex) THEN
                                          FUNCTION = %TRUE
                                          EXIT FUNCTION
                                       END IF
                                    
                                       ' -------------------------------------------------------------------------------------
                                       ' Create the main window.
                                       ' The CreateWindowEx function creates an overlapped, pop-up, or child window with an
                                       ' extended style; otherwise, this function is identical to the CreateWindow function.
                                       ' It specifies the window class, window title, window style, and (optionally) the
                                       ' initial position and size of the window. The function also specifies the window's
                                       ' parent or owner, if any, and the window's menu. 
                                       ' -------------------------------------------------------------------------------------
                                    
                                       ' Retrieve the size of the working area
                                       SystemParametersInfo %SPI_GETWORKAREA, 0, BYVAL VARPTR(rc), 0
                                    
                                       ' Calculate the position and size of the window (just a way of doing it, use
                                       ' wathever method better suits you or fixed values)
                                       nWidth  = (((rc.nRight - rc.nLeft)) + 2) * 0.75   ' 75% of the client screen width
                                       nHeight = (((rc.nBottom - rc.nTop)) + 2) * 0.70   ' 70% of the client screen height
                                       nLeft   = ((rc.nRight - rc.nLeft) \ 2) - nWidth \ 2
                                       nTop    = ((rc.nBottom - rc.nTop) \ 2) - (nHeight \ 2)
                                       
                                       ' Window caption
                                       szCaption = "The Hello Program"
                                       
                                       ' Create the window
                                       hWndMain = CreateWindowEx (0, _                     ' extended style
                                                                  szClassName, _           ' window class name
                                                                  szCaption, _             ' window caption
                                                                  %WS_OVERLAPPEDWINDOW, _  ' window style
                                                                  nLeft, _                 ' initial x position
                                                                  nTop, _                  ' initial y position
                                                                  nWidth, _                ' initial x size
                                                                  nHeight, _               ' initial y size
                                                                  %NULL, _                 ' parent window handle
                                                                  %NULL, _                 ' window menu handle
                                                                  hInstance, _             ' program instance handle
                                                                  BYVAL %NULL)             ' creation parameters
                                    
                                       ' -------------------------------------------------------------------------------------
                                       ' The ShowWindow function sets the specified window's show state. 
                                       ' -------------------------------------------------------------------------------------
                                    
                                       ShowWindow hWndMain, nCmdShow
                                       
                                       ' -------------------------------------------------------------------------------------
                                       ' The UpdateWindow function updates the client area of the specified window by sending
                                       ' a %WM_PAINT message to the window if the window's update region is not empty. The
                                       ' function sends a WM_PAINT message directly to the window procedure of the specified
                                       ' window, bypassing the application queue. If the update region is empty, no message
                                       ' is sent. 
                                       ' -------------------------------------------------------------------------------------
                                    
                                       UpdateWindow hWndMain
                                    
                                       ' -------------------------------------------------------------------------------------
                                       ' Main message loop of the program.
                                       ' GetMessage retrieves a message from the calling thread's message queue and places it
                                       ' in the specified structure.
                                       ' The TranslateMessage function translates virtual-key messages into character messages.
                                       ' The character messages are posted to the calling thread's message queue, to be read
                                       ' the next time the thread calls the GetMessage or PeekMessage function. 
                                       ' The DispatchMessage function dispatches a message to a window procedure. It is
                                       ' typically used to dispatch a message retrieved by the GetMessage function. 
                                       ' The IsDialogMessage function determines whether a message is intended for the
                                       ' specified dialog box and, if it is, processes the message. 
                                       ' Note: For a good article about message pumps, see the PowerBASIC Gazette #38,
                                       ' available at: [url="http://www.powerbasic.com/files/pub/docs/gazette/"]http://www.powerbasic.com/files/pub/docs/gazette/[/url] 
                                       ' -------------------------------------------------------------------------------------
                                    
                                       WHILE GetMessage(Msg, %NULL, 0, 0)
                                          IF ISFALSE IsDialogMessage(hWndMain, Msg) THEN
                                             TranslateMessage Msg
                                             DispatchMessage Msg
                                          END IF
                                       WEND
                                    
                                       FUNCTION = Msg.wParam
                                    
                                    END FUNCTION
                                    ' ========================================================================================
                                    
                                    ' ========================================================================================
                                    ' Main dialog callback.
                                    ' ========================================================================================
                                    FUNCTION WndProc ( _
                                       BYVAL hWnd     AS DWORD, _ ' window handle
                                       BYVAL wMsg     AS DWORD, _ ' type of message
                                       BYVAL wParam   AS DWORD, _ ' first message parameter
                                       BYVAL lParam   AS LONG _   ' second message parameter
                                       ) AS LONG
                                    
                                       LOCAL ps  AS PAINTSTRUCT
                                       LOCAL rc  AS RECT
                                       LOCAL hdc AS LONG
                                    
                                       SELECT CASE wMsg
                                    
                                          CASE %WM_CREATE
                                             ' -------------------------------------------------------------------------------
                                             ' Message received after the call to CreateWindow or CreateWindowEx.
                                             ' It is received after the window is created, but before the window becomes visible. 
                                             ' If an application processes this message, it should return 0 to continue
                                             ' creation of the window. If the application returns -1, the window is destroyed
                                             ' and the CreateWindowEx or CreateWindow function returns a NULL handle. 
                                             ' -------------------------------------------------------------------------------
                                             FUNCTION = 0
                                             EXIT FUNCTION
                                    
                                          CASE %WM_SYSCOMMAND
                                             ' -------------------------------------------------------------------------------
                                             ' A window receives this message when the user chooses a command from the window
                                             ' menu (also known as the System menu or Control menu) or when the user chooses
                                             ' the Maximize button or Minimize button.
                                             ' An application should return zero if it processes this message.
                                             ' -------------------------------------------------------------------------------
                                             ' Capture this message and send a WM_CLOSE message
                                             IF (wParam AND &HFFF0) = %SC_CLOSE THEN
                                                SendMessage hWnd, %WM_CLOSE, wParam, lParam
                                                FUNCTION = 0
                                                EXIT FUNCTION
                                             END IF
                                    
                                          CASE %WM_COMMAND
                                             ' -------------------------------------------------------------------------------
                                             ' Messages from controls and menu items are handled here.
                                             ' -------------------------------------------------------------------------------
                                             SELECT CASE LOWRD(wParam)
                                    
                                                CASE %IDCANCEL
                                                   IF HIWRD(wParam) = %BN_CLICKED THEN
                                                      SendMessage hWnd, %WM_CLOSE, wParam, lParam
                                                      FUNCTION = 0
                                                      EXIT FUNCTION
                                                   END IF
                                    
                                             END SELECT
                                    
                                          CASE %WM_PAINT
                                             ' -------------------------------------------------------------------------------
                                             ' This message is received when the UpdateWindow or RedrawWindow function is
                                             ' called, or by the DispatchMessage function when the application obtains
                                             ' a %WM_PAINT message by using the GetMessage or PeekMessage function. 
                                             ' An application should return zero if it processes this message. 
                                             ' -------------------------------------------------------------------------------
                                             hdc = BeginPaint(hWnd, ps)                            ' prepares the specified window for painting
                                             GetClientRect hWnd, rc                                ' retrieves the coordinates of the window's client area.
                                             DrawText hdc, "Hello, Windows!", -1, rc,_             ' draws formatted text in the specified rectangle.
                                                      %DT_SINGLELINE OR %DT_CENTER OR %DT_VCENTER
                                             EndPaint(hWnd, ps)                                    ' marks the end of painting in the specified window.
                                             FUNCTION = 0
                                             EXIT FUNCTION
                                    
                                          CASE %WM_CLOSE
                                             ' --------------------------------------------------------------------------------
                                             ' The %WM_CLOSE message is received as a signal that a window or an application
                                             ' should terminate. It is received before the %WM_DESTROY message and it can be
                                             ' used to confirm program exit or other tasks.
                                             ' If an application processes this message, it should return zero. 
                                             ' --------------------------------------------------------------------------------
                                             IF MessageBox(BYVAL hWnd, "Are you sure you want to quit the application?   ", _
                                                " Exit", %MB_YESNO OR %MB_ICONQUESTION OR %MB_APPLMODAL) = %IDNO THEN
                                                FUNCTION = 0
                                                EXIT FUNCTION
                                             END IF
                                    
                                    
                                         CASE %WM_DESTROY
                                             ' -------------------------------------------------------------------------------
                                             ' Received when the window is being destroyed.
                                             ' If an application processes this message, it should return zero. 
                                             ' The PostQuitMessage function indicates to Windows that a thread has made a
                                             ' request to terminate (quit). It is typically used in response to a %WM_DESTROY
                                             ' message. 
                                             ' -------------------------------------------------------------------------------
                                             PostQuitMessage 0
                                             FUNCTION = 0
                                             EXIT FUNCTION
                                    
                                       END SELECT
                                    
                                       ' -------------------------------------------------------------------------------------
                                       ' The DefWindowProc function calls the default window procedure to provide default
                                       ' processing for any window messages that an application does not process. This function
                                       ' ensures that every message is processed. DefWindowProc is called with the same
                                       ' parameters received by the window procedure. 
                                       ' -------------------------------------------------------------------------------------
                                       FUNCTION = DefWindowProc(hWnd, wMsg, wParam, lParam)
                                    
                                    END FUNCTION
                                    Forum: http://www.jose.it-berater.org/smfforum/index.php

                                    Comment


                                    • #19
                                      As pointed by Petzold, "Most of HELLOWIN.C is overhead found in virtually
                                      every Windows program. Nobody really memorizes all the syntax to write this
                                      overhead; generally, Windows programmers begin a new program by copying an
                                      existing program and making appropriate changes to it."


                                      [This message has been edited by José Roca (edited July 21, 2006).]
                                      Forum: http://www.jose.it-berater.org/smfforum/index.php

                                      Comment


                                      • #20
                                        Figure that out yet with the Sdk Guy? Whenever Microsoft comes
                                        out with a new programming paradigm they put out include files
                                        and help docs they call a 'software development kit'.

                                        While I've never used the DDT commands, they look to me like
                                        wrappers around the Window Application Programming Interface
                                        functions contained mostly in Kernel32.dll, Gdi32.dll and
                                        User32.dll, the main components of Windows. I guess DDT and
                                        Windows Forms takes some of the bite out of the Api.

                                        ------------------
                                        Fred
                                        Fred
                                        "fharris"+Chr$(64)+"evenlink"+Chr$(46)+"com"

                                        Comment

                                        Working...
                                        X