void CSametimeProto::InitMeanwhileServices() { debugLog(_T("InitMeanwhileServices() start")); if (options.encrypt_session) { mwSession_addCipher(session, mwCipher_new_RC2_128(session)); mwSession_addCipher(session, mwCipher_new_RC2_40(session)); } InitUserList(); InitMessaging(); InitFiles(); InitConference(); mwSession_setProperty(session, "PROTO_STRUCT_PTR", this, NULL); mwSession_setProperty(session, mwSession_AUTH_USER_ID, options.id, NULL); mwSession_setProperty(session, mwSession_AUTH_PASSWORD, options.pword, NULL); mwSession_setProperty(session, mwSession_CLIENT_TYPE_ID, (void*)options.client_id, NULL); if (options.use_old_default_client_ver) { mwSession_setProperty(session, mwSession_CLIENT_VER_MAJOR, GUINT_TO_POINTER(db_get_w(0, m_szModuleName, "ClientVersionMajor", MW_PROTOCOL_VERSION_MAJOR)), 0); mwSession_setProperty(session, mwSession_CLIENT_VER_MINOR, GUINT_TO_POINTER(db_get_w(0, m_szModuleName, "ClientVersionMinor", MW_PROTOCOL_VERSION_MINOR)), 0); } else { mwSession_setProperty(session, mwSession_CLIENT_VER_MAJOR, GUINT_TO_POINTER(db_get_w(0, m_szModuleName, "ClientVersionMajor", 0x001e)), 0); mwSession_setProperty(session, mwSession_CLIENT_VER_MINOR, GUINT_TO_POINTER(db_get_w(0, m_szModuleName, "ClientVersionMinor", 0x196f)), 0); } }
void CSametimeProto::InitMeanwhileServices() { debugLog(_T("InitMeanwhileServices() start")); if (options.encrypt_session) { mwSession_addCipher(session, mwCipher_new_RC2_128(session)); mwSession_addCipher(session, mwCipher_new_RC2_40(session)); } InitUserList(); InitMessaging(); InitFiles(); InitConference(); mwSession_setProperty(session, "PROTO_STRUCT_PTR", this, NULL); mwSession_setProperty(session, mwSession_AUTH_USER_ID, options.id, NULL); mwSession_setProperty(session, mwSession_AUTH_PASSWORD, options.pword, NULL); mwSession_setProperty(session, mwSession_CLIENT_TYPE_ID, (void*)options.client_id, NULL); mwSession_setProperty(session, mwSession_CLIENT_VER_MAJOR, (void*)options.client_versionMajor, NULL); mwSession_setProperty(session, mwSession_CLIENT_VER_MINOR, (void*)options.client_versionMinor, NULL); }
//初始化对话框 BOOL CUserProp::OnInitDialog() { CDialog::OnInitDialog(); CString s=CINIFile::GetAppPath ();/////本地路径 CINIFile f( s + m_iniFile); CString key=TEXT("config"); TCHAR path[MAX_PATH]; CString skinfolder; skinfolder=f.GetKeyVal(key,"skinfolder","image\\client\\game\\"); skinfolder=s+"\\"+skinfolder; wsprintf(path,"%sgame\\button.bmp",skinfolder); m_Ok.LoadButtonBitmap(path,false); m_Cancel.LoadButtonBitmap(path,false); wsprintf(path,"%sgame\\prop.bmp",skinfolder); //wsprintf(path,TEXT("image\\client\\game\\prop.bmp")); m_bk.SetLoadInfo(path,true); CGameImageHelper ImageHandle(&m_bk); HRGN hRgn=AFCBmpToRgn(ImageHandle,RGB(255,0,255),RGB(1,1,1)); if (hRgn!=NULL) { SetWindowPos(NULL,0,0,ImageHandle.GetWidth(),ImageHandle.GetHeight(),SWP_NOZORDER|SWP_NOOWNERZORDER|SWP_NOMOVE); SetWindowRgn(hRgn,TRUE); } MoveWindow(0,0,m_bk.GetWidth(),m_bk.GetHeight()); CenterWindow(GetParent()); InitUserList(); AfxSetResourceHandle(GetModuleHandle(NULL)); return TRUE; }