• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ LCDUIASSERT函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中LCDUIASSERT函数的典型用法代码示例。如果您正苦于以下问题:C++ LCDUIASSERT函数的具体用法?C++ LCDUIASSERT怎么用?C++ LCDUIASSERT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了LCDUIASSERT函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: while

CEzLcd::~CEzLcd()
{
    // delete all the screens
    LCD_PAGE_LIST::iterator it = m_LCDPageListMono.begin();
    while(it != m_LCDPageListMono.end())
    {
        CEzLcdPage *page_ = *it;
        LCDUIASSERT(NULL != page_);

        delete page_;
        ++it;
    }

    it = m_LCDPageListColor.begin();
    while(it != m_LCDPageListColor.end())
    {
        CEzLcdPage *page_ = *it;
        LCDUIASSERT(NULL != page_);

        delete page_;
        ++it;
    }

    m_connection.Shutdown();

    DeleteCriticalSection(&m_ButtonCS);
}
开发者ID:Eagle3386,项目名称:WhatPulse-Logitech-Widget,代码行数:27,代码来源:EZ_LCD.cpp


示例2: LCDUIASSERT

HANDLE CEzLcdPage::AddSkinnedProgressBar(LGProgressBarType type)
{
    LCDUIASSERT(LG_FILLED == type || LG_CURSOR == type || LG_DOT_CURSOR == type);
    CLCDSkinnedProgressBar *pProgressBar_ = new CLCDSkinnedProgressBar();
    LCDUIASSERT(NULL != pProgressBar_);
    pProgressBar_->Initialize();
    pProgressBar_->SetOrigin(0, 0);
    pProgressBar_->SetSize(160, LG_PROGRESS_BAR_INITIAL_HEIGHT);
    pProgressBar_->SetRange(LG_PROGRESS_BAR_RANGE_MIN, LG_PROGRESS_BAR_RANGE_MAX );
    pProgressBar_->SetPos(static_cast<FLOAT>(LG_PROGRESS_BAR_RANGE_MIN));
    pProgressBar_->SetObjectType(LG_PROGRESS_BAR);

// Map the progress style into what the UI classes understand
    CLCDProgressBar::ePROGRESS_STYLE eStyle = CLCDProgressBar::STYLE_FILLED;
    switch (type)
    {
    case LG_FILLED:
        eStyle = CLCDProgressBar::STYLE_FILLED;
        break;
    case LG_CURSOR:
        eStyle = CLCDProgressBar::STYLE_CURSOR;
        break;
    case LG_DOT_CURSOR:
        eStyle = CLCDProgressBar::STYLE_DASHED_CURSOR;
        break;
    }

    pProgressBar_->SetProgressStyle(eStyle);

    AddObject(pProgressBar_);

    return pProgressBar_;
}
开发者ID:PowerKiller,项目名称:wc-ng,代码行数:33,代码来源:EZ_LCD_Page.cpp


示例3: LCDUIASSERT

void CLCDGfxBase::BeginDraw(void)
{
    LCDUIASSERT(NULL != m_hBitmap);
    LCDUIASSERT(NULL == m_hPrevBitmap);
    if(NULL == m_hPrevBitmap)
    {
        m_hPrevBitmap = (HBITMAP) SelectObject(m_hDC, m_hBitmap);
        SetTextColor(m_hDC, RGB(255, 255, 255));
        SetBkColor(m_hDC, RGB(0, 0, 0));
    }
}
开发者ID:Armada651,项目名称:g15-chat,代码行数:11,代码来源:LCDGfxBase.cpp


示例4: UNREFERENCED_PARAMETER

