[NEW] Add NPPM_DOOPEN plugin message.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@396 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2009-01-14 19:19:00 +00:00
parent 00682573a1
commit cbaf5fda29
2 changed files with 10 additions and 1 deletions

View File

@ -193,6 +193,9 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV
#define NPPM_CHECKDOCSTATUS (NPPMSG + 53)
// VOID NPPM_CHECKDOCSTATUS(BOOL, 0)
// check all opened documents status.
// If files are modified, then reloaod (with or without prompt, it depends on settings).
// if files are deleted, then prompt user to close the documents
#define NPPM_ENABLECHECKDOCOPT (NPPMSG + 54)
// VOID NPPM_ENABLECHECKDOCOPT(OPT, 0)
@ -322,6 +325,10 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV
// You may need it after getting NPPN_READY notification
// returned value : TRUE if this function call is successful and shorcut is enable, otherwise FALSE
#define NPPM_DOOPEN (NPPMSG + 77)
// BOOL NPPM_DOOPEN(0, const TCHAR *fullPathName2Open)
// fullPathName2Open indicates the full file path name to be opened.
// The return value is TRUE (1) if the operation is successful, otherwise FALSE (0).
#define RUNCOMMAND_USER (WM_USER + 3000)
#define NPPM_GETFULLCURRENTPATH (RUNCOMMAND_USER + FULL_CURRENT_PATH)

View File

@ -7058,10 +7058,12 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
return TRUE;
}
case NPPM_DOOPEN:
case WM_DOOPEN:
{
BufferID id = doOpen((const TCHAR *)lParam);
if (id != BUFFER_INVALID) {
if (id != BUFFER_INVALID)
{
return switchToFile(id);
}
}