Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Few Basic Questions!

Few Basic Questions!

Scheduled Pinned Locked Moved C / C++ / MFC
questionlearning
8 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Cmania
    wrote on last edited by
    #1

    Hi Im a beginner in Windows Programming Enviroment Couldnt understand the reason for following:

    1. Why are we suppossed to write WINAPI in WinMain declaration?
    2. What is meant by CALLBACK?

    See u soon!

    Spread wat u Know!

    C S H R S 5 Replies Last reply
    0
    • C Cmania

      Hi Im a beginner in Windows Programming Enviroment Couldnt understand the reason for following:

      1. Why are we suppossed to write WINAPI in WinMain declaration?
      2. What is meant by CALLBACK?

      See u soon!

      Spread wat u Know!

      C Offline
      C Offline
      C Mahesh
      wrote on last edited by
      #2

      I think you should refer to MSDN. MSDN has lot of information on this.

      1 Reply Last reply
      0
      • C Cmania

        Hi Im a beginner in Windows Programming Enviroment Couldnt understand the reason for following:

        1. Why are we suppossed to write WINAPI in WinMain declaration?
        2. What is meant by CALLBACK?

        See u soon!

        Spread wat u Know!

        S Offline
        S Offline
        ShaluMalu
        wrote on last edited by
        #3

        Refer Charles Petzold Books on Windows Programming. It has a lot of basic information!

        1 Reply Last reply
        0
        • C Cmania

          Hi Im a beginner in Windows Programming Enviroment Couldnt understand the reason for following:

          1. Why are we suppossed to write WINAPI in WinMain declaration?
          2. What is meant by CALLBACK?

          See u soon!

          Spread wat u Know!

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          See Callback [^]


          WhiteSky


          1 Reply Last reply
          0
          • C Cmania

            Hi Im a beginner in Windows Programming Enviroment Couldnt understand the reason for following:

            1. Why are we suppossed to write WINAPI in WinMain declaration?
            2. What is meant by CALLBACK?

            See u soon!

            Spread wat u Know!

            R Offline
            R Offline
            Rajesh R Subramanian
            wrote on last edited by
            #5

            Cmania wrote:

            Why are we suppossed to write WINAPI in WinMain declaration?

            WINAPI is defined as __stdcall (Don't remember where it is declared, but I am sure). Here[^] is a nice article on calling conventions.

            Cmania wrote:

            2. What is meant by CALLBACK?

            Read about callback functions here[^]


            Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

            C 1 Reply Last reply
            0
            • R Rajesh R Subramanian

              Cmania wrote:

              Why are we suppossed to write WINAPI in WinMain declaration?

              WINAPI is defined as __stdcall (Don't remember where it is declared, but I am sure). Here[^] is a nice article on calling conventions.

              Cmania wrote:

              2. What is meant by CALLBACK?

              Read about callback functions here[^]


              Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

              C Offline
              C Offline
              Cmania
              wrote on last edited by
              #6

              brahmma wrote:

              WINAPI is defined as __stdcall (Don't remember where it is declared, but I am sure). Here[^] is a nice article on calling conventions

              It was written in some book that is replaces FAR PASCAL. Is it a mere directive?

              Spread wat u Know!

              R 1 Reply Last reply
              0
              • C Cmania

                brahmma wrote:

                WINAPI is defined as __stdcall (Don't remember where it is declared, but I am sure). Here[^] is a nice article on calling conventions

                It was written in some book that is replaces FAR PASCAL. Is it a mere directive?

                Spread wat u Know!

                R Offline
                R Offline
                Rajesh R Subramanian
                wrote on last edited by
                #7

                Cmania wrote:

                It was written in some book that is replaces FAR PASCAL.

                True. From MSDN: The __pascal, __fortran, and __syscall calling conventions are no longer supported. You can emulate their functionality by using one of the supported calling conventions and appropriate linker options. WINDOWS.H now supports the WINAPI macro, which translates to the appropriate calling convention for the target. Use WINAPI where you previously used PASCAL or __far __pascal.

                Cmania wrote:

                Is it a mere directive?

                From MSDN: WINAPI is Calling convention for system functions. This type is declared in WinDef.h as follows:

                #define WINAPI __stdcall


                Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

                1 Reply Last reply
                0
                • C Cmania

                  Hi Im a beginner in Windows Programming Enviroment Couldnt understand the reason for following:

                  1. Why are we suppossed to write WINAPI in WinMain declaration?
                  2. What is meant by CALLBACK?

                  See u soon!

                  Spread wat u Know!

                  S Offline
                  S Offline
                  Stephen Hewitt
                  wrote on last edited by
                  #8

                  Both of there are macros that can be defined differently on different platforms so that the same source code can be used on each.

                  Steve

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups