• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

File Registration

Started by Gary Beene, December 18, 2013, 10:28:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gary Beene

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?

José Roca

MSDN says:

Quote
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 ShlObj.inc.