Change default arrangement of Save and Cancel buttons in SaveFileDialog

后端 未结 3 748
梦如初夏
梦如初夏 2021-01-15 10:50

I m coding in c# and I want to change the default arrangement of \'Save\' and \'Cancel\' buttons in SaveFileDialog. The default arrangement is that the \'Save\' button is ab

3条回答
  •  臣服心动
    2021-01-15 11:30

    Please don't do this.

    The user is used to where these buttons appear. If you try to change their layout then you will just make you app feel wrong.

    If you have to do this then should make sure you use the legacy file dialogs (which will make your dialogs look even more odd on Vista/7). Use the lpfnHook field in the OPENFILENAME struct to obtain hooks in to the dialog procedure. Respond to the CDN_INITDONE notification and move the buttons around with MoveWindow or SetWindowPos. You'll have to hunt for the button window handles.

    But really, please don't do this, you'll just make your app worse.

提交回复
热议问题