Results 1 to 2 of 2

Thread: Getting STRUCTURE info from a pointer

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Location
    Long Beach, California
    Posts
    3

    Arrow

    i am subclassing, and the lParam ends up returning a pointer to a structure of type MDICREATESTRUCTURE..
    i want to know how i can access data in this structure when all i have is a pointer???
    any ideas?
    thanks
    jeffrey

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    use the CopyMemory API

    Code:
    Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
    and put this in your substitute window procedure

    Code:
    Dim uMDIStruct As MDICREATESTRUCTURE
    
    CopyMemory uMDIStruct, ByVal lParam, LenB(uMDIStruct)
    then make all your changes to uMDIStruct and copy them back to lParam with
    Code:
    CopyMemory ByVal lParam, uMDIStruct, LenB(uMDIStruct)

    Hope this helps


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