Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#6

Re: Übersetzung Class MagneticWindow

  Alt 9. Okt 2006, 15:46
Code:
Private Const ALL_MESSAGES    As Long = -1          'All messages added or deleted
Private Const CODE_LEN        As Long = 197         'Length of the machine code in bytes
Private Const GWL_WNDPROC     As Long = -4          'Get/SetWindow offset to the WndProc procedure address
Private Const PATCH_04         As Long = 88          'Table B (before) address patch offset
Private Const PATCH_05         As Long = 93          'Table B (before) entry count patch offset
Private Const PATCH_08         As Long = 132         'Table A (after) address patch offset
Private Const PATCH_09         As Long = 137         'Table A (after) entry count patch offset
Delphi-Quellcode:
Const
ALL_MESSAGES : Integer = -1; //All messages added or deleted
CODE_LEN : Integer = 197; //Length of the machine code in bytes
GWL_WNDPROC : Integer = -4; //Get/SetWindow offset to the WndProc procedure address
PATCH_04 : Integer = 88; //Table B (before) address patch offset
PATCH_05 : Integer = 93; //Table B (before) entry count patch offset
PATCH_08 : Integer = 132; //Table A (after) address patch offset
PATCH_09 : Integer = 137; //Table A (after) entry count patch offset
Das dürfte wohl so stimmen, GWL_WNDPROC wird man wohl entfernen können
da die Const eigentlich in der Windows.pas vorhanden sein müßte.

Code:
Private Type tSubData                               'Subclass data type
    hwnd                      As Long              'Handle of the window being subclassed
    nAddrSub                  As Long              'The address of our new WndProc (allocated memory).
    nAddrOrig                 As Long              'The address of the pre-existing WndProc
    nMsgCntA                  As Long              'Msg after table entry count
    nMsgCntB                  As Long              'Msg before table entry count
    aMsgTblA()                As Long              'Msg after table array
    aMsgTblB()                As Long              'Msg Before table array
End Type
Hier bin ich nicht sicher wie ich mit dem Variablen array verfahren soll.

Edit:
Denke so gehts!
Delphi-Quellcode:
Type TSubData = ^SubData; //Subclass data type
    SubData = record
    hwnd : Integer; //Handle of the window being subclassed
    nAddrSub : Integer; //The address of our new WndProc (allocated memory).
    nAddrOrig : Integer; //The address of the pre-existing WndProc
    nMsgCntA : Integer; //Msg after table entry count
    nMsgCntB : Integer; //Msg before table entry count
    aMsgTblA : array [] of Integer; //Msg after table array
    aMsgTblB : array [] of Integer; //Msg Before table array
End;
gruß
  Mit Zitat antworten Zitat