Menu

notepad++ notify messages (FILEOPENED etc.)

DV
2006-06-02
2012-11-14
  • DV

    DV - 2006-06-02

    Does Notepad++ already have some of these notify messages or will they be implemented:
    _FILEOPENED (notifies that an existing file is opened but is not shown yet)
    _FILECREATED (notifies that new document is created)
    _FILESAVING (notifies that file is about to be saved; this notification allows external plugins to save text in different encoding, for example, without internal notepad++ saving)
    _FILECLOSED (notifies that current file is closed; additional information of this notification is which file is about to become active)

     
    • Don HO

      Don HO - 2006-06-04

      No.

      But if you need such messages, I can creat them.

      Don

       
      • Merijn Bosma

        Merijn Bosma - 2007-09-19

        sorry for bumping up such an old thread, but are these messages implemented, or is subclassing the wndproc still the only way of getting these notifications?

         
        • Don HO

          Don HO - 2007-09-19

          3. Add new plugin notification message NPPN_FILEJUSTOPENED.
          in :
          https://sourceforge.net/forum/message.php?msg_id=4521392

          Don

           
          • Merijn Bosma

            Merijn Bosma - 2007-09-19

            thanks, nothing on notification when file is saved (yet).

            I'd liek to make a plugin which does some decrypting on loading and encrypting on saving, so it needs to be able to take the loading and saving over from N++, is there anything to achieve that?

             
    • DV

      DV - 2006-06-05

      Yes, it would be great.

      I think, such notifications as xx_FILEOPENED, xx_FILECREATED and xx_FILECLOSED would be very handy for any plugin-developer. These notifications could be used for many purposes.

      xx_FILESAVING notification would be handy for people which work with files in DOS(OEM) encoding, for example. In this case when Ctrl+S is pressed, an opened OEM file (which is edited as ANSI) could be saved as OEM (an OEM plugin saves a file, reports Notepad++ about it, and Notepad++ does nothing).

       
    • Nobody/Anonymous

      It is easy to subclasses these messages. I have this done in HexEdit Plugin. It works very good. Feel free to ask for the sources.

      Or will support them Don for fast integration.

      Best Regards
      Jens

       
    • DV

      DV - 2006-06-06

      Jens, can you send me the sources by e-mail? I'm interested in realization of the notifications described above and one more notification
      which notifies a switch between opened documents by clicking a different (not current) tab.
      (you can see my e-mail in the plugins download section)

       
MongoDB Logo MongoDB