win32: open picture dialog: workaround lcl bug with autosizing which prevent controls to apply their bounds if parent = nil and parentwnd = 0

git-svn-id: trunk@24021 -
This commit is contained in:
paul 2010-03-16 03:32:05 +00:00
parent 0118bd4b2a
commit 99dce14266

View File

@ -120,7 +120,7 @@ begin
DialogRec := POpenFileDialogRec(OpenFileName^.lCustData);
AControl := TPreviewFileDialog(DialogRec^.Dialog).PreviewFileControl;
// attach our child to the template window
SetParent(AControl.Handle, hWnd);
AControl.ParentWindow := hWnd;
GetWindowRect(stc32Handle, ARect);
ScreenToClient(hWnd, ARect.TopLeft);