HRESULT CLCDOutput::Initialize(lgLcdConnectContext* pContext, BOOL bUseWindow)
{    

    UNREFERENCED_PARAMETER(bUseWindow);

    DWORD res = ERROR_SUCCESS;

    CLCDManager::Initialize();

    // initialize our screens
    LCD_MGR_LIST::iterator it = m_LCDMgrList.begin();
    while(it != m_LCDMgrList.end())
    {
        CLCDManager *pMgr = *it;
        LCDUIASSERT(NULL != pMgr);

        pMgr->Initialize();
        ++it;
    }

    // LCD Stuff
    LCDUIASSERT(lInitCount >= 0);
    if(1 == InterlockedIncrement(&lInitCount))
    {
        // need to call lgLcdInit once
        res = lgLcdInit();
        if (ERROR_SUCCESS != res)
        {
            InterlockedDecrement(&lInitCount);
            LCDUITRACE(_T("WARNING: lgLcdInit failed\n"));
            return E_FAIL;
        }
    }

    m_lcdConnectCtxEx.appFriendlyName = _T("My App");
    m_lcdConnectCtxEx.isPersistent = FALSE;
    m_lcdConnectCtxEx.isAutostartable = FALSE;
    m_lcdConnectCtxEx.connection = LGLCD_INVALID_CONNECTION;

    // Initialize the added version 3.0 API fields
    m_lcdConnectCtxEx.dwAppletCapabilitiesSupported = LGLCD_APPLET_CAP_BASIC;
    m_lcdConnectCtxEx.dwReserved1 = 0;
    m_lcdConnectCtxEx.onNotify.notificationCallback = NULL;
    m_lcdConnectCtxEx.onNotify.notifyContext = NULL;

    // if user passed in the context, fill it up
    if (NULL != pContext)
    {
        memcpy(&m_lcdConnectCtxEx, pContext, sizeof(lgLcdConnectContext));
    }

    return S_OK;
}
开发者ID:Samangan,项目名称:mpc-hc,代码行数:53,代码来源:LCDOutput.cpp


示例5: LCDUIASSERT

/****f* LCD.SDK/SetVisible(HANDLE.handle,BOOL.visible)
* NAME
*  HRESULT SetVisible(HANDLE handle, BOOL visible) -- Set
*  corresponding object to be visible or invisible on the page being
*  worked on.
* INPUTS
*  handle  - handle to the object.
*  visible - set to FALSE to make object invisible, TRUE to make it
*            visible (default).
* RETURN VALUE
*  S_OK if succeeded.
*  E_FAIL otherwise.
******
*/
HRESULT CEzLcd::SetVisible(HANDLE handle, BOOL visible)
{
    CLCDBase* myObject_ = (CLCDBase*)handle;
    LCDUIASSERT(NULL != myObject_);
    LCDUIASSERT(NULL != myObject_);

    if (NULL != myObject_)
    {
        myObject_->Show(visible);
        return S_OK;
    }

    return E_FAIL;
}
开发者ID:Eagle3386,项目名称:WhatPulse-Logitech-Widget,代码行数:28,代码来源:EZ_LCD.cpp


示例6: LCDUIASSERT

lgLcdBitmap* CLCDGfxColor::GetLCDScreen(void)
{
    LCDUIASSERT(m_pLCDScreen == (lgLcdBitmap *) &m_LCDScreen);
    m_LCDScreen.hdr.Format = LGLCD_BMP_FORMAT_QVGAx32;
    memcpy(m_LCDScreen.pixels, m_pBitmapBits, m_nWidth * m_nHeight * 4);
    return m_pLCDScreen;
}
开发者ID:BadeazzBonne,项目名称:League-of-Legends-Helper,代码行数:7,代码来源:LCDGfxColor.cpp


示例7: DeleteObject

void CLCDGfxBase::Shutdown(void)
{
    if(NULL != m_hBitmap)
    {
        DeleteObject(m_hBitmap);
        m_hBitmap = NULL;
        m_pBitmapBits = NULL;
    }

    LCDUIASSERT(NULL == m_hPrevBitmap);
    m_hPrevBitmap = NULL;

    if(NULL != m_pBitmapInfo)
    {
        delete [] m_pBitmapInfo;
        m_pBitmapInfo = NULL;
    }

    if(NULL != m_hDC)
    {
        DeleteDC(m_hDC);
        m_hDC = NULL;
    }

    m_nWidth = 0;
    m_nHeight = 0;
}
开发者ID:Armada651,项目名称:g15-chat,代码行数:27,代码来源:LCDGfxBase.cpp


示例8: while

