Use OPENFILENAME.lpfnHook to define a hook procedure. Within the hook procedure, trap the WM_CTLCOLORDLG message. Take a look at OFNHookProcOldStyle in MSDN for more information.