Paul van Schayck wrote:
Hey,
Never thought a simple popup with a few radio boxes would be this hard...
Instead of generating the dialog box manually, why don't you store it in a resource? It will then be easier to localise and should be easier to use. You could also disable the radio boxes of drivers that cannot be used instead of hiding them and then you wouldn't have to do complicated rearranging.
Rob
Hey Rob,
On Wed, 26 Jan 2005 08:33:01 -0600, Rob Shearman rob@codeweavers.com wrote:
Instead of generating the dialog box manually, why don't you store it in a resource? It will then be easier to localise and should be easier to use. You could also disable the radio boxes of drivers that cannot be used instead of hiding them and then you wouldn't have to do complicated rearranging.
It's making the dialog based on the sAudioDrivers array. Dynamically. In case you want to add a driver you can simply add an entry to that array and the radio box will be created as well. Otherwise you would have to edit the resource file as well to add a new driver. If that seems to be bloated (ie we will rarely add or remove a driver) I can indeed just use a static resource.
And it's not hiding radio boxes, it's disabling them (gray). Look at the WM_INITDIALOG case of SelectAudioDrvProc().
Thanks, Paul
Paul van Schayck wrote:
Hey Rob,
On Wed, 26 Jan 2005 08:33:01 -0600, Rob Shearman rob@codeweavers.com wrote:
Instead of generating the dialog box manually, why don't you store it in a resource? It will then be easier to localise and should be easier to use. You could also disable the radio boxes of drivers that cannot be used instead of hiding them and then you wouldn't have to do complicated rearranging.
It's making the dialog based on the sAudioDrivers array. Dynamically. In case you want to add a driver you can simply add an entry to that array and the radio box will be created as well. Otherwise you would have to edit the resource file as well to add a new driver.
Sorry, ignore my comments then!
If that seems to be bloated (ie we will rarely add or remove a driver) I can indeed just use a static resource.
Hmmm. That's a good question. I guess it would be reasonable if this is only going to be used on Wine as we control what drivers are shipped with it if only one dialog box needed updating. Is it reasonable to have to update 20 or more translations of the dialog box? Probably. but I wouldn't want to volunteer for that task.
Rob
"Paul van Schayck" polleke@gmail.com wrote:
On Wed, 26 Jan 2005 08:33:01 -0600, Rob Shearman rob@codeweavers.com wrote:
Instead of generating the dialog box manually, why don't you store it in a resource? It will then be easier to localise and should be easier to use. You could also disable the radio boxes of drivers that cannot be used instead of hiding them and then you wouldn't have to do complicated rearranging.
It's making the dialog based on the sAudioDrivers array. Dynamically. In case you want to add a driver you can simply add an entry to that array and the radio box will be created as well. Otherwise you would have to edit the resource file as well to add a new driver. If that seems to be bloated (ie we will rarely add or remove a driver) I can indeed just use a static resource.
You really have to create a dialog template in an .rc file and add/remove/ enable/disable controls if needed in the WM_INITDIALOG handler.