这篇教程C++ AfxThrowResourceException函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AfxThrowResourceException函数的典型用法代码示例。如果您正苦于以下问题:C++ AfxThrowResourceException函数的具体用法?C++ AfxThrowResourceException怎么用?C++ AfxThrowResourceException使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了AfxThrowResourceException函数的21个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ZeroMemoryvoid CPianoCtrl::UpdateKeyLabelFont(CSize Size, DWORD dwStyle){ LOGFONT lf; ZeroMemory(&lf, sizeof(lf)); lf.lfQuality = ANTIALIASED_QUALITY; lf.lfPitchAndFamily = FF_SWISS; // sans serif lf.lfWeight = FW_BOLD; CSize MaxLabel(0, 0); CClientDC dc(this); CFont ExtFont; // font for measuring label text extents lf.lfHeight = 50; // sufficient height for reasonable precision if (!ExtFont.CreateFontIndirect(&lf)) // create text extent font AfxThrowResourceException(); HGDIOBJ hPrevFont = dc.SelectObject(ExtFont); // select font int nLabels = m_KeyLabel.GetSize(); for (int iLabel = 0; iLabel < nLabels; iLabel++) { // for each label CSize sz = dc.GetTextExtent(m_KeyLabel[iLabel]); if (sz.cx > MaxLabel.cx) // if label width exceeds maximum MaxLabel.cx = sz.cx; // update maximum if (sz.cy > MaxLabel.cy) // if label height exceeds maximum MaxLabel.cy = sz.cy; // update maximum } dc.SelectObject(hPrevFont); // restore DC's default font double FontAspect; if (MaxLabel.cx) // if at least one label has non-zero width FontAspect = double(MaxLabel.cy) / MaxLabel.cx; // get font aspect ratio else // all zero widths FontAspect = 0; // avoid divide by zero double WhiteAvail = 2.0 / 3.0; // portion of white key available for label // compute font height; truncate instead of rounding to err on side of caution int FontHeight; if (dwStyle & PS_VERTICAL) { // if vertical orientation int WhiteMaxWidth = trunc((Size.cx - m_BlackKeySize.cx) * WhiteAvail); FontHeight = trunc(min(MaxLabel.cx, WhiteMaxWidth) * FontAspect); FontHeight = min(FontHeight, m_BlackKeySize.cy); } else { // horizontal orientation if (dwStyle & PS_ROTATE_LABELS) { // if rotated labels int WhiteMaxHeight = trunc((Size.cy - m_BlackKeySize.cy) * WhiteAvail); FontHeight = trunc(min(MaxLabel.cx, WhiteMaxHeight) * FontAspect); FontHeight = min(FontHeight, m_BlackKeySize.cx); lf.lfOrientation = 900; // rotate font 90 degrees counter-clockwise lf.lfEscapement = 900; } else { // normal labels FontHeight = trunc((m_BlackKeySize.cx - OUTLINE_WIDTH * 2) * FontAspect); int WhiteMaxHeight = trunc((Size.cy - m_BlackKeySize.cy) * WhiteAvail); FontHeight = min(FontHeight, WhiteMaxHeight); } } FontHeight = CLAMP(FontHeight, MIN_FONT_HEIGHT, MAX_FONT_HEIGHT); lf.lfHeight = FontHeight; // font height, in logical pixels m_KeyLabelFont.DeleteObject(); // delete previous font if any if (!m_KeyLabelFont.CreateFontIndirect(&lf)) // create font AfxThrowResourceException();}
开发者ID:victimofleisure,项目名称:ChordEase,代码行数:54,
示例2: AfxThrowResourceExceptionint CPianoCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CWnd::OnCreate(lpCreateStruct) == -1) return -1; // create key brushes for (int iType = 0; iType < KEY_TYPES; iType++) { // for each key type for (int iState = 0; iState < KEY_STATES; iState++) { // for each key state if (!m_KeyBrush[iType][iState].CreateSolidBrush(m_KeyColor[iType][iState])) AfxThrowResourceException(); } } if (!m_OutlineBrush.CreateSolidBrush(m_OutlineColor)) // create outline brush AfxThrowResourceException(); return 0;}
开发者ID:victimofleisure,项目名称:ChordEase,代码行数:15,
示例3: ASSERT// dock bars will be created in the order specified by dwMRCDockBarMap// this also controls which gets priority during layout// this order can be changed by calling EnableDocking repetitively// with the exact order of priority//------------------------------------------------------------------------------void CMRCFrameWndSizeDock::EnableDocking(DWORD dwDockStyle, CRuntimeClass *pFloatingClass)// This is over-ridden primarily because we need to insert our own CDockBar class// to handle the recalc layout, and this is the place they are created.//------------------------------------------------------------------------------{ // must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0); m_pFloatingFrameClass = pFloatingClass; // protected member for (int i = 0; i < 4; i++) { if (dwMRCDockBarMap[i][1] & dwDockStyle & CBRS_ALIGN_ANY) // protected { CDockBar* pDock = (CDockBar*)GetControlBar(dwMRCDockBarMap[i][0]); if (pDock == NULL) { pDock = new CSizeDockBar; if (!pDock->Create(this, WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE | dwMRCDockBarMap[i][1], dwMRCDockBarMap[i][0])) { AfxThrowResourceException(); } } } }}
开发者ID:Joincheng,项目名称:lithtech,代码行数:32,
示例4: AfxGetInstanceHandleCFHDragWnd::CFHDragWnd(){ // Register the window class if it has not already been registered. WNDCLASS wndclass; HINSTANCE hInst = AfxGetInstanceHandle(); if(!(::GetClassInfo(hInst, FHDRAGWND_CLASSNAME, &wndclass))) { // otherwise we need to register a new class wndclass.style = CS_SAVEBITS ; wndclass.lpfnWndProc = ::DefWindowProc; wndclass.cbClsExtra = wndclass.cbWndExtra = 0; wndclass.hInstance = hInst; wndclass.hIcon = NULL; wndclass.hCursor = LoadCursor( hInst, IDC_ARROW); wndclass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1); wndclass.lpszMenuName = NULL; wndclass.lpszClassName = FHDRAGWND_CLASSNAME; if (!AfxRegisterClass(&wndclass)) AfxThrowResourceException(); } m_pFlatHeaderCtrl = NULL; m_iItem = -1; m_lphdiItem = NULL;}
开发者ID:GFFavourite,项目名称:Script.NET,代码行数:26,
示例5: AfxGetInstanceHandleBOOL CTimeViewer::RegisterWindowClass(){ WNDCLASS wndcls; HINSTANCE hInst = AfxGetInstanceHandle(); if (!(::GetClassInfo(hInst, TIMEVIEWER_CLASSNAME, &wndcls))) { // otherwise we need to register a new class wndcls.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW; wndcls.lpfnWndProc = ::DefWindowProc; wndcls.cbClsExtra = wndcls.cbWndExtra = 0; wndcls.hInstance = hInst; wndcls.hIcon = NULL; wndcls.hCursor = AfxGetApp()->LoadStandardCursor(IDC_ARROW); wndcls.hbrBackground = (HBRUSH) (COLOR_3DFACE + 1); wndcls.lpszMenuName = NULL; wndcls.lpszClassName = TIMEVIEWER_CLASSNAME; if (!AfxRegisterClass(&wndcls)) { AfxThrowResourceException(); return FALSE; } } return TRUE;}
开发者ID:yongxiu,项目名称:sudoku,代码行数:28,
示例6: AfxThrowResourceExceptionCPen::CPen(int nPenStyle, int nWidth, const LOGBRUSH* pLogBrush, int nStyleCount, const DWORD* lpStyle){ if (!Attach(::ExtCreatePen(nPenStyle, nWidth, pLogBrush, nStyleCount, lpStyle))) AfxThrowResourceException();}
开发者ID:jbeaurain,项目名称:omaha_vs2010,代码行数:7,
示例7: m_pTreeListCtrlCTreeListColumnDropWnd::CTreeListColumnDropWnd() : m_pTreeListCtrl( NULL ){ // register the window class WNDCLASS wndclass; HINSTANCE hInst = AfxGetInstanceHandle(); if(!(::GetClassInfo(hInst, TLCDROPWND_CLASSNAME, &wndclass))) { wndclass.style = CS_HREDRAW | CS_VREDRAW ; //CS_SAVEBITS ; wndclass.lpfnWndProc = ::DefWindowProc; wndclass.cbClsExtra = wndclass.cbWndExtra = 0; wndclass.hInstance = hInst; wndclass.hIcon = NULL; wndclass.hCursor = LoadCursor( hInst, IDC_ARROW); wndclass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1); wndclass.lpszMenuName = NULL; wndclass.lpszClassName = TLCDROPWND_CLASSNAME; if (!AfxRegisterClass(&wndclass)) AfxThrowResourceException(); } if( g_lpfnUpdateLayeredWindow == NULL || g_lpfnSetLayeredWindowAttributes == NULL ) { HMODULE hUser32 = GetModuleHandle(_T("USER32.DLL")); g_lpfnUpdateLayeredWindow = (lpfnUpdateLayeredWindow)GetProcAddress( hUser32, _T("UpdateLayeredWindow") ); g_lpfnSetLayeredWindowAttributes = (lpfnSetLayeredWindowAttributes)GetProcAddress( hUser32, _T("SetLayeredWindowAttributes") ); if( g_lpfnUpdateLayeredWindow == NULL || g_lpfnSetLayeredWindowAttributes == NULL ) m_bLayeredWindows = FALSE; else m_bLayeredWindows = TRUE; }}
开发者ID:derekqian,项目名称:GPUSim_ATTILA,代码行数:35,
示例8: lstrcpyn//--------------------------------------------------------------------------------------------------------------//BOOL CFrmMain::PreCreateWindow(CREATESTRUCT& cs){ if (FALSE == CFrameWnd::PreCreateWindow(cs)) return FALSE; cs.dwExStyle &= ~WS_EX_CLIENTEDGE; lstrcpyn(AfxGetThreadState()->m_szTempClassName, c_szSingleInstanceId, sizeof(AfxGetThreadState()->m_szTempClassName) / sizeof(TCHAR)); cs.lpszClass = AfxGetThreadState()->m_szTempClassName; WNDCLASS wndcls = {0}; HINSTANCE hInst = NULL; hInst = AfxGetInstanceHandle(); if (FALSE == ::GetClassInfo(hInst, cs.lpszClass, &wndcls)) { wndcls.style = 0; wndcls.lpfnWndProc = ::DefWindowProc; wndcls.cbClsExtra = wndcls.cbWndExtra = 0; wndcls.hInstance = hInst; wndcls.hIcon = NULL; wndcls.hCursor = NULL; wndcls.hbrBackground = NULL; wndcls.lpszMenuName = NULL; wndcls.lpszClassName = cs.lpszClass; if (!AfxRegisterClass(&wndcls)) AfxThrowResourceException(); } else { ASSERT(wndcls.style == 0); return TRUE; } return TRUE;}
开发者ID:AlexS2172,项目名称:IVRMstandard,代码行数:36,
示例9: Input/******************************************************************************Function Name : RegisterWindowClassInput(s) : -Output : BOOLFunctionality : Register the Indicator window as a custom Window control.Member of : CWaitIndicatorFriend of : -Author(s) : Venkatanarayana MakamDate Created :Modifications :******************************************************************************/BOOL CWaitIndicator::RegisterWindowClass(void){ WNDCLASS wndcls; HINSTANCE hInst = AfxGetInstanceHandle(); if (!(::GetClassInfo(hInst, INDICATOR_CLASSNAME, &wndcls))) { // otherwise we need to register a new class wndcls.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW ; wndcls.lpfnWndProc = ::DefWindowProc; wndcls.cbClsExtra = wndcls.cbWndExtra = 0; wndcls.hInstance = hInst; wndcls.hIcon = nullptr; wndcls.hCursor = AfxGetApp()->LoadStandardCursor(IDC_ARROW); wndcls.hbrBackground = (HBRUSH) (COLOR_ACTIVEBORDER + 1); wndcls.lpszMenuName = nullptr; wndcls.lpszClassName = INDICATOR_CLASSNAME; if (!AfxRegisterClass(&wndcls)) { AfxThrowResourceException(); return FALSE; } } return TRUE;}
开发者ID:BlackVodka,项目名称:busmaster,代码行数:38,
示例10: AfxThrowResourceExceptionvoid RWindowsImageList::CreateMask( int nWidth, int nHeight, COLORREF crMask ){ // Create the image mask bitmap and screen compatible device HDC hdcImageMask = ::CreateCompatibleDC( m_hdcImageList ) ; HBITMAP hbmImageMask = ::CreateBitmap( nWidth, nHeight, 1, 1, NULL ) ; if (!hdcImageMask || !hdcImageMask) { if (hdcImageMask) { ::DeleteDC( hdcImageMask ) ; } if (hbmImageMask) { ::DeleteObject( hbmImageMask ) ; } AfxThrowResourceException( ) ; } m_hdcImageMask = hdcImageMask ; m_hbmImageMask = hbmImageMask ; // Select the bitmaps into the screen compatible dc m_hbmOldImageMask = (HBITMAP) ::SelectObject( m_hdcImageMask, m_hbmImageMask ) ; COLORREF crBkColor = ::SetBkColor( m_hdcImageList, crMask ) ; ::BitBlt( m_hdcImageMask, 0, 0, nWidth, nHeight, m_hdcImageList, 0, 0, SRCCOPY ) ; ::SetBkColor( m_hdcImageList, crBkColor ) ;}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:34,
示例11: AfxGetInstanceHandle/** Method preamble ************************************************************** CLASS: TFXDataTip* NAME: RegisterWnd** DESCRIPTION: This method registers the window class used by the DataTip* windows. This must be called after the class background* brush has been constructed.** PARAMETERS: none** RETURN TYPE: void******************************************************************************** REVISION HISTORY ********************************************************************************/void TFXDataTip::RegisterWnd( ){ // check for prior registration if (_registered) return; // initialise the basic information before registration HINSTANCE hInst = AfxGetInstanceHandle( ); // initialise the window class information WNDCLASS wndcls; wndcls.style = CS_SAVEBITS | CS_DBLCLKS; wndcls.lpfnWndProc = ::DefWindowProc; wndcls.cbClsExtra = 0; wndcls.cbWndExtra = 0; wndcls.hInstance = hInst; wndcls.hIcon = NULL; wndcls.hCursor = AfxGetApp()->LoadStandardCursor(IDC_ARROW); wndcls.hbrBackground = *_brush; wndcls.lpszMenuName = NULL; wndcls.lpszClassName = _T("TFXDataTip"); // register the window class if (!AfxRegisterClass(&wndcls)) AfxThrowResourceException(); _registered = TRUE;}
开发者ID:SnipeDragon,项目名称:gamecq,代码行数:47,
示例12: ASSERT_VALIDvoid CGuiDocBarExten::BarsDocking(CFrameWnd * pFrame, DWORD dwDockStyle) { ASSERT_VALID(pFrame); // must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0); pFrame->EnableDocking(dwDockStyle); for (int i = 0; i < 4; i++) { if (dwDockBarMap[i][1] & dwDockStyle & CBRS_ALIGN_ANY) { CDockBar* pDock = (CDockBar*)pFrame->GetControlBar(dwDockBarMap[i][0]); if( pDock == 0 || ! pDock->IsKindOf(RUNTIME_CLASS(CGuiDocBarExten)) ) { BOOL bNeedDelete = ! pDock->m_bAutoDelete; pDock->m_pDockSite->RemoveControlBar(pDock); pDock->m_pDockSite = 0; pDock->DestroyWindow(); if( bNeedDelete ) delete pDock; pDock = 0; } if( pDock == 0 ) { pDock = new CGuiDocBarExten; ASSERT_VALID(pDock); if ((!pDock) || (!pDock->Create(pFrame, WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE | dwDockBarMap[i][1], dwDockBarMap[i][0]))) { AfxThrowResourceException(); } } } }}
开发者ID:neil-yi,项目名称:ffsource,代码行数:34,
示例13: AfxGetInstanceHandleBOOL CLabKnob::RegisterWindowClass(){ WNDCLASS wndcls; HINSTANCE hInst = AfxGetInstanceHandle(); HBRUSH background; background = ::GetSysColorBrush(COLOR_BTNFACE); if (!(::GetClassInfo(hInst, "MFCLabKnob", &wndcls))) { // otherwise we need to register a new class wndcls.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW; wndcls.lpfnWndProc = ::DefWindowProc; wndcls.cbClsExtra = wndcls.cbWndExtra = 0; wndcls.hInstance = hInst; wndcls.hIcon = NULL; wndcls.hCursor = AfxGetApp()->LoadStandardCursor(IDC_ARROW); wndcls.hbrBackground = background; wndcls.lpszMenuName = NULL; wndcls.lpszClassName = "MFCLabKnob"; if (!AfxRegisterClass(&wndcls)) { AfxThrowResourceException(); return FALSE; } } return TRUE;}
开发者ID:fville,项目名称:MFCLabWidget,代码行数:29,
示例14: ASSERTCWindowDC::CWindowDC(CWnd* pWnd){ ASSERT(pWnd == NULL || ::IsWindow(pWnd->m_hWnd)); if (!Attach(::GetWindowDC(m_hWnd = pWnd->GetSafeHwnd()))) AfxThrowResourceException();}
开发者ID:jbeaurain,项目名称:omaha_vs2010,代码行数:7,
示例15: AfxThrowResourceExceptionvoid CErrorsDialog::SelectSource(int nSel){ if (m_listErrorInfo.IsEmpty()) { CString strError; if( strError.LoadString(IDS_NOSPECIFIED_ERROR) == FALSE) { AfxThrowResourceException(); } m_ctlDescription.SetWindowText(strError); m_ctlGUID.SetWindowText(_T("")); } else { OLECHAR szGUID[40]; POSITION pos = m_listErrorInfo.FindIndex(nSel); struct MYERRORINFO* pInfo = (MYERRORINFO*)m_listErrorInfo.GetAt(pos); m_ctlDescription.SetWindowText(COLE2T(pInfo->bstrDescription)); ::StringFromGUID2(pInfo->guid, szGUID, 40); m_ctlGUID.SetWindowText(COLE2T(szGUID)); }}
开发者ID:jetlive,项目名称:skiaming,代码行数:25,
示例16: ASSERT_VALIDCBrush::CBrush(CBitmap* pBitmap){ ASSERT_VALID(pBitmap); if (!Attach(::CreatePatternBrush((HBITMAP)pBitmap->m_hObject))) AfxThrowResourceException();}
开发者ID:jbeaurain,项目名称:omaha_vs2010,代码行数:7,
示例17: AfxGetInstanceHandleCTitleTip::CTitleTip(){ // Register the window class if it has not already been registered. WNDCLASS wndcls; HINSTANCE hInst = AfxGetInstanceHandle(); if(!(::GetClassInfo(hInst, TITLETIP_CLASSNAME, &wndcls))) { // otherwise we need to register a new class wndcls.style = CS_SAVEBITS; wndcls.lpfnWndProc = ::DefWindowProc; wndcls.cbClsExtra = wndcls.cbWndExtra = 0; wndcls.hInstance = hInst; wndcls.hIcon = NULL; wndcls.hCursor = LoadCursor( hInst, IDC_ARROW ); wndcls.hbrBackground = NULL;//(HBRUSH)(COLOR_INFOBK + 1); wndcls.lpszMenuName = NULL; wndcls.lpszClassName = TITLETIP_CLASSNAME; if (!AfxRegisterClass(&wndcls)) AfxThrowResourceException(); } m_bHasBorder = true; m_bIsTransparent = false;}
开发者ID:modmanmatt,项目名称:blackcats-mirc,代码行数:25,
示例18: AfxThrowResourceExceptionBOOL CXTPSyntaxEditTipWnd::RegisterWindowClass(HINSTANCE hInstance /*= NULL*/){ WNDCLASS wndcls; if (hInstance == NULL) hInstance = AfxGetInstanceHandle(); if (!(::GetClassInfo(hInstance, XTP_EDIT_CLASSNAME_LBOXTIP, &wndcls))) { // otherwise we need to register a new class wndcls.style = CS_SAVEBITS | CS_HREDRAW | CS_VREDRAW; wndcls.lpfnWndProc = ::DefWindowProc; wndcls.cbClsExtra = wndcls.cbWndExtra = 0; wndcls.hInstance = hInstance; wndcls.hIcon = NULL; wndcls.hCursor = ::LoadCursor(0, IDC_ARROW); wndcls.hbrBackground = (HBRUSH)(COLOR_INFOBK + 1); wndcls.lpszMenuName = NULL; wndcls.lpszClassName = XTP_EDIT_CLASSNAME_LBOXTIP; if (!AfxRegisterClass(&wndcls)) { AfxThrowResourceException(); return FALSE; } } return TRUE;}
开发者ID:lai3d,项目名称:ThisIsASoftRenderer,代码行数:27,
示例19: AfxGetInstanceHandleBOOL CAdvComboBox::RegisterWindowClass(){ WNDCLASS wndcls; HINSTANCE hInst; hInst = AfxGetInstanceHandle(); ASSERT( hInst != 0 ); if( !(::GetClassInfo(hInst, ADVCOMBOBOXCTRL_CLASSNAME, &wndcls)) ) { wndcls.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW; wndcls.lpfnWndProc = ::DefWindowProc; wndcls.cbClsExtra = 0; wndcls.cbWndExtra = 0; wndcls.hInstance = hInst; wndcls.hIcon = NULL; wndcls.hCursor = AfxGetApp()->LoadStandardCursor(IDC_ARROW); wndcls.hbrBackground = (HBRUSH) (COLOR_WINDOW); wndcls.lpszMenuName = NULL; wndcls.lpszClassName = ADVCOMBOBOXCTRL_CLASSNAME; if( !AfxRegisterClass(&wndcls) ) { AfxThrowResourceException(); return FALSE; } } return TRUE;}
开发者ID:yunhaisoft,项目名称:aoctm,代码行数:29,
示例20: AfxGetInstanceHandleCTitleTip::CTitleTip(){ // Register the window class if it has not already been registered. WNDCLASS wndcls; HINSTANCE hInst = AfxGetInstanceHandle(); if(!(::GetClassInfo(hInst, TITLETIP_CLASSNAME, &wndcls))) { // otherwise we need to register a new class wndcls.style = CS_SAVEBITS; wndcls.lpfnWndProc = ::DefWindowProc; wndcls.cbClsExtra = wndcls.cbWndExtra = 0; wndcls.hInstance = hInst; wndcls.hIcon = NULL; wndcls.hCursor = LoadCursor( hInst, IDC_ARROW ); wndcls.hbrBackground = (HBRUSH)(COLOR_INFOBK +1); wndcls.lpszMenuName = NULL; wndcls.lpszClassName = TITLETIP_CLASSNAME; if (!AfxRegisterClass(&wndcls)) AfxThrowResourceException(); } m_dwLastLButtonDown = ULONG_MAX; m_dwDblClickMsecs = GetDoubleClickTime(); m_bCreated = FALSE; m_pParentWnd = NULL;}
开发者ID:saladyears,项目名称:Sea3D,代码行数:27,
示例21: AfxGetInstanceHandleBOOL CZegoAVView::RegisterWndClass(void){ WNDCLASS windowclass; HINSTANCE hInst = AfxGetInstanceHandle(); if (!(::GetClassInfo(hInst, L"ZegoAVView", &windowclass))) { windowclass.style = CS_DBLCLKS; windowclass.lpfnWndProc = ::DefWindowProc; windowclass.cbClsExtra = windowclass.cbWndExtra = 0; windowclass.hInstance = hInst; windowclass.hIcon = NULL; windowclass.hCursor = AfxGetApp()->LoadStandardCursor(IDC_ARROW); windowclass.hbrBackground = (HBRUSH)GetStockObject(NULL_BRUSH); windowclass.lpszMenuName = NULL; windowclass.lpszClassName = L"ZegoAVView"; if (!AfxRegisterClass(&windowclass)) { AfxThrowResourceException(); return FALSE; } } return TRUE;}
开发者ID:zegodev,项目名称:ZegoLiveDemo,代码行数:26,
注:本文中的AfxThrowResourceException函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ AggroAllPlayers函数代码示例 C++ AfxThrowMemoryException函数代码示例 |