Where is the sizing data of TOpenDialog stored and how can this be reset?
Asked Answered
R

1

5

TOpenDialog has an option ofEnableSizing which allows the user to modify the dialog size of an open dialog. This sizing data seems to be stored for the application. If the program is started again the dialog is opened with the same size.

My question is, where this data is stored. I wonder if there exists an easy way to reset this data. I found no information regarding this in the documentation for ofEnableSizing nor for the correspondending API flag OFN_ENABLESIZING.

Romaic answered 1/9, 2015 at 7:10 Comment(11)
I'm curious to know why you would want to fight the systemSawyers
I would guess, it's somewhere in the registry. The easy way would then be to delete the key. But you should concern David's curiousity, if this isn't just a theoretical question.Bough
@heffernan I have an user with no internet access, that insists, that the dialog is "too big". He says, he sees the arrows to resize the dialog, but is not able to do so. I hoped there would be a registry key or something, that would allow me to reset this to the original size.Romaic
You should be able to answer such questions yourself fairly easily. At the Sysinternals site (technet.microsoft.com/de-de/sysinternals/bb545021.aspx) you will find tools that can show what files, registry hives and other system objects an application accesses. My advice is to get acquainted with those tools.Goggles
@Alois: if he sees the arrows but can't resize the dialog, then it has probably reached its minimum size. Does the user have a very small screen, perhaps (old computer, no Internet)?Purifoy
@AloisHeimer The quick way out for your user is to do this with the keyboard. Alt+Space to open the sys menu. Then press S to action the Size item. Then use arrow keys to resize the dialog.Sawyers
@RudyVelthuis The user complains the dialog "covers the whole screen", our program has a minimal target resolution of 800x600. So I don't think it reached the minimum size.Romaic
@Goggles I hoped I missed some documentation. In this case I would have added the resulting code to our "Reset settings" button. I don't think the problem is important enough for us to hack the registry with undocumented settings.Romaic
@heffernan You are right: I will try this as workaround.Romaic
@AloisHeimer I could not find any details as to where in the reg this is stored. If indeed it is stored in the reg.Sawyers
You might try the work-around described by seanos in this thread:help.lockergnome.com/vista/…Suffer
A
10

This is stored under HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\CIDSizeMRU. The first few unicode hexadecimal codepoints identify you application exe name. So, for example, Project1.exe reads as 50 00 72 00 6F 00 6A 00 65 00 63 00 74 00 31 00 2E 00 65 00 78 00 65 00. Deleting it will reset to default settings.

I don't think there's any documentation on this. I found on Process Monitor.

Aeronautics answered 1/9, 2015 at 14:51 Comment(1)
Position of Common File Dialog under VistaPaniagua

© 2022 - 2024 — McMap. All rights reserved.