View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000305 | JEDI VCL | 00 JVCL Components | public | 2002-09-18 01:37 | 2003-01-05 03:52 |
Reporter | PeterPan | Assigned To | remkobonte | ||
Priority | none | Severity | feature | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.00 | ||||
Target Version | Fixed in Version | ||||
Summary | 0000305: JvBrowseFolder: Property Position does not work as expected | ||||
Description | If Options+[odNewDialogStyle] then When the dialog was enlarged at runtime: The next time calling the dialog the Position property does not take into consideration that the dialog was enlarged so it centers the dialog thinking it has the same old small size as before: This places the dialog partly outside of the screen. So it should calculate the position according to its enlarged size! | ||||
Additional Information | Delphi 6 Pro | ||||
Tags | No tags attached. | ||||
|
The behavior can be repeated by compiling the example project: JVCLexamplesJvBrowseFolder |
|
This is a bug (feature?) of Windows since requesting the dialogs size using the hWnd passed into lfnBrowseProc always returns the same WindowRect regardless of if the dialog has been resized or not. |
|
Couldn't JvBrowseFolder workaround this Windows bug and manipulate its position to display it in the center of the screen when Position = poDesktopCenter/poScreenCenter, regardless of the dialog size? This would be very helpful! edited on: 09-18 10:10 |
|
I don't see how to accomplish this since the windows size is reported incorrectly by Windows so there is no (correct) rect to calculate the dialogs new position with. |
|
I haven't found any work-around for the fact that Windows always reports the original window rect even if the user has resized the dialog. If someone comes up with a fix, please reopen this report |
|
I could fix it by hooking the dialog (as is done in Dialogs.pas) and then wait for the WM_SIZE message that restores the dialog size. The BFFM_INITIALIZED notifier is send before the WM_SIZE message, thus at that point the dialog has it's default (small) size. I must clean up the code a bit <g>, and will post it to CVS. |
|
Fixed in v.1.8 |