![]() |
HILFE! WinProc als Objekt methot zu benutzen?wenn überhaupt
so was hab ich bid jetzt benuzt :
Code:
es ist ein "MainFram" für non VLC. Bis jetzt müsste ich die Fensterprocedure immer auserhalb des Objektes zu definieren.
type
TMain = Class //private FHandle: HWND; FWidth, FHeight, FTop, FLeft: integer; FCur: TCursorType;//HCURSOR; FColor: Cardinal; FCaption: string; FBrush_BK : HBRUSH; FDeviceContext: HDC; FParent: TMain; FOnClick: TEvent; protected procedure SetParent( val:TMain ); procedure SetCaption( val:string); procedure SetCur( val: TCursorType); procedure SetLeft( Val: Integer); procedure SetTop( Val: Integer); procedure SetWidth( Val: Integer); procedure SetHeight( Val : Integer); procedure UpdateSize(); procedure SetColor( val: Cardinal); procedure Click(); public destructor Destroy();override; constructor Create(Parent_:TMain=nil; Style_: Integer=0); function HasFocus(): Boolean; property Top: integer read FTop write SetTop; property Left: integer read FLeft write SetLeft; property Width: integer read FWidth write SetWidth; property Height: integer read FHeight write SetHeight; property Handle: HWND read FHandle; property Cursor : TCursorType read FCur write SetCur; property Color: Cardinal read FColor write SetColor; property Caption: string read FCaption write SetCaption; property DeviceContext: HDC read FDeviceContext; property Parent: TMain read FParent write SetParent; end; also :
Code:
und dann noch:
function MainProc(Handle_: HWND; uMsg: UINT; wp: WPARAM; lp: LPARAM): longint; stdcall;
Code:
Wenn ich die MainProc als TMain method definiere dann kann ich sie niergendwie als Fensterprocedure zuweisen??
var wc : TWndClassEx;
***** wc.lpfnWndProc := @MainProc; ***** RegisterClassEx(wc); Meine Frage : Geht das überhaupt und wenn ja, WIE ? danke. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:52 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz