Improves wince debug info and adds PageWindowProc

git-svn-id: trunk@25553 -
This commit is contained in:
sekelsenmat 2010-05-20 20:12:26 +00:00
parent c1e77e3f49
commit 82f4023793
2 changed files with 9 additions and 7 deletions

View File

@ -65,14 +65,18 @@ function CallDefaultWindowProc(Window: HWnd; Msg: UInt; WParam: Windows.WParam;
var
PrevWndProc: Windows.WNDPROC;
setComboWindow: boolean;
WindowInfo: PWindowInfo;
begin
{$ifdef MSG_DEBUG}
DebugLn('Trace:CallDefaultWindowProc - Start');
{$endif}
PrevWndProc := GetWindowInfo(Window)^.DefWndProc;
WindowInfo := GetWindowInfo(Window);
PrevWndProc := WindowInfo^.DefWndProc;
if (PrevWndProc = nil) or (PrevWndProc = @WindowProc) // <- prevent recursion
then begin
or ((WindowInfo^.WinControl <> nil) and (WindowInfo^.WinControl is TTabSheet)) then
begin
{$ifdef MSG_DEBUG}
DebugLn('Trace:CallDefaultWindowProc - A');
{$endif}

View File

@ -288,7 +288,7 @@ end;
function PageWindowProc(Window: HWnd; Msg: UInt; WParam: Windows.WParam;
LParam: Windows.LParam): LResult; {$ifdef win32}stdcall{$else}cdecl{$endif};
begin
// Result := WindowProc(Window, Msg, WParam, LParam);
Result := WindowProc(Window, Msg, WParam, LParam);
end;
class function TWinCEWSCustomPage.CreateHandle(const AWinControl: TWinControl;
@ -307,10 +307,8 @@ begin
with Params do
begin
pClassName := @ClsName;
SubClassWndProc := nil;//@PageWindowProc;
// Params.Flags := WS_CHILD or WS_CLIPSIBLINGS or WS_CLIPCHILDREN;
// Flags := Flags and not WS_VISIBLE;
// Params.FlagsEx := WS_EX_CONTROLPARENT;
SubClassWndProc := @PageWindowProc;
Flags := Flags and not WS_VISIBLE;
end;
// create window
FinishCreateWindow(AWinControl, Params, false);