ps->error = NLIB_ERR_GETPLAYERSTATUS_BLOCK_NOW_COUNT_OVERFLOW;
}else {
-
- std::wstring errmessage(pszData,nLength);
+ std::wstring errmessage(TEXT("\8c©\8am\94F\82Ì\83v\83\8c\83C\83\84\81[\83X\83e\81[\83^\83X\83G\83\89\81[:"));
+ errmessage.append(pszData,nLength);
throw nlib::Exception(errmessage.c_str(),__LINE__,TEXT(__FILE__),TEXT(__FILE__));
int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE,
LPTSTR lpCmdLine, int nCmdShow)
{
-
+ HINSTANCE hRich = LoadLibrary(CRichEditCtrl::GetLibraryName());
int nRet = -1;
try{
UnexpectedErrorMessageShow(TEXT("nlib\82Å\83n\83\93\83h\83\8b\82³\82ê\82Ä\82¢\82È\82¢\83G\83\89\81["),e.what(),e.getLineNo(),e.getFileName(),e.getFunctionName());
+ goto nlitefinally;
}catch(std::exception &e){
UnexpectedErrorMessageShow(TEXT("\83n\83\93\83h\83\8b\82³\82ê\82Ä\82¢\82È\82¢\83G\83\89\81["),CComBSTR(e.what()),-1,TEXT("\94\90¶\83t\83@\83C\83\8b\82ª\93Á\92è\8fo\97\88\82Ü\82¹\82ñ"),TEXT("\94\90¶\8aÖ\90\94\82ª\93Á\92è\82Å\82«\82Ü\82¹\82ñ"));
nlitefinally:
wnd.OnException();
wnd.DestroyWindow();
-
+ FreeLibrary(hRich);
nliteend:
return;
}
-static VOID agreeEnterKeyThread(LPVOID userData){
+static VOID EnterChatBox(LPVOID userData){
- Sleep(1000);
+
+ ((CSubChatEdit*)userData)->SetReadOnly(TRUE);
+ Sleep(3000);
((CSubChatEdit*)userData)->AgreeEnter();
+ _endthread();
return;
}
BOOL CCommentWriteWindow::SendChat(){
- this->commentSubEdit.SetReadOnly(TRUE);
+ _beginthread(EnterChatBox,0,this);
+
CCommentMaker commentMaker;
std::vector<TCHAR> chat(commentSubEdit.GetWindowTextLengthW() + 1);
rslt = TRUE;
this->commentSubEdit.SetWindowText(TEXT(""));
- break;
+ goto end;
case NLIB_ERR_NOT_LIVECONNECT:
+
+ ::MessageBox(*this,NLIB_GetErrorMessage(code),TEXT("\83R\83\81\83\93\83g\8f\91\82«\8d\9e\82Ý\83G\83\89\81["),MB_ICONERROR | MB_OK);
commentSubEdit.AgreeEnter();
- ::MessageBox(NULL,NLIB_GetErrorMessage(code),TEXT("\83R\83\81\83\93\83g\8f\91\82«\8d\9e\82Ý\83G\83\89\81["),MB_ICONERROR | MB_OK);
-
- rslt = FALSE;
break;
default:
- commentSubEdit.AgreeEnter();
UnexpectedErrorMessageShow(TEXT("\83R\83\81\83\93\83g\8f\91\82«\8d\9e\82Ý\92\86\82É"),NLIB_GetErrorMessage(code),__LINE__,TEXT(__FILE__),TEXT(__FUNCTION__));
- rslt = FALSE;
+ commentSubEdit.AgreeEnter();
break;
}
+
+ rslt = FALSE;
+
-
+end:
+
return rslt;
}
namespace nlite{
+
+ //
+ //\83R\83\81\83\93\83g\83r\83\85\81[\93à\82Ì\83R\83\93\83g\83\8d\81[\83\8b\83N\83\89\83X
+ ///////////////////////////////////////////////////////////////////
+ CChatChildCtrls::CChatChildCtrls(CCommentView &hMaster,BOOL mulutiLineFlag):
+ showFlag(FALSE),
+ m_master(hMaster)
+ {
+ this->chatDispCtrl.Create(hMaster.m_commentListWindow,0,NULL,WS_CHILD | (mulutiLineFlag == TRUE ? ES_MULTILINE : ES_AUTOHSCROLL),0,CHAT_DISPCTRL_ID);
+ return;
+ }
+
+
+
+ VOID CChatChildCtrls::SetCtrl(UINT_PTR height,HDWP hdwp,CCommentList::reference comment){
+
+ chatDispCtrl.SetWindowText(comment.chatBuf);
+ chatDispCtrl.RequestResize();
+
+ return;
+ }
+
+
+
//
//\83R\83\81\83\93\83g\83r\83\85\81[\83N\83\89\83X\83\81\83\\83b\83h
///////////////////////////////////////////////////////
namespace nlite{
+ class CCommentView;
+ class CCommentListWindow;
+
+
//\92è\90\94\97p\82Ì\96¼\91O\8bó\8aÔ
namespace commentViewConstant{
const static UINT_PTR MENU_OR_ID = 256;
}
- class CCommentView;
+ class CChatChildCtrls{
+
+ private:
+ CRichEditCtrl chatDispCtrl;
+ CHyperLink noDispCtrl;
+ CHyperLink userNameDispCtrl;
+ BOOL showFlag;
+ CCommentView &m_master;
+
+
+ public:
+
+ enum {
+ NO_DIOSCTRL_ID = 1000,
+ USERNAME_DISPCTRL_ID = 2000,
+ CHAT_DISPCTRL_ID = 3000
+
+ };
+
+ ///
+ ///\83R\83\93\83X\83g\83\89\83N\83^
+ ///
+ CChatChildCtrls(CCommentView &hMaster,BOOL mulutiLineFlag);
+
+ ///
+ ///\8ew\92è\82µ\82½\8d\82\82³\82É\83R\83\93\83g\83\8d\81[\83\8b\82ð\83Z\83b\83g
+ ///
+ VOID SetCtrl(UINT_PTR height,HDWP hdwp,CCommentList::reference commen);
+
+ };
+
+
+ class CChatChildCtrlsList{
+ friend CCommentView;
+ private:
+ typedef std::list<CChatChildCtrls> InternalList;
+
+ InternalList list;
+ CCommentView &m_hMaster;
+
+ public:
+ typedef InternalList::reference reference;
+ typedef InternalList::iterator iterator;
+
+ ///
+ ///\83R\83\93\83X\83g\83\89\83N\83^
+ ///
+ CChatChildCtrlsList(CCommentView &hMaster);
+
+ ///
+ ///\83R\83\93\83g\83\8d\81[\83\8b\82ð\95\\8e¦
+ ///
+ VOID ShowCntrls();
+
+ private:
+
+ ///
+ ///\8ag\92£\8f\88\97\9d
+ ///
+ VOID Extend();
+
+
+ };
+
+
//\83R\83\81\83\93\83g\95\\8e¦\97p\83E\83B\83\93\83h\83E
class CCommentListWindow:public CWindowImpl<CCommentListWindow>,public CComAutoCriticalSection{
///\83R\83\81\83\93\83g\83r\83\85\81[\83N\83\89\83X
///
class CCommentView:public CWindowImpl<CCommentView>{
-
+ friend CChatChildCtrls;
friend CCommentListWindow; //\83t\83\8c\83\93\83h\90é\8c¾
//\83v\83\89\83C\83x\81[\83g\8c^\81E\83N\83\89\83X\92è\8b`
private:
self.lvNoCombo.GetEditCtrl().SetReadOnly(TRUE);
self.subLiveNoComboBox.untilConnectingFlag = TRUE;
self.EnableWindow(FALSE);
-
+ Sleep(3000);
+ self.subLiveNoComboBox.AgreeInputLvNo();
_endthread();
return;
}
case NLIB_ERR_GETPLAYERSTATUS_CHANT_PARSE:
- ::MessageBox(NULL,NLIB_GetErrorMessage(code),TEXT("\95ú\91\97\90Ú\91±\83G\83\89\81["),MB_ICONERROR | MB_OK);
+ ::MessageBox(*this,NLIB_GetErrorMessage(code),TEXT("\95ú\91\97\90Ú\91±\83G\83\89\81["),MB_ICONERROR | MB_OK);
break;
#define WIN32_LEAN_AND_MEAN // Windows \83w\83b\83_\81[\82©\82ç\8eg\97p\82³\82ê\82Ä\82¢\82È\82¢\95\94\95ª\82ð\8f\9c\8aO\82µ\82Ü\82·\81B
#define _CRT_SECURE_NO_WARNINGS 1 //vc++\82Ì\82¨\82¹\82Á\82©\82¢\82È\8cx\8d\90\82ð\8fÁ\82·
#define _CRT_NON_CONFORMING_SWPRINTFS 1 //vc++\82Ì\82¨\82¹\82Á\82©\82¢\82È\8cx\8d\90\82ð\8fÁ\82·
-//#define USE_STUB //\83X\83^\83u\82ð\8eg\97p\82·\82é\8fê\8d\87\82Í\83R\83\81\83\93\83g\83A\83E\83g\82ð\89ð\8f\9c\82·\82é
+#define USE_STUB //\83X\83^\83u\82ð\8eg\97p\82·\82é\8fê\8d\87\82Í\83R\83\81\83\93\83g\83A\83E\83g\82ð\89ð\8f\9c\82·\82é
#define WINDEBUGER_NOPRINTING //\83f\83o\83b\83O\8fo\97Í\82ð\83R\83\93\83\\81[\83\8b\82É\95\\8e¦\82µ\82½\82\82È\82¢\8fê\8d\87\92è\8b`\82·\82é
#define _WTL_NO_CSTRING
#pragma once
#define _CRT_SECURE_NO_WARNINGS 1 //vc++\82Ì\82¨\82¹\82Á\82©\82¢\82È\8cx\8d\90\82ð\8fÁ\82·
#define _CRT_NON_CONFORMING_SWPRINTFS 1 //vc++\82Ì\82¨\82¹\82Á\82©\82¢\82È\8cx\8d\90\82ð\8fÁ\82·
-#define TEST_CONNECT_RESULT_CHECK
+//#define TEST_CONNECT_RESULT_CHECK
///
///\90¶\95ú\91\97\83X\83e\81[\83^\83X
}
+
+BOOL NicoLiveStream_isPremium(NicoLiveStream_P self){
+
+ return 0;
+
+}
+
+
+///
+///\83n\81[\83g\83r\81[\83g\82Ì\8aÔ\8au\82ð\90Ý\92è\81i\83~\83\8a\95b)
+///
+VOID NicoLiveStream_setHeartBeatMsec(NicoLiveStream_P self,DWORD msec){
+
+
+
+ return;
+}
+
+///
+///\83n\81[\83g\83r\81[\83g\82Ì\8aÔ\8au\82ð\8eæ\93¾(\83~\83\8a\95b)
+///
+DWORD NicoLiveStream_getHeartBeatMsec(NicoLiveStream_P self){
+
+ return 300000;
+
+
+}
+
+///
+///\83n\81[\83g\83r\81[\83g\97L\8cø\81E\96³\8cø\90Ý\92è
+///
+VOID NicoLiveStream_setHeartBeatFlag(NicoLiveStream_P self,BOOL flag){
+
+ return;
+
+}
+
+
+///
+///\83n\81[\83g\83r\81[\83g\97L\8cø\83t\83\89\83O\8eæ\93¾
+///
+BOOL NicoLiveStream_getHeartBeatFlag(NicoLiveStream_P self){
+
+ return FALSE;
+
+
+}
+
+
+///
+///\83L\81[\83v\83A\83\89\83C\83u\82Ì\8aÔ\8au\82ð\90Ý\92è(\83~\83\8a\95b)
+///
+VOID NicoLiveStream_setKeapALiveMsec(NicoLiveStream_P self,DWORD msec){
+
+#ifdef USE_NLIB_KEEPALIVE
+ self->chatManager.keepAliveTime = msec;
+ WSASetEvent(self->chatManager.setKeepAliveTimeEvent);
+#endif
+ return;
+
+}
+
+///
+///\83L\81[\83v\83A\83\89\83C\83u\82Ì\8aÔ\8au\82ð\8eæ\93¾(\83~\83\8a\95b)
+///
+DWORD NicoLiveStream_getKeapALiveMsec(NicoLiveStream_P self){
+
+#ifdef USE_NLIB_KEEPALIVE
+ return self->chatManager.keepAliveTime;
+#else
+ return 0;
+#endif
+
+}
+
+
+///
+///\83L\81[\83v\83A\83\89\83C\83u\97L\8cø\81E\96³\8cø\90Ý\92è
+///
+VOID NicoLiveStream_setKeapALiveFlag(NicoLiveStream_P self,BOOL flag){
+
+#ifdef USE_NLIB_KEEPALIVE
+ self->chatManager.keapALiveFlag = flag;
+#endif
+}
+
+
+///
+///\83L\81[\83v\83A\83\89\83C\83u\83t\83\89\83O\8eæ\93¾
+///
+BOOL NicoLiveStream_getKeapALiveFlag(NicoLiveStream_P self){
+
+#ifdef USE_NLIB_KEEPALIVE
+ return self->chatManager.keapALiveFlag;
+#else
+ return FALSE;
+#endif
+
+}
+
+
+
+INT_PTR NicoLiveStream_getResFrom(NicoLiveStream_P self){
+
+ return 0;
+}
+
+NLIB_RESULT NicoLiveStream_sendHeartBeat(NicoLiveStream_P self){
+
+ return NLIB_ERR_OK;
+}
+
+
+///
+///\83X\83g\83\8a\81[\83\80\83X\83e\81[\83^\83X\82ÌID\82ð\8eæ\93¾
+///
+LPCTSTR NicoLiveStream_getId(NicoLiveStream_P self){
+ static const LPCTSTR rslt = TEXT("lv000002");
+ return rslt;
+}
+
+
+///
+///\83X\83g\83\8a\81[\83\80\83X\83e\81[\83^\83X\82Ì\83R\83~\83\85\83j\83e\83B\94Ô\8d\86\82ð\8eæ\93¾
+///
+LPCTSTR NicoLiveStream_getDefaultCommunity(NicoLiveStream_P self){
+ static const LPCTSTR rslt = TEXT("co222222");
+ return rslt;
+}
+
+
+///
+///\83X\83g\83\8a\81[\83\80\83X\83e\81[\83^\83X\82Ì\83v\83\8d\83o\83C\83_\83^\83C\83v\82ð\8eæ\93¾
+///
+PROVIDERTYPE NicoLiveStream_getProviderType(NicoLiveStream_P self){
+
+ return 0;
+}
+
+
+///
+///\83X\83g\83\8a\81[\83\80\83X\83e\81[\83^\83X\82Ì\83I\81[\83i\81[\83t\83\89\83O\82ð\8eæ\93¾
+///
+BOOL NicoLiveStream_isOwner(NicoLiveStream_P self){
+
+ return FALSE;
+}
+
+
+
+///
+///\83X\83g\83\8a\81[\83\80\83X\83e\81[\83^\83X\82Ì\8aJ\8en\8e\9e\8d\8f\82ð\8eæ\93¾
+///
+time_t NicoLiveStream_getStartTime(NicoLiveStream_P self){
+
+ return 0;
+}
+
+///
+///\83X\83g\83\8a\81[\83\80\83X\83e\81[\83^\83X\82Ì\8fI\97¹\8e\9e\8d\8f\82ð\8eæ\93¾
+///
+time_t NicoLiveStream_getEndTime(NicoLiveStream_P self){
+
+ return 0;
+}
+
+///
+///\83X\83g\83\8a\81[\83\80\83X\83e\81[\83^\83X\82Ì\8aJ\8fê\8e\9e\8d\8f\82ð\8eæ\93¾
+///
+time_t NicoLiveStream_getOpenTime(NicoLiveStream_P self){
+
+ return 0;
+
+}
+
+///
+///\83X\83g\83\8a\81[\83\80\83X\83e\81[\83^\83X\82Ì\83x\81[\83X\8e\9e\8d\8f\82ð\8eæ\93¾
+///
+time_t NicoLiveStream_getBaseTime(NicoLiveStream_P self){
+
+ return 0;
+}
+
+
+///
+///\83X\83g\83\8a\81[\83\80\83X\83e\81[\83^\83X\82Ì\83^\83C\83g\83\8b\8eæ\93¾
+///
+LPCTSTR NicoLiveStream_getTitle(NicoLiveStream_P self){
+#ifdef PLAYERSTATUS_GET_TITLE
+ return self->playerStatus.stream.title;
+#else
+ static const LPCTSTR rslt = TEXT("");
+ return rslt;
+#endif
+}
\ No newline at end of file
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\nlib\nlib_errorMessage.cpp" />
+ <ClCompile Include="..\nlib\nlib_exception.cpp" />
<ClCompile Include="nlite_stub.cpp" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\nlib\nlib_errorMessage.cpp">
<Filter>ソース ファイル</Filter>
</ClCompile>
+ <ClCompile Include="..\nlib\nlib_exception.cpp">
+ <Filter>ソース ファイル</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\nlib\nlib.h">