Author Topic: File Registration  (Read 2872 times)

0 Members and 1 Guest are viewing this topic.

Offline Gary Beene

  • Jr. Member
  • **
  • Posts: 96
  • User-Rate: +3/-0
File Registration
« on: December 18, 2013, 10:28:22 PM »
Hi Jose,
I used your RegisterFileExtensions function from CSED in another app and it seems to work just fine.  Thank you for that.

But, I noticed that when I run the similar function in the PB IDE, the entire screen seems to be redrawn to have shortcuts show the icon associated with the PB Editor (on files registered to it).

But with your RegisterFileExtensions code, either in my app or in your CSED app, there's no screen redraw. The icons for shortcuts to files supported are not changed to icons representing the new extension owner.  And if I create a new shortcut to a registered file, the new shortcut does not use the designated CSED (or my app) icons.

Is this what you see also?

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2481
  • User-Rate: +204/-0
Re: File Registration
« Reply #1 on: December 18, 2013, 11:33:24 PM »
MSDN says:

When you create or change a file association, it is important to notify the system that you have made a change. Do so by calling SHChangeNotify and specifying the SHCNE_ASSOCCHANGED event. If you do not call SHChangeNotify, the change may not be recognized until after the system is rebooted.

So, add a call to SHChangeNotify. It is in