So I'm trying to make some simple commands to provide open and save file dialogs in DBP. However I'm having a bit of trouble getting the dialog's filter to work. If I set the filter from the plugin itself like this:
ofn.lpstrFilter = "DirectX Object File (.x)\0*.x\0";
then it works fine. However if I make the filter a command parameter, letting the user set the filter it doesn't work.
For instance let's say I have this in DBP:
Open File Dialog "DirectX Object File (.x)\0*.x\0"
And then in the plugin I'll have this ('filter' is the command parameter):
ofn.lpstrFilter = filter;
And the filter doesn't work. In the corner of the dialog box rather
than seeing "DirectX Object File (.x)" and having only .x files appear, the filter box shows "DirectX Object File (.x)\0*.x\0".
Anyone ideas?
i like orange