BOOL CPaper::OnInitDialog() { CDialog::OnInitDialog(); m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); // TODO: 在此添加额外的初始化 m_Paper.InsertItem(0,"进程注入"); m_Paper.InsertItem(1,"进程信息"); m_Paper.InsertItem(2,"加壳工具"); m_Paper1.Create(IDD_RUNDLL32_DIALOG,this->GetDlgItem(IDC_TAB1)); m_Paper2.Create(IDD_TASK,this->GetDlgItem(IDC_TAB1)); m_Paper3.Create(IDD_PACK,this->GetDlgItem(IDC_TAB1)); CRect PageRect; m_Paper.GetClientRect(&PageRect); PageRect.top+=20; PageRect.bottom-=4; PageRect.left+=4; PageRect.right-=4; m_Paper1.MoveWindow(&PageRect); m_Paper2.MoveWindow(&PageRect); m_Paper3.MoveWindow(&PageRect); m_Paper1.ShowWindow(SW_SHOW); m_Paper2.ShowWindow(SW_HIDE); m_Paper3.ShowWindow(SW_HIDE); m_Paper1.SetFocus(); SetIcon(m_hIcon, TRUE); // 设置大图标 SetIcon(m_hIcon, FALSE); CFlash flash; flash.DoModal(); RegisterHotKey(m_hWnd,0,NULL,VK_F7); menu.CreatePopupMenu(); menu.AppendMenu(MF_STRING,IDM_OPEN,"打开"); menu.AppendMenu(MF_STRING,IDM_EXIT,"退出"); return TRUE; // return TRUE unless you set the focus to a control // 异常: OCX 属性页应返回 FALSE }
//------------------------- // FX_AddFlash //------------------------- CFlash *FX_AddFlash( vec3_t origin, float size1, float size2, float sizeParm, float alpha1, float alpha2, float alphaParm, vec3_t sRGB, vec3_t eRGB, float rgbParm, int killTime, qhandle_t shader, int flags, EMatImpactEffect matImpactFX /*MATIMPACTFX_NONE*/, int fxParm /*-1*/ ) { if ( theFxHelper.mFrameTime < 0 ) { // disallow adding new effects when the system is paused return 0; } if (!shader) { //yeah..this is bad, I guess, but SP seems to handle it by not drawing the flash, so I will too. assert(shader); return 0; } CFlash *fx = new CFlash; if ( fx ) { fx->SetMatImpactFX(matImpactFX); fx->SetMatImpactParm(fxParm); fx->SetOrigin1( origin ); // RGB---------------- fx->SetRGBStart( sRGB ); fx->SetRGBEnd( eRGB ); if (( flags & FX_RGB_PARM_MASK ) == FX_RGB_WAVE ) { fx->SetRGBParm( rgbParm * PI * 0.001f ); } else if ( flags & FX_RGB_PARM_MASK ) { // rgbParm should be a value from 0-100.. fx->SetRGBParm(rgbParm * 0.01f * killTime + theFxHelper.mTime + theFxHelper.mTimeFraction); } // Alpha---------------- fx->SetAlphaStart( alpha1 ); fx->SetAlphaEnd( alpha2 ); if (( flags & FX_ALPHA_PARM_MASK ) == FX_ALPHA_WAVE ) { fx->SetAlphaParm( alphaParm * PI * 0.001f ); } else if ( flags & FX_ALPHA_PARM_MASK ) { fx->SetAlphaParm(alphaParm * 0.01f * killTime + theFxHelper.mTime + theFxHelper.mTimeFraction); } // Size---------------- fx->SetSizeStart( size1 ); fx->SetSizeEnd( size2 ); if (( flags & FX_SIZE_PARM_MASK ) == FX_SIZE_WAVE ) { fx->SetSizeParm( sizeParm * PI * 0.001f ); } else if ( flags & FX_SIZE_PARM_MASK ) { fx->SetSizeParm(sizeParm * 0.01f * killTime + theFxHelper.mTime + theFxHelper.mTimeFraction); } fx->SetShader( shader ); fx->SetFlags( flags ); // fx->SetSTScale( 1.0f, 1.0f ); fx->Init(); FX_AddPrimitive( (CEffect**)&fx, killTime ); } return fx; }
//------------------------- // FX_AddFlash //------------------------- CFlash *FX_AddFlash( vec3_t origin, vec3_t sRGB, vec3_t eRGB, float rgbParm, int killTime, qhandle_t shader, int flags = 0 ) { if ( theFxHelper.mFrameTime < 1 ) { // disallow adding new effects when the system is paused return 0; } CFlash *fx = new CFlash; if ( fx ) { fx->SetOrigin1( origin ); // RGB---------------- fx->SetRGBStart( sRGB ); fx->SetRGBEnd( eRGB ); if (( flags & FX_RGB_PARM_MASK ) == FX_RGB_WAVE ) { fx->SetRGBParm( rgbParm * PI * 0.001f ); } else if ( flags & FX_RGB_PARM_MASK ) { // rgbParm should be a value from 0-100.. fx->SetRGBParm( rgbParm * 0.01f * killTime + theFxHelper.mTime ); } /* // Alpha---------------- fx->SetAlphaStart( alpha1 ); fx->SetAlphaEnd( alpha2 ); if (( flags & FX_ALPHA_PARM_MASK ) == FX_ALPHA_WAVE ) { fx->SetAlphaParm( alphaParm * PI * 0.001f ); } else if ( flags & FX_ALPHA_PARM_MASK ) { fx->SetAlphaParm( alphaParm * 0.01f * killTime + theFxHelper.mTime ); } // Size---------------- fx->SetSizeStart( size1 ); fx->SetSizeEnd( size2 ); if (( flags & FX_SIZE_PARM_MASK ) == FX_SIZE_WAVE ) { fx->SetSizeParm( sizeParm * PI * 0.001f ); } else if ( flags & FX_SIZE_PARM_MASK ) { fx->SetSizeParm( sizeParm * 0.01f * killTime + theFxHelper.mTime ); } */ fx->SetShader( shader ); fx->SetFlags( flags ); // fx->SetSTScale( 1.0f, 1.0f ); fx->Init(); FX_AddPrimitive( (CEffect**)&fx, killTime ); } return fx; }