mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-10 13:19:16 +02:00
parent
0db8bb8288
commit
415177dd6d
@ -139,10 +139,12 @@ type
|
||||
|
||||
TWinCEWidgetSet = class(TWidgetSet)
|
||||
private
|
||||
// The parent of all windows, represents the button of the taskbar
|
||||
// This window is also the owner of the clipboard.
|
||||
// Assoc. windowproc also acts as handler for popup menus
|
||||
FAppHandle: HWND;//roozbeh:in win32 it was parrent of all..a window on taskbar
|
||||
// In win32 it was: The parent of all windows, represents the button of the taskbar
|
||||
// In wince it is just an invisible window, but retains the following functions:
|
||||
// * This window is also the owner of the clipboard.
|
||||
// * Assoc. windowproc also acts as handler for popup menus
|
||||
// * It is indispensable for popupmenus and thread synchronization
|
||||
FAppHandle: HWND;
|
||||
|
||||
FMetrics: TNonClientMetrics;
|
||||
FMetricsFailed: Boolean;
|
||||
|
@ -147,14 +147,15 @@ begin
|
||||
end;
|
||||
|
||||
// Create parent of all windows, 'button on taskbar'
|
||||
// does this work on wince?!
|
||||
(*FAppHandle := CreateWindowExW(0, @ClsName,
|
||||
// The AppHandle window is necessary for popupmenus and
|
||||
// many other features, see bug 14560
|
||||
FAppHandle := CreateWindowExW(0, @ClsName,
|
||||
PWideChar(UTF8Decode(Application.Title)),
|
||||
WS_POPUP or WS_CLIPSIBLINGS {or WS_CAPTION} or WS_SYSMENU or WS_MINIMIZEBOX,
|
||||
WS_POPUP or WS_CLIPSIBLINGS or WS_CAPTION or WS_SYSMENU or WS_MINIMIZEBOX,
|
||||
0, {Windows.GetSystemMetrics(SM_CXSCREEN) div 2,}
|
||||
0, {Windows.GetSystemMetrics(SM_CYSCREEN) div 2,}
|
||||
0, 0, HWND(nil), HMENU(nil), HInstance, nil);
|
||||
AllocWindowInfo(FAppHandle);*)
|
||||
AllocWindowInfo(FAppHandle);
|
||||
|
||||
// set nice main icon
|
||||
SendMessage(FAppHandle, WM_SETICON, ICON_BIG,
|
||||
|
@ -158,7 +158,9 @@ begin
|
||||
if AWinControl.Parent <> nil then
|
||||
Parent := AWinControl.Parent.Handle
|
||||
else
|
||||
Parent := TWinCEWidgetSet(WidgetSet).AppHandle;
|
||||
// Never set the parent of a window to AppHandle,
|
||||
// otherwise wince will really try to make it a child
|
||||
Parent := 0;
|
||||
|
||||
SubClassWndProc := @WindowProc;
|
||||
StrCaption := AWinControl.Caption;
|
||||
|
Loading…
Reference in New Issue
Block a user