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. How can I use SetWindowLongPtr function in VC6 ?

How can I use SetWindowLongPtr function in VC6 ?

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
7 Posts 3 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.
  • M Offline
    M Offline
    mesajflaviu
    wrote on last edited by
    #1

    Hi everyone . I try to use SetWindowLongPtr function to change behaviour of CComboBox control , but I get an error :

    error C2065: 'SetWindowLongPtr' : undeclared identifier

    what I can do ? I read somewhere that I need to install SDK , it's really necesary ? I mention that I use VC6 .

    L D 2 Replies Last reply
    0
    • M mesajflaviu

      Hi everyone . I try to use SetWindowLongPtr function to change behaviour of CComboBox control , but I get an error :

      error C2065: 'SetWindowLongPtr' : undeclared identifier

      what I can do ? I read somewhere that I need to install SDK , it's really necesary ? I mention that I use VC6 .

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      I think you will find that [SetWindowLong()](http://msdn.microsoft.com/en-us/library/ms633591\(VS.85\).aspx)[[^](http://msdn.microsoft.com/en-us/library/ms633591\(VS.85\).aspx "New Window")] should do what you want.

      I must get a clever new signature for 2011.

      L 1 Reply Last reply
      0
      • M mesajflaviu

        Hi everyone . I try to use SetWindowLongPtr function to change behaviour of CComboBox control , but I get an error :

        error C2065: 'SetWindowLongPtr' : undeclared identifier

        what I can do ? I read somewhere that I need to install SDK , it's really necesary ? I mention that I use VC6 .

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        mesajflaviu wrote:

        what I can do ?

        Are you including the correct header file?

        mesajflaviu wrote:

        I read somewhere that I need to install SDK , it's really necesary ?

        Not for SetWindowsLong(), but it is highly recommended.

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "Man who follows car will be exhausted." - Confucius

        L M 2 Replies Last reply
        0
        • L Lost User

          I think you will find that [SetWindowLong()](http://msdn.microsoft.com/en-us/library/ms633591\(VS.85\).aspx)[[^](http://msdn.microsoft.com/en-us/library/ms633591\(VS.85\).aspx "New Window")] should do what you want.

          I must get a clever new signature for 2011.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          I'd agree, although it's worth to mention that it's not supported for 64-bit versions of Windows. After a bit of googling I found this[^] forum post, which seems to solve the problem. Sadly, the download link to the feb 2003 platform SDK is broken, but maybe you can get it from somewhere else (I haven't tried).

          L 1 Reply Last reply
          0
          • D David Crow

            mesajflaviu wrote:

            what I can do ?

            Are you including the correct header file?

            mesajflaviu wrote:

            I read somewhere that I need to install SDK , it's really necesary ?

            Not for SetWindowsLong(), but it is highly recommended.

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "Man who follows car will be exhausted." - Confucius

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Actually it is indeed required to install the SDK in the case of Visual Studio 6, since it predates 64-bit versions of Windows and doesn't have SetWindowLongPtr without the SDK.

            1 Reply Last reply
            0
            • L Lost User

              I'd agree, although it's worth to mention that it's not supported for 64-bit versions of Windows. After a bit of googling I found this[^] forum post, which seems to solve the problem. Sadly, the download link to the feb 2003 platform SDK is broken, but maybe you can get it from somewhere else (I haven't tried).

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Thaddeus Jones wrote:

              it's not supported for 64-bit versions of Windows.

              Something which is clearly explained if one reads through the documentation for both functions.

              I must get a clever new signature for 2011.

              1 Reply Last reply
              0
              • D David Crow

                mesajflaviu wrote:

                what I can do ?

                Are you including the correct header file?

                mesajflaviu wrote:

                I read somewhere that I need to install SDK , it's really necesary ?

                Not for SetWindowsLong(), but it is highly recommended.

                "One man's wage rise is another man's price increase." - Harold Wilson

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                "Man who follows car will be exhausted." - Confucius

                M Offline
                M Offline
                mesajflaviu
                wrote on last edited by
                #7

                I try

                #include <Windows.h>

                but didn't work.

                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