Article View: borland.public.cppbuilder.nativeapi
Article #1794Re: Dialog child window
From: Remy Lebeau (TeamB)
Date: Tue, 19 Jun 2007 22:43
Date: Tue, 19 Jun 2007 22:43
39 lines
2480 bytes
2480 bytes
"JD" <nospam@nospam.com> wrote in message news:46785769@newsgroups.borland.com... > Looking at TPrintDialog specifically, there exists a > CheckBox with the caption (WindowText) of "C&ollate". > However, it's class name is "Button". Like much of the VCL, TPrintDlg is just a wrapper for Win32 API calls. In this case, the PrintDlg() function. So the entire dialog is controlled by the OS, not the VCL. "Button" is the Win32 control that controls push buttons, radio buttons, and checkboxes at the API layer. > the dialog remembers what the user had it set to when it closed > so that if reopened, the CheckBox is set accordingly TPrintDialog has its own Collate property. It is set to False by default. It is set to True if the user checked the box in the dialog. If you do not reset the property back to False before calling Execute() again, then the box will be initially checked when the dialog appears. > the dialog's Collate getter and setter methods fail to do anything > if the printer does not support collating. There is no getter/setter for that checkbox. It is not a VCL control. If you read the Win32 API documentation for the PRINTDLG structure, you will see that the dialog simply reports whether the user checked the box or not. If the printer does not actually support collation, then you have to implement it yourself in your printing code. > So .... Can I query the control to find out if it's checked > and dynamically check or uncheck it? If you have the control's HWND, then you can do whatever you want with it. Look at the BM_GETCHECK and BM_SETCHECK messages. Gambit
Technical Details
Message-ID:
<46785c64$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<46785769@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,17b336d121cbb12d X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <46785769@newsgroups.borland.com> Subject: Re: Dialog child window Date: Tue, 19 Jun 2007 15:43:55 -0700 Lines: 41 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 75.82.252.126 Message-ID: <46785c64$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1182293092 75.82.252.126 (19 Jun 2007 15:44:52 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail