当前位置: 首页>>代码示例>>C++>>正文


C++ CExpression::CreateNewBitmap方法代码示例

本文整理汇总了C++中CExpression::CreateNewBitmap方法的典型用法代码示例。如果您正苦于以下问题:C++ CExpression::CreateNewBitmap方法的具体用法?C++ CExpression::CreateNewBitmap怎么用?C++ CExpression::CreateNewBitmap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CExpression的用法示例。


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

示例1: handleEvent


//.........这里部分代码省略.........
                break;
                
            case IDC_OPTIONS_DUMP:
                g_pControlPanel->dumpModelInfo ();
                break;
                
#ifdef WIN32
            case IDC_HELP_GOTOHOMEPAGE:
                ShellExecute (0, "open", "http://www.swissquake.ch/chumbalum-soft/index.html", 0, 0, SW_SHOW);
                break;
#endif
                
            case IDC_HELP_ABOUT:
                mxMessageBox (this,
                    "v0.1 (c) 2001, Valve, LLC.  All rights reserved.\r\nBuild Date: "__DATE__"",
                    "Valve Face Poser", 
                    MX_MB_OK | MX_MB_INFORMATION);
                break;
                
            case IDC_EXPRESSIONS_REDOBITMAPS:
                {
                    bool saveOverrides = g_pExpressionTrayTool->GetOverridesShowing();
                    g_pExpressionTrayTool->SetOverridesShowing( false );
                    CExpClass *active = expressions->GetActiveClass();
                    if ( active )
                    {
                        for ( int i = 0; i < active->GetNumExpressions() ; i++ )
                        {
                            CExpression *exp = active->GetExpression( i );
                            if ( !exp )
                                continue;
                            
                            active->SelectExpression( i );
                            exp->CreateNewBitmap( models->GetActiveModelIndex() );
                            
                            if ( ! ( i % 5 ) )
                            {
                                g_pExpressionTrayTool->redraw();
                            }
                        }
                        
                        if ( active->HasOverrideClass() )
                        {
                            
                            g_pExpressionTrayTool->SetOverridesShowing( true );
                            
                            CExpClass *oc = active->GetOverrideClass();
                            for ( int i = 0; i < oc->GetNumExpressions() ; i++ )
                            {
                                CExpression *exp = oc->GetExpression( i );
                                if ( !exp )
                                    continue;
                                
                                oc->SelectExpression( i );
                                exp->CreateNewBitmap( models->GetActiveModelIndex() );
                                
                                if ( ! ( i % 5 ) )
                                {
                                    g_pExpressionTrayTool->redraw();
                                }
                            }
                        }
                        active->SelectExpression( 0 );
                    }
                    
                    g_pExpressionTrayTool->SetOverridesShowing( saveOverrides );
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:67,代码来源:mdlviewer.cpp

示例2: handleEvent


//.........这里部分代码省略.........
                        
                        m_nTopOffset = offset;
                        
                        redraw();
                    }
                }
                break;
            case IDC_AB:
                {
                    AB();	
                }
                break;
            case IDC_THUMBNAIL_INCREASE:
                {
                    ThumbnailIncrease();
                }
                break;
            case IDC_THUMBNAIL_DECREASE:
                {
                    ThumbnailDecrease();
                }
                break;
            case IDC_CONTEXT_CREATEBITMAP:
                {
                    if ( m_nClickedCell >= 0 )
                    {
                        CExpClass *active = expressions->GetActiveClass();
                        if ( active )
                        {
                            CExpression *exp = active->GetExpression( m_nClickedCell );
                            if ( exp )
                            {
                                active->SelectExpression( m_nClickedCell );
                                exp->CreateNewBitmap( models->GetActiveModelIndex() );
                                redraw();
                            }
                        }
                    }
                }
                break;
            }
            break;
        }
    case mxEvent::MouseDown:
        {
            if ( !( event->buttons & mxEvent::MouseRightButton ) )
            {
                // Figure out cell #
                int cell = GetCellUnderPosition( event->x, event->y );
                CExpClass *active = expressions->GetActiveClass();
                if ( active )
                {

                    if ( cell == m_nCurCell && cell >= 0 && cell < active->GetNumExpressions() )
                    {
                        mxETButton *btn = GetItemUnderCursor( event->x, event->y );
                        if ( btn && btn->m_fnCallback )
                        {	
                            (this->*(btn->m_fnCallback))( cell );
                            return iret;
                        }
                    }
                    
                    if ( cell >= 0 && cell < active->GetNumExpressions() )
                    {
                        active->SelectExpression( cell, event->modifiers & mxEvent::KeyShift ? false : true );
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:67,代码来源:mxexpressiontray.cpp


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