void CLCDCollection::OnDraw(CLCDGfxBase &rGfx)
{
    if(!IsVisible())
    {
        return;
    }

    //iterate through your objects and draw them
    LCD_OBJECT_LIST::iterator it = m_Objects.begin();
    while(it != m_Objects.end())
    {
        CLCDBase *pObject = *it++;
        LCDUIASSERT(NULL != pObject);

        if (pObject->IsVisible())
        {
            pObject->OnPrepareDraw(rGfx);

            // create the clip region
            HRGN hRgn = CreateRectRgn(pObject->GetOrigin().x, pObject->GetOrigin().y,
                                      pObject->GetOrigin().x + pObject->GetWidth(),
                                      pObject->GetOrigin().y + pObject->GetHeight());

            // ensure that controls only draw within their specified region
            SelectClipRgn(rGfx.GetHDC(), hRgn);

            // free the region (a copy is used in the call above)
            DeleteObject(hRgn);

            // offset the control at its origin so controls use (0,0)
            POINT ptPrevViewportOrg = { 0, 0 };
            SetViewportOrgEx(rGfx.GetHDC(),
                             pObject->GetOrigin().x,
                             pObject->GetOrigin().y,
                             &ptPrevViewportOrg);

            // allow controls to supply additional translation
            // this allows controls to move freely within the confined viewport
            OffsetViewportOrgEx(rGfx.GetHDC(),
                                pObject->GetLogicalOrigin().x,
                                pObject->GetLogicalOrigin().y,
                                NULL);

            pObject->OnDraw(rGfx);

            // set the clipping region to nothing
            SelectClipRgn(rGfx.GetHDC(), NULL);

            // restore the viewport origin
            SetViewportOrgEx(rGfx.GetHDC(),
                ptPrevViewportOrg.x,
                ptPrevViewportOrg.y,
                NULL);

            // restore the viewport origin offset
            OffsetViewportOrgEx(rGfx.GetHDC(), 0, 0, NULL);
        }
    }
}
开发者ID:1ldk,项目名称:mpc-hc,代码行数:59,代码来源:LCDCollection.cpp


示例9: LCDUIASSERT

void CLCDOutput::ClearBitmap(lgLcdBitmap160x43x1* pCurrentBitmap)
{
    LCDUIASSERT(NULL != pCurrentBitmap);
    if (pCurrentBitmap)
    {
        pCurrentBitmap->hdr.Format = LGLCD_BMP_FORMAT_160x43x1;
        ZeroMemory(pCurrentBitmap->pixels, sizeof(pCurrentBitmap->pixels));
    }
}
开发者ID:Samangan,项目名称:mpc-hc,代码行数:9,代码来源:LCDOutput.cpp


示例10: CloseAndDisconnect

void CLCDOutput::Shutdown(void)
{
    CloseAndDisconnect();
    if(0 == InterlockedDecrement(&lInitCount))
    {
        lgLcdDeInit();
    }
    LCDUIASSERT(lInitCount >= 0);
}
开发者ID:Samangan,项目名称:mpc-hc,代码行数:9,代码来源:LCDOutput.cpp


示例11: GetObject

HRESULT CEzLcdPage::SetOrigin(HANDLE handle, INT originX, INT originY)
{
    CLCDBase* myObject_ = GetObject(handle);
    LCDUIASSERT(NULL != myObject_);
    LCDUIASSERT(NULL != myObject_);

    //SIZE size_ = myObject_->GetSize();

    //LGObjectType objectType_ = myObject_->GetObjectType();

    if (NULL != myObject_)
    {
        myObject_->SetOrigin(originX, originY);
        return S_OK;
    }

    return E_FAIL;
}
开发者ID:PowerKiller,项目名称:wc-ng,代码行数:18,代码来源:EZ_LCD_Page.cpp


示例12: OnScreenExpired

