![]() |
CheckBox in TOpendialog einfügen
hallo,
das einfügen von 2 Checkboxen ist mir schon gelungen. nun weiss ich allerdings nicht, wie ich nach dem schließen des dialogs raus bekommen welche 'checked' ist und welche nicht. würde mich über eure hilfe freuen folgendes hab ich schon
Delphi-Quellcode:
procedure TUploadForm.OpenDlgOnShow(Sender: TObject);
var hParent: THandle; rect: TRect; hChkBox1: THandle; hChkBox2: THandle; begin hParent := GetParent(OpenDialog.Handle); GetWindowRect(hParent, rect); SetWindowPos(hParent, 0, 0, 0, rect.Right - rect.Left, rect.Bottom - rect.Top + 50, SWP_NOMOVE); hChkBox1 := CreateWindowEx(0, 'BUTTON', 'Beschriftung BOX1', WS_CHILD or WS_VISIBLE or BS_AUTOCHECKBOX, 195, rect.Bottom - rect.Top - 27, 265, 20, hParent, 101, 0, nil); hChkBox2 := CreateWindowEx(0, 'BUTTON', 'Beschriftung BOX2', WS_CHILD or WS_VISIBLE or BS_AUTOCHECKBOX, 195, rect.Bottom - rect.Top - 2, 265, 20, hParent, 102, 0, nil); if hChkBox1 = 0 then RaiseLastOSError; if hChkBox2 = 0 then RaiseLastOSError; end; procedure TUploadForm.OpenDlgOnClose(Sender: TObject); var hParent: THandle; hChkBox1: THandle; hChkBox2: THandle; begin hParent := GetParent(OpenDialog.Handle); // get handle of checkboxes hChkBox1 := GetDlgItem(hParent, 101); hChkBox2 := GetDlgItem(hParent, 102); end; procedure TUploadForm.Button2Click(Sender: TObject); begin OpenDialog.OnShow := OpenDlgOnShow; OpenDialog.OnClose := OpenDlgOnClose; OpenDialog.Execute(); end; |
Re: CheckBox in TOpendialog einfügen
Sende die Nachricht
![]() |
Re: CheckBox in TOpendialog einfügen
vielen dank,
nu läufts :thumb: |
Re: CheckBox in TOpendialog einfügen
Du könntest dir auch
![]() |
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:14 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-2025 by Thomas Breitkreuz