Announcement

Collapse
No announcement yet.

Can't find SetClassLongPtr

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

  • Can't find SetClassLongPtr

    http://msdn.microsoft.com/library/ps...class_5xf6.htm
    In which DLL ?

    ------------------
    E-MAIL: [email protected]

  • #2
    Should be User32.dll

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

    Comment


    • #3
      Borje --
      I also thought so.
      But I can't find it in any system dll and I don't see a function in C headers also.
      Probably, Microsoft plan only to integrate it.
      But from another side mentioned even Windows95.


      ------------------
      E-MAIL: [email protected]

      Comment


      • #4
        You're right. Only SetClassLongA and W there. Searched all files
        for it here, but no luck. Weird. Maybe they have been running ahead
        of themselves again and it will come in next version, XP?
        (Whistler, but just saw it will be called XP, as in "eXPert"..)

        (will probably be called "XT" among people, since knowing how it
        usually is with every Windows "update", my guess is it will make
        all current PC's act like old XT computers..


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

        Comment


        • #5
          From my M$ CD;

          Header: Declared in winuser.h; include windows.h.
          Library: Use user32.lib.
          Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.

          Gota go...


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

          Comment


          • #6
            Jules --
            I don't see user32.lib. Do you ?
            Probably this is a separate library in SDK, which is not a part of Windows.
            Maybe your MSDN offers a source C code ?

            ------------------
            E-MAIL: [email protected]

            Comment


            • #7
              MSDN jan2001

              ULONG_PTR SetClassLongPtr( HWND hWnd, // handle to window
              int nIndex, // index of value to change
              LONG_PTR dwNewLong // new value);

              Windows NT/2000: Requires Windows NT 3.1 or later.
              Windows 95/98: Requires Windows 95 or later.
              Header: Declared in Winuser.h; include Windows.h.
              Library: Use User32.lib.
              Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.

              BTW, why would you use it?

              ------------------
              hellobasic

              Comment


              • #8
                Semen;

                I don't see any source code, just a binary *.LIB file. My Hex viewer
                reveals the function strings and SetClassLongPtr is not in it. My MSDN
                CD came with a Book Set, dated OCT-1999, I'm sure outdated before it
                went to press.

                I should have noted, that at the top of page for the description of
                SetClassLongPtr() is this...

                "This is preliminary documentation and subject to change"

                As you might think, perhaps, does not exist yet????

                Regards,
                Jules

                Comment


                • #9
                  I see - "Calling SetClassLongPtr with the GCLP_WNDPROC index creates a subclass of the window class ...
                  An application can subclass a system class ..."

                  I am interesting to subclass a console.
                  SetClassLong exactly doesn't work. SetClassLongPtr ?
                  Want to check.

                  Edwin, if you have headers - can you show how to call it ?

                  I am afraid that Jules is correct, but how to understand --
                  Requires Windows NT 3.1 or later.
                  Requires Windows 95 or later.





                  ------------------
                  E-MAIL: [email protected]

                  Comment


                  • #10
                    "Windows XP" and "Office XP"... the XP stands for "eXPerience".


                    ------------------
                    Lance
                    PowerBASIC Support
                    mailto:[email protected][email protected]</A>
                    Lance
                    mailto:[email protected]

                    Comment


                    • #11
                      I remember reading somewhere that SetClassLongPtr and SetWindowLongPtr are
                      associated with the new Win64 sdk. Their definitions should be in the latest
                      headers of the platform sdk. As for the stuff shown below, I suspect that
                      Microsoft just cut and pasted it from the definitions for SetClassLong and
                      SetWindowLong.

                      Windows NT/2000: Requires Windows NT 3.1 or later.
                      Windows 95/98: Requires Windows 95 or later.
                      Header: Declared in Winuser.h; include Windows.h.
                      Library: Use User32.lib.
                      Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.

                      ------------------
                      Dominic Mitchell
                      Dominic Mitchell
                      Phoenix Visual Designer
                      http://www.phnxthunder.com

                      Comment


                      • #12
                        Hey guys,
                        I downloaded the platform sdk about 3 weeks ago from msdn(After I
                        finally got the link to the windows installer to work!) and
                        the winuser.h file has the function headers for SetClassLongPtr and
                        GetClassLongPtr defined in a #ifdef _WIN64 - #endif block which
                        seems to support what Dominic mentioned.

                        It also placed a copy of user32.lib in the c:\program files\
                        Micorsoft Platform Sdk\lib folder it created.

                        Adam

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

                        Comment


                        • #13
                          I just hooked all windows i could.
                          There ARE NO windows mesages sent to these window wich can be captured wit a standard hook.
                          Maybe i don't see it...

                          NEW:
                          It looks that the new wndproc is simply restored to the old one...

                          ------------------
                          hellobasic

                          Comment


                          • #14
                            Edwin --
                            if you are about consoles - yes, hooks don't work (and MSDN confirms this); console doesn't send messages to childs and so on.
                            Ok, it's done by design. But why it's not possible to subclass, first of all, ClassInfo ?
                            Access denied ... Terrible



                            ------------------
                            E-MAIL: [email protected]

                            Comment


                            • #15
                              I think i know the answer..

                              I think it's a separate process wich can not be set by your app.

                              I think the standard handles are simply filemapping objects.

                              I think...
                              I think...
                              I think...

                              Yawn..

                              ------------------
                              hellobasic

                              Comment

                              Working...
                              X