CWebGrabSession::CWebGrabSession(LPCTSTR szAgentName, CWnd* pStatusWnd) : CInternetSession(szAgentName) //, 1, INTERNET_OPEN_TYPE_PRECONFIG, // NULL, NULL, INTERNET_FLAG_ASYNC) { CommonConstruct(); m_pStatusWnd = pStatusWnd; }
DWORD CThread::DestroyThread(BOOL bQueue) { MSG sMsg; DWORD dwExitCode; if (IsThreadActive()) { for (SetEvent(m_hObject), PostThreadMessage(WM_QUIT, 0, 0); GetThreadID() != GetCurrentThreadId() && ((!bQueue && WaitForSingleObject(m_hThread, INFINITE)) || (bQueue && MsgWaitForMultipleObjects(1, &m_hThread, FALSE, INFINITE, QS_PAINT | QS_TIMER | QS_POSTMESSAGE | QS_SENDMESSAGE) == WAIT_OBJECT_0 + 1)); ) { if (PeekMessage(&sMsg, (HWND)NULL, 0, 0, PM_QS_PAINT | PM_QS_POSTMESSAGE | PM_QS_SENDMESSAGE | PM_REMOVE)) { if (!AfxPreTranslateMessage(&sMsg)) { TranslateMessage(&sMsg); DispatchMessage(&sMsg); } } RestoreWaitCursor(); } dwExitCode = GetThreadStatus(); CloseHandle(m_hThread); CommonConstruct(); m_bAutoDelete = 0; return dwExitCode; } return 0; }
// extended construction CNewPropertySheet::CNewPropertySheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage, HBITMAP hbmWatermark, HPALETTE hpalWatermark, HBITMAP hbmHeader) { ASSERT(nIDCaption != 0); VERIFY(m_strCaption.LoadString(nIDCaption)); CommonConstruct(pParentWnd, iSelectPage, hbmWatermark, hpalWatermark, hbmHeader); }
CNewPropertySheet::CNewPropertySheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage) { ASSERT(pszCaption != NULL); m_strCaption = pszCaption; CommonConstruct(pParentWnd, iSelectPage); }
CProgressWnd::CProgressWnd(CWnd* pParent, LPCTSTR pszTitle, BOOL bSmooth /* = FALSE */) { CommonConstruct(); m_strTitle = pszTitle; Create(pParent, pszTitle, bSmooth); }
CNGWizardPage::CNGWizardPage(void) : CPropertyPage() { CommonConstruct(); //{{AFX_DATA_INIT(CNGWizardPage) //}}AFX_DATA_INIT }
CNewPropertySheet::CNewPropertySheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage, HBITMAP hbmWatermark, HPALETTE hpalWatermark , HBITMAP hbmHeader) { ASSERT(pszCaption != NULL); m_strCaption = pszCaption; CommonConstruct(pParentWnd, iSelectPage, hbmWatermark, hpalWatermark, hbmHeader); }
CNewPropertySheet::CNewPropertySheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage) { ASSERT(nIDCaption != 0); VERIFY(m_strCaption.LoadString(nIDCaption)); CommonConstruct(pParentWnd, iSelectPage); }
CNGWizardPage::CNGWizardPage( LPCTSTR lpszTemplateName, UINT uCaptionID /*= 0*/, UINT uTitleID /*= 0*/, UINT uSubtitleID /*= 0*/) : CPropertyPage(lpszTemplateName, uCaptionID, uTitleID, uSubtitleID) { CommonConstruct(); }
CNGWizardPage::CNGWizardPage( UINT uTemplateID, UINT uCaptionID /*= 0*/, UINT uTitleID /*= 0*/, UINT uSubtitleID /*= 0*/) : CPropertyPage(uTemplateID, uCaptionID, uTitleID, uSubtitleID) { CommonConstruct(); }
CHtmlDialog::CHtmlDialog(UINT nResID, HWND hWnd) { m_hWndParent = hWnd; CString strTemp; strTemp.Format("%d", nResID); ResourceToURL(strTemp); CommonConstruct(); }
COptionSheet::COptionSheet(LPCWSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage) : CDialog() { ASSERT(NULL != pszCaption); m_strCaption = pszCaption; CommonConstruct(pParentWnd, iSelectPage); }
COptionSheet::COptionSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage) : CDialog() { ASSERT(nIDCaption >= 0); VERIFY(m_strCaption.LoadString(nIDCaption)); CommonConstruct(pParentWnd, iSelectPage); }
CTokenParser::CTokenParser(BOOL IgnoreComments/* = TRUE*/, //default = True BOOL UseStringChar/* = TRUE*/) //default = True { bFnPlaces=0; bIgnoreComments = IgnoreComments; bUseStringChar = UseStringChar; CommonConstruct(); }
DelaunayMesh::DelaunayMesh(const Box & box, const Real very_small, const BoundaryCondition boundary_condition, const vector<const Point2D *> & input) : _mesh(0), _inner_box(box), _outer_box(box) { const string message = CommonConstruct(box, very_small, boundary_condition, input); if(message != "") { throw Exception("DelaunayMesh::DelaunayMesh()" + message); } }
GString::GString(const GString &src, int nCnt) { long l = (src._len > 256) ? src._len + 256 : 256; CommonConstruct(l); _len = ___min(_max, ___min(src._len, nCnt)); memcpy(_str, src._str, _len); _str[_len] = 0; }
CNewPropertyPage::CNewPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption, UINT nIDHeaderTitle, UINT nIDHeaderSubTitle, DWORD dwSize) { free(m_pPSP); m_pPSP=NULL; ASSERT(AfxIsValidString(lpszTemplateName)); AllocPSP(dwSize); CommonConstruct(lpszTemplateName, nIDCaption, nIDHeaderTitle, nIDHeaderSubTitle); }
///////////////////////////////////////////////////////////////////////////// //++ // // CBasePropertyPage::CBasePropertyPage // // Routine Description: // Default constructor. // // Arguments: // nIDTemplate [IN] Dialog template resource ID. // nIDCaption [IN] Caption string resource ID. // // Return Value: // None. // //-- ///////////////////////////////////////////////////////////////////////////// CBasePropertyPage::CBasePropertyPage( IN UINT nIDTemplate, IN UINT nIDCaption ) : CPropertyPage(nIDTemplate, nIDCaption) { CommonConstruct(); } //*** CBasePropertyPage::CBasePropertyPage(UINT, UINT)
///////////////////////////////////////////////////////////////////////////// //++ // // CBasePropertyPage::CBasePropertyPage // // Description: // Default constructor. // // Arguments: // nIDTemplateIn // Dialog template resource ID. // // nIDCaptionIn // Caption string resource ID. // // Return Value: // None. // //-- ///////////////////////////////////////////////////////////////////////////// CBasePropertyPage::CBasePropertyPage( UINT nIDTemplateIn , UINT nIDCaptionIn ) : CPropertyPage( nIDTemplateIn, nIDCaptionIn ) { CommonConstruct(); } //*** CBasePropertyPage::CBasePropertyPage
// extended construction CNewPropertyPage::CNewPropertyPage(UINT nIDTemplate, UINT nIDCaption,UINT nIDHeaderTitle, UINT nIDHeaderSubTitle, DWORD dwSize) { free(m_pPSP); m_pPSP=NULL; ASSERT(nIDTemplate != 0); AllocPSP(dwSize); CommonConstruct(MAKEINTRESOURCE(nIDTemplate), nIDCaption, nIDHeaderTitle, nIDHeaderSubTitle); }
CTokenParser::CTokenParser(BOOL IgnoreComments, BOOL UseStringChar, char* pTxt) { bFnPlaces=0; bIgnoreComments = IgnoreComments; bUseStringChar = UseStringChar; CommonConstruct(); pBuffInfo = new CTokenBufferInfo(this, pTxt); }
CHtmlDialog::CHtmlDialog(const CString& strURL, BOOL bRes, HWND hWnd) { m_hWndParent = hWnd; if (bRes) ResourceToURL(strURL); else m_strURL = strURL; CommonConstruct(); }
CHtmlDialog::CHtmlDialog(UINT nResID, CWnd* pParent/*= NULL*/) { m_hWndParent = pParent ? pParent->GetSafeHwnd() : NULL; CString strTemp; strTemp.Format("%d", nResID); ResourceToURL(strTemp); CommonConstruct(); }
//************************************************************************** CBCGPRibbonBackstageViewItemForm::CBCGPRibbonBackstageViewItemForm(UINT nDlgTemplateID, CRuntimeClass* pDlgClass, CSize sizeWaterMark) { ASSERT(pDlgClass != NULL); ASSERT(pDlgClass->IsDerivedFrom(RUNTIME_CLASS(CDialog))); CommonConstruct(); m_nDlgTemplateID = nDlgTemplateID; m_pDlgClass = pDlgClass; m_sizeWaterMark = sizeWaterMark; }
VOID CThread::Initialize() { INT nTimeout; for (m_dwTime = GetCurrentTime(), m_dwTimeout = (SystemParametersInfo(SPI_GETHUNGAPPTIMEOUT, 0, &nTimeout, 0)) ? (DWORD)nTimeout : 0; m_hThread != (HANDLE)NULL; ) { CloseHandle(m_hThread); break; } CommonConstruct(); m_bAutoDelete = FALSE; }
/*#f:Constructer for token file parser. The file name is the only required parameter. Defaults are set: whitespace (space and tab), seperators (,), string char (") and file include characters (>>).*/ CTokenParser::CTokenParser(byte Places, char* FileName, //path and file name BOOL IgnoreComments, //default = True BOOL UseStringChar, //default = True BOOL UseIncludes) //default = True { bFnPlaces=Places; bIgnoreComments = IgnoreComments; bUseStringChar = UseStringChar; CommonConstruct(); pFileInfo = new CTokenFileInfo(this, Places, FileName, UseIncludes); }
CHtmlDialog::CHtmlDialog(LPCTSTR lpszURL, BOOL bRes, CWnd* pParent/*= NULL*/) { m_hWndParent = pParent ? pParent->GetSafeHwnd() : NULL; if (bRes) { ResourceToURL(lpszURL); } else m_strURL = lpszURL; CommonConstruct(); }
// constructs a string with ch repeated nCnt times GString::GString(char ch, short nCnt) { long nInitialSize = (nCnt > 256) ? nCnt + 256 : 256; CommonConstruct(nInitialSize); _len = ___min(_max - 1, nCnt); int i; for (i = 0; i < _len; i++) _str[i] = ch; _len = i; _str[_len] = 0; }
DelaunayMesh::DelaunayMesh(const Box & box, const Real very_small, const BoundaryCondition boundary_condition, const vector<Point2D *> & points) : _mesh(0), _inner_box(box), _outer_box(box) { vector<const Point2D *> input(points.size()); for(unsigned int i = 0; i < input.size(); i++) { input[i] = points[i]; } const string message = CommonConstruct(box, very_small, boundary_condition, input); if(message != "") { throw Exception("DelaunayMesh::DelaunayMesh()" + message); } }
GString::GString(const char *src, int nCnt) { long nInitialSize = (nCnt > 256) ? nCnt + 256 : 256; CommonConstruct(nInitialSize); _len = 0; if (src) { int i; _len = ___min(_max - 1, nCnt); for (i = 0; i < _len && src[i]; i++) _str[i] = src[i]; _len = i; } _str[_len] = 0; }