-namespace nlite{
-Property nliteProperty;
-
-const CApplicationInfo * appInfo = NULL;
-
-}
static TCHAR localAppDataPath[_MAX_PATH];
static WSAData wsaData; //winsockdata
return;
}
- VOID nlite::UnexpectedErrorMessageShow(LPCTSTR headMessage,LPCTSTR summary,UINT line,LPCTSTR fileName,LPCTSTR function){
- tstring errMessage;
- errMessage = headMessage;
- errMessage += TEXT("\91z\92è\82³\82ê\82Ä\82¢\82È\82¢\83G\83\89\81[\82ª\94\90¶\82µ\82Ü\82µ\82½\81B\83A\83v\83\8a\83P\81[\83V\83\87\83\93\94z\92u\83t\83H\83\8b\83_\82É\8dì\90¬\82³\82ê\82½\83\8d\83O\83t\83@\83C\83\8b\82ð\93n\82µ\82Ä\82à\82ç\82¦\82é\82Æ\8aJ\94\8eÒ\82ª\94ñ\8fí\82É\8aì\82Ñ\82Ü\82·");
- errMessage += TEXT("\r\n\83G\83\89\81[\83\81\83b\83Z\81[\83W:");
- errMessage += summary;
- DebugOutW(fileName,function,line,DUMPING__DEBUGER__ | LINEFEAD__DEBUGER__ ,ERRORMODE__DEBUGER__,TEXT("%s"),summary);
- ::MessageBox(NULL,errMessage.c_str(),TEXT("\91z\92è\82³\82ê\82Ä\82¢\82È\82¢\83G\83\89\81["),MB_ICONERROR | MB_OK);
-
-
-
- return;
- }
\ No newline at end of file
class CApplicationInfo;
class CListenerList;
struct Property;
+ struct GeneralProperty;
//\83O\83\8d\81[\83o\83\8b
extern const CApplicationInfo * appInfo;
extern CListenerList listenerList;
+
+ //\83O\83\8d\81[\83o\83\8b\8aÖ\90\94
extern VOID UnexpectedErrorMessageShow(LPCTSTR headMessage,LPCTSTR summary,UINT line,LPCTSTR fileName,LPCTSTR function);
+ extern HINSTANCE OpenURL(HWND hwnd,const GeneralProperty &gp,LPCTSTR url ,INT nShowCommand);
+
//\83A\83v\83\8a\83P\81[\83V\83\87\83\93\83v\83\8d\83p\83e\83B
extern Property nliteProperty;
const static UINT_PTR COMMENTVIEW_HEADERITEMSIZE = 5;
<ClCompile Include="nlite_chatData.cpp" />
<ClCompile Include="nlite_commentview.cpp" />
<ClCompile Include="nlite_commentWrite.cpp" />
+ <ClCompile Include="nlite_common.cpp" />
<ClCompile Include="nlite_exception.cpp" />
<ClCompile Include="nlite_mainframe.cpp" />
<ClCompile Include="nlite_nlib.cpp" />
<ClCompile Include="nlite_propertyWindow.cpp">
<Filter>ソース ファイル</Filter>
</ClCompile>
+ <ClCompile Include="nlite_common.cpp">
+ <Filter>ソース ファイル</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="nlite.rc">
namespace nlite{
+ static const LPCTSTR LIVEURL_PART = TEXT("http://live.nicovideo.jp/watch/");
static const UINT_PTR SELL_SPACE_LENGTH = 1;
//
chatReadEdit.GetSelText(selTextBuf);
if(regex_match((LPCTSTR)selTextBuf,nliteregex::URL) == TRUE){
- if(self.generalProperty.browserPath.Length() == 0){
-
- ShellExecute(*this, NULL, selTextBuf, NULL, NULL, SW_SHOWNORMAL);
-
- } else{
-
-
- }
-
+ OpenURL(*this,self.generalProperty,selTextBuf,SW_SHOWNORMAL);
} else if(regex_match((LPCTSTR)selTextBuf,nliteregex::VIDEOID) == TRUE){
dumpln(TEXT("videoId"));
} else if( regex_match((LPCTSTR)selTextBuf,nliteregex::LIVEID) == TRUE){
-
- dumpln(TEXT("liveId"));
+
+ selTextBuf.Insert(0,LIVEURL_PART);
+ OpenURL(*this,self.generalProperty,selTextBuf,SW_SHOWNORMAL);
}
--- /dev/null
+#include "stdafx.h"
+#include "nlite_include.h"
+
+
+
+namespace nlite{
+
+Property nliteProperty;
+
+
+ VOID nlite::UnexpectedErrorMessageShow(LPCTSTR headMessage,LPCTSTR summary,UINT line,LPCTSTR fileName,LPCTSTR function){
+ tstring errMessage;
+ errMessage = headMessage;
+ errMessage += TEXT("\91z\92è\82³\82ê\82Ä\82¢\82È\82¢\83G\83\89\81[\82ª\94\90¶\82µ\82Ü\82µ\82½\81B\83A\83v\83\8a\83P\81[\83V\83\87\83\93\94z\92u\83t\83H\83\8b\83_\82É\8dì\90¬\82³\82ê\82½\83\8d\83O\83t\83@\83C\83\8b\82ð\93n\82µ\82Ä\82à\82ç\82¦\82é\82Æ\8aJ\94\8eÒ\82ª\94ñ\8fí\82É\8aì\82Ñ\82Ü\82·");
+ errMessage += TEXT("\r\n\83G\83\89\81[\83\81\83b\83Z\81[\83W:");
+ errMessage += summary;
+ DebugOutW(fileName,function,line,DUMPING__DEBUGER__ | LINEFEAD__DEBUGER__ ,ERRORMODE__DEBUGER__,TEXT("%s"),summary);
+ ::MessageBox(NULL,errMessage.c_str(),TEXT("\91z\92è\82³\82ê\82Ä\82¢\82È\82¢\83G\83\89\81["),MB_ICONERROR | MB_OK);
+
+
+
+ return;
+ }
+
+ HINSTANCE OpenURL(HWND hwnd,const GeneralProperty &gp,LPCTSTR url ,INT nShowCommand){
+
+ HINSTANCE rslt;
+
+ if(gp.browserPath.Length() == 0){
+
+ rslt = ShellExecute(hwnd, NULL, url, NULL, NULL, nShowCommand);
+
+ } else{
+
+ rslt = ShellExecute(hwnd, NULL, gp.browserPath, url, NULL, nShowCommand);
+
+ }
+
+ return rslt;
+
+ }
+
+
+const CApplicationInfo * appInfo = NULL;
+
+}
\ No newline at end of file