@@ -78,7 +78,7 @@ static internal void CommandMenuInit()
7878
7979 // get path of plugin configuration
8080 StringBuilder sbIniFilePath = new StringBuilder ( Win32 . MAX_PATH ) ;
81- Win32 . SendMessage ( PluginBase . nppData . _nppHandle , NppMsg . NPPM_GETPLUGINSCONFIGDIR , Win32 . MAX_PATH , sbIniFilePath ) ;
81+ Win32 . SendMessage ( PluginBase . nppData . _nppHandle , ( uint ) NppMsg . NPPM_GETPLUGINSCONFIGDIR , Win32 . MAX_PATH , sbIniFilePath ) ;
8282 iniFilePath = sbIniFilePath . ToString ( ) ;
8383
8484 // if config path doesn't exist, we create it
@@ -134,7 +134,7 @@ static internal void SetToolBarIcon()
134134 tbIcons . hToolbarBmp = tbBmp . GetHbitmap ( ) ;
135135 IntPtr pTbIcons = Marshal . AllocHGlobal ( Marshal . SizeOf ( tbIcons ) ) ;
136136 Marshal . StructureToPtr ( tbIcons , pTbIcons , false ) ;
137- Win32 . SendMessage ( PluginBase . nppData . _nppHandle , NppMsg . NPPM_ADDTOOLBARICON , PluginBase . _funcItems . Items [ idFrmGotToLine ] . _cmdID , pTbIcons ) ;
137+ Win32 . SendMessage ( PluginBase . nppData . _nppHandle , ( uint ) NppMsg . NPPM_ADDTOOLBARICON , PluginBase . _funcItems . Items [ idFrmGotToLine ] . _cmdID , pTbIcons ) ;
138138 Marshal . FreeHGlobal ( pTbIcons ) ;
139139 }
140140
@@ -234,7 +234,7 @@ static void insertCurrentPath(NppMsg which)
234234 msg = NppMsg . NPPM_GETCURRENTDIRECTORY ;
235235
236236 StringBuilder path = new StringBuilder ( Win32 . MAX_PATH ) ;
237- Win32 . SendMessage ( PluginBase . nppData . _nppHandle , msg , 0 , path ) ;
237+ Win32 . SendMessage ( PluginBase . nppData . _nppHandle , ( uint ) msg , 0 , path ) ;
238238
239239 editor . ReplaceSel ( path . ToString ( ) ) ;
240240 }
@@ -266,7 +266,7 @@ static void checkInsertHtmlCloseTag()
266266 static internal void doInsertHtmlCloseTag ( char newChar )
267267 {
268268 LangType docType = LangType . L_TEXT ;
269- Win32 . SendMessage ( PluginBase . nppData . _nppHandle , NppMsg . NPPM_GETCURRENTLANGTYPE , 0 , ref docType ) ;
269+ Win32 . SendMessage ( PluginBase . nppData . _nppHandle , ( uint ) NppMsg . NPPM_GETCURRENTLANGTYPE , 0 , ref docType ) ;
270270 bool isDocTypeHTML = ( docType == LangType . L_HTML || docType == LangType . L_XML || docType == LangType . L_PHP ) ;
271271
272272 if ( ! doCloseTag || ! isDocTypeHTML )
@@ -323,18 +323,18 @@ static internal void doInsertHtmlCloseTag(char newChar)
323323
324324 static void getFileNamesDemo ( )
325325 {
326- int nbFile = ( int ) Win32 . SendMessage ( PluginBase . nppData . _nppHandle , NppMsg . NPPM_GETNBOPENFILES , 0 , 0 ) ;
326+ int nbFile = ( int ) Win32 . SendMessage ( PluginBase . nppData . _nppHandle , ( uint ) NppMsg . NPPM_GETNBOPENFILES , 0 , 0 ) ;
327327 MessageBox . Show ( nbFile . ToString ( ) , "Number of opened files:" ) ;
328328
329329 using ( ClikeStringArray cStrArray = new ClikeStringArray ( nbFile , Win32 . MAX_PATH ) )
330330 {
331- if ( Win32 . SendMessage ( PluginBase . nppData . _nppHandle , NppMsg . NPPM_GETOPENFILENAMES , cStrArray . NativePointer , nbFile ) != IntPtr . Zero )
331+ if ( Win32 . SendMessage ( PluginBase . nppData . _nppHandle , ( uint ) NppMsg . NPPM_GETOPENFILENAMES , cStrArray . NativePointer , nbFile ) != IntPtr . Zero )
332332 foreach ( string file in cStrArray . ManagedStringsUnicode ) MessageBox . Show ( file ) ;
333333 }
334334 }
335335 static void getSessionFileNamesDemo ( )
336336 {
337- int nbFile = ( int ) Win32 . SendMessage ( PluginBase . nppData . _nppHandle , NppMsg . NPPM_GETNBSESSIONFILES , 0 , sessionFilePath ) ;
337+ int nbFile = ( int ) Win32 . SendMessage ( PluginBase . nppData . _nppHandle , ( uint ) NppMsg . NPPM_GETNBSESSIONFILES , 0 , sessionFilePath ) ;
338338
339339 if ( nbFile < 1 )
340340 {
@@ -345,13 +345,13 @@ static void getSessionFileNamesDemo()
345345
346346 using ( ClikeStringArray cStrArray = new ClikeStringArray ( nbFile , Win32 . MAX_PATH ) )
347347 {
348- if ( Win32 . SendMessage ( PluginBase . nppData . _nppHandle , NppMsg . NPPM_GETSESSIONFILES , cStrArray . NativePointer , sessionFilePath ) != IntPtr . Zero )
348+ if ( Win32 . SendMessage ( PluginBase . nppData . _nppHandle , ( uint ) NppMsg . NPPM_GETSESSIONFILES , cStrArray . NativePointer , sessionFilePath ) != IntPtr . Zero )
349349 foreach ( string file in cStrArray . ManagedStringsUnicode ) MessageBox . Show ( file ) ;
350350 }
351351 }
352352 static void saveCurrentSessionDemo ( )
353353 {
354- string sessionPath = Marshal . PtrToStringUni ( Win32 . SendMessage ( PluginBase . nppData . _nppHandle , NppMsg . NPPM_SAVECURRENTSESSION , 0 , sessionFilePath ) ) ;
354+ string sessionPath = Marshal . PtrToStringUni ( Win32 . SendMessage ( PluginBase . nppData . _nppHandle , ( uint ) NppMsg . NPPM_SAVECURRENTSESSION , 0 , sessionFilePath ) ) ;
355355 if ( ! string . IsNullOrEmpty ( sessionPath ) )
356356 MessageBox . Show ( sessionPath , "Saved Session File :" , MessageBoxButtons . OK ) ;
357357 }
@@ -392,21 +392,21 @@ static void DockableDlgDemo()
392392 IntPtr _ptrNppTbData = Marshal . AllocHGlobal ( Marshal . SizeOf ( _nppTbData ) ) ;
393393 Marshal . StructureToPtr ( _nppTbData , _ptrNppTbData , false ) ;
394394
395- Win32 . SendMessage ( PluginBase . nppData . _nppHandle , NppMsg . NPPM_DMMREGASDCKDLG , 0 , _ptrNppTbData ) ;
395+ Win32 . SendMessage ( PluginBase . nppData . _nppHandle , ( uint ) NppMsg . NPPM_DMMREGASDCKDLG , 0 , _ptrNppTbData ) ;
396396 // Following message will toogle both menu item state and toolbar button
397- Win32 . SendMessage ( PluginBase . nppData . _nppHandle , NppMsg . NPPM_SETMENUITEMCHECK , PluginBase . _funcItems . Items [ idFrmGotToLine ] . _cmdID , 1 ) ;
397+ Win32 . SendMessage ( PluginBase . nppData . _nppHandle , ( uint ) NppMsg . NPPM_SETMENUITEMCHECK , PluginBase . _funcItems . Items [ idFrmGotToLine ] . _cmdID , 1 ) ;
398398 }
399399 else
400400 {
401401 if ( ! frmGoToLine . Visible )
402402 {
403- Win32 . SendMessage ( PluginBase . nppData . _nppHandle , NppMsg . NPPM_DMMSHOW , 0 , frmGoToLine . Handle ) ;
404- Win32 . SendMessage ( PluginBase . nppData . _nppHandle , NppMsg . NPPM_SETMENUITEMCHECK , PluginBase . _funcItems . Items [ idFrmGotToLine ] . _cmdID , 1 ) ;
403+ Win32 . SendMessage ( PluginBase . nppData . _nppHandle , ( uint ) NppMsg . NPPM_DMMSHOW , 0 , frmGoToLine . Handle ) ;
404+ Win32 . SendMessage ( PluginBase . nppData . _nppHandle , ( uint ) NppMsg . NPPM_SETMENUITEMCHECK , PluginBase . _funcItems . Items [ idFrmGotToLine ] . _cmdID , 1 ) ;
405405 }
406406 else
407407 {
408- Win32 . SendMessage ( PluginBase . nppData . _nppHandle , NppMsg . NPPM_DMMHIDE , 0 , frmGoToLine . Handle ) ;
409- Win32 . SendMessage ( PluginBase . nppData . _nppHandle , NppMsg . NPPM_SETMENUITEMCHECK , PluginBase . _funcItems . Items [ idFrmGotToLine ] . _cmdID , 0 ) ;
408+ Win32 . SendMessage ( PluginBase . nppData . _nppHandle , ( uint ) NppMsg . NPPM_DMMHIDE , 0 , frmGoToLine . Handle ) ;
409+ Win32 . SendMessage ( PluginBase . nppData . _nppHandle , ( uint ) NppMsg . NPPM_SETMENUITEMCHECK , PluginBase . _funcItems . Items [ idFrmGotToLine ] . _cmdID , 0 ) ;
410410 }
411411 }
412412 frmGoToLine . textBox1 . Focus ( ) ;
0 commit comments