1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32:
| procedure TForm1.SaveDialog1Show(Sender: TObject); var hParent: THandle; rect: TRect; hCbox: THandle; hFont: THandle; begin hParent := GetParent(SaveDialog1.Handle); GetWindowRect(hParent, rect); SetWindowPos(hParent, 0, 0, 0, rect.Right - rect.Left, rect.Bottom - rect.Top + 30, SWP_NOMOVE); hFont := SENDMESSAGE(hParent,WM_GETFONT,0,0); hCBox := CreateWindowEx(WS_EX_LEFT, 'BUTTON', 'Anders speichern', BS_AUTOCHECKBOX OR BS_FLAT OR WS_VISIBLE or WS_CHILD, 195, rect.Bottom - rect.Top - 35, 250, 16, hParent, 101, 0, nil); if hCBox = 0 then RaiseLastOSError; SendMessage(hCBox,WM_SETFONT,hFont,0); end;
procedure TForm1.SaveDialog1Close(Sender: TObject); var hParent: THandle; begin hParent := GetParent(SaveDialog1.Handle); if IsDlgButtonChecked(hParent,101) = BST_CHECKED then showmessage('Check') else showmessage('No Check') end; |