Results 1 to 2 of 2

Thread: subclassing

  1. #1

    Thread Starter
    Frenzied Member Microbasic's Avatar
    Join Date
    Mar 2001
    Posts
    1,402

    subclassing

    If I want to make a subclassing DLL for use in VB, do I just have to make a wrapper for SetWindowLong, like:

    Code:
    #include <windows.h>
    
    int WINAPI DllMain(HINSTANCE, DWORD, PVOID)
    {
        return TRUE;
    }
    
    extern "C" __declspec(dllexport) LONG CALLBACK VBSetWindowLong(HWND hwnd, UINT offset, LONG dwNewLong)
    {
        return SetWindowLong(hwnd, offset, dwNewLong);
    }
    
    // Concludes DLL.Standard
    or do I have to do more than this?


    MicroBasic
    Dragon Shadow Trainer

    There is no good or evil in the world...only programmers and fools .

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    If you want to make a dll now, you better use SetWindowLongPtr.

    But basically you're right, except that you don't use the _declspec thing and instead write a .def file.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width