Can I use this to modify the microsoft office dialog or is it just to make a dialog in a new custom app ? windows/win32/shell/samples-commonfiledialog

ellieorange 26 Reputation points
2022-04-10T17:06:13.4+00:00

I want to modify the microsoft office dialog boxes for open/save (Word, Excel, etc).

I don't understand the lingo in https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.commondialog?view=windowsdesktop-6.0#examples well enough to know if I can actually override the windows system dialog?

Sorry if this is an ignorant question but all the examples I've found on YouTube basically show how to create a custom dialog in an app. I want to change the functionality of Word, Excel, and everything that uses the commonfiledialog. I'm not trying to create an app.

My end goal is to implement a basic file management system through folder permissions and customizing the commonfiledialog for open & save.

Windows development | Windows App SDK
Windows development | Windows API - Win32
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Castorix31 90,686 Reputation points
    2022-04-10T17:26:55.057+00:00

    You need Global Hooks (DLL) (SetWindowsHookExW, like WH_CBT to intercept windows creation to subclass them afterwards)
    But it is complicated... (+ 32<=>64 problems as the doc says)

    1 person found this answer helpful.

  2. ellieorange 26 Reputation points
    2022-09-13T17:43:16.64+00:00

    Hooks are probably not the way to go, rather CoTreatAsClass. Here is my other question with an answer:
    https://learn.microsoft.com/en-us/answers/questions/1001136/customize-the-common-item-dialog-systemwide.html


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.