void CLCDOutput::Update(DWORD dwTimestamp)
{
    if (m_pActiveScreen)
    {
        m_pActiveScreen->Update(dwTimestamp);
    }

    // check for expiration
    if (m_pActiveScreen && m_pActiveScreen->HasExpired())
    {
        m_pActiveScreen = NULL;
        //m_nPriority = LGLCD_PRIORITY_FYI; -> needs to go so that if a 
		// program sets priority to LGLCD_PRIORITY_BACKGROUND, that 
		// priority sticks.

        OnScreenExpired(m_pActiveScreen);

        // Clear the bitmap
        ClearBitmap(m_pLastBitmap);

        // find the next active screen
        LCD_MGR_LIST::iterator it = m_LCDMgrList.begin();
        while(it != m_LCDMgrList.end())
        {
            CLCDManager *pMgr = *it;
            LCDUIASSERT(NULL != pMgr);

            if (!pMgr->HasExpired())
            {
                ActivateScreen(pMgr);
                //m_nPriority = LGLCD_PRIORITY_FYI;  -> needs to go so that if a 
				// program sets priority to LGLCD_PRIORITY_BACKGROUND, that 
				// priority sticks.
                break;
            }

            ++it;
        }

        // if no screen found, empty the screen at idle priority
        if (NULL == m_pActiveScreen)
        {
            if (LGLCD_INVALID_DEVICE != m_hDevice)
            {
                lgLcdUpdateBitmap(m_hDevice, &CLCDManager::GetLCDScreen()->hdr,
                    LGLCD_ASYNC_UPDATE(LGLCD_PRIORITY_IDLE_NO_SHOW));
            }
        }
    }

    // check for lcd devices
    if (LGLCD_INVALID_DEVICE == m_hDevice)
    {
        EnumerateDevices();
    }
}
开发者ID:Samangan,项目名称:mpc-hc,代码行数:56,代码来源:LCDOutput.cpp


示例13: LCDUIASSERT

void CLCDGfx::DrawFilledRect(int nX, int nY, int nWidth, int nHeight)
{
    // this means, we're inside BeginDraw()/EndDraw()
    LCDUIASSERT(NULL != m_hPrevBitmap);

    HBRUSH hPrevBrush = (HBRUSH) SelectObject(m_hDC, GetStockObject(WHITE_BRUSH));
    RECT r = { nX, nY, nX + nWidth, nY + nHeight };
    ::FillRect(m_hDC, &r, hPrevBrush);
    SelectObject(m_hDC, hPrevBrush);
}
开发者ID:Fluffiest,项目名称:mpc-hc,代码行数:10,代码来源:LCDGfx.cpp


示例14: while

void CLCDCollection::ResetUpdate(void)
{
    LCD_OBJECT_LIST::iterator it = m_Objects.begin();
    while(it != m_Objects.end())
    {
        CLCDBase *pObject = *it;
        LCDUIASSERT(NULL != pObject);
        pObject->ResetUpdate();
        ++it;
    }
}
开发者ID:Samangan,项目名称:mpc-hc,代码行数:11,代码来源:LCDCollection.cpp


示例15: while

CEzLcdPage::~CEzLcdPage()
{
    LCD_OBJECT_LIST::iterator it_ = m_Objects.begin();
    while(it_ != m_Objects.end())
    {
        CLCDBase *pObject_ = *it_;
        LCDUIASSERT(NULL != pObject_);
        delete pObject_;

        ++it_;
    }
}
开发者ID:PowerKiller,项目名称:wc-ng,代码行数:12,代码来源:EZ_LCD_Page.cpp


示例16: CLCDBitmap

HANDLE CEzLcdPage::AddBitmap(INT width, INT height)
{
    CLCDBitmap *bitmap_ = new CLCDBitmap();
    LCDUIASSERT(NULL != bitmap_);
    bitmap_->Initialize();
    bitmap_->SetOrigin(0, 0);
    bitmap_->SetSize(width, height);

    AddObject(bitmap_);

    return bitmap_;
}
开发者ID:PowerKiller,项目名称:wc-ng,代码行数:12,代码来源:EZ_LCD_Page.cpp


示例17: LCDUIASSERT

void CLCDText::SetText(LPCTSTR szText)
{
    LCDUIASSERT(NULL != szText);
    if(szText && _tcscmp(m_sText.c_str(), szText))
    {
        m_sText.assign(szText);
        m_nTextLength = m_sText.size();
        m_dtp.iLeftMargin = 0;
        m_dtp.iRightMargin = 0;
        m_bRecalcExtent = TRUE;
    }
}
开发者ID:Samangan,项目名称:mpc-hc,代码行数:12,代码来源:LCDText.cpp



注:本文中的LCDUIASSERT函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LCD_CHECK_RET函数代码示例发布时间:2022-05-30
下一篇:
C++ LBUG函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap