本文整理汇总了C++中GetICustButton函数的典型用法代码示例。如果您正苦于以下问题:C++ GetICustButton函数的具体用法?C++ GetICustButton怎么用?C++ GetICustButton使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetICustButton函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
INT_PTR EditPolyPaintDeformDlgProc::DlgProc (TimeValue t, IParamMap2 *pmap, HWND hWnd,
UINT msg, WPARAM wParam, LPARAM lParam)
{
//BOOL ret;
switch (msg) {
case WM_INITDIALOG: {
uiValid = false;
ICustButton *btn = GetICustButton(GetDlgItem(hWnd,IDC_PAINTDEFORM_PUSHPULL));
btn->SetType(CBT_CHECK);
ReleaseICustButton(btn);
btn = GetICustButton(GetDlgItem(hWnd,IDC_PAINTDEFORM_RELAX));
btn->SetType(CBT_CHECK);
ReleaseICustButton(btn);
btn = GetICustButton(GetDlgItem(hWnd,IDC_PAINTDEFORM_REVERT));
btn->SetType(CBT_CHECK);
ReleaseICustButton(btn);
break;
}
case WM_PAINT:
if (uiValid) break;
SetEnables (hWnd);
break;
case WM_COMMAND:
//uiValid = false;
switch (LOWORD(wParam)) {
case IDC_PAINTDEFORM_PUSHPULL:
mpEPoly->OnPaintBtn( PAINTMODE_PAINTPUSHPULL, t );
SetEnables (hWnd);
break;
case IDC_PAINTDEFORM_RELAX:
mpEPoly->OnPaintBtn( PAINTMODE_PAINTRELAX, t );
SetEnables (hWnd);
break;
case IDC_PAINTDEFORM_REVERT:
mpEPoly->OnPaintBtn( PAINTMODE_ERASEDEFORM, t );
SetEnables (hWnd);
break;
case IDC_PAINTDEFORM_APPLY:
theHold.Begin ();
mpEPoly->EpModCommit (t, false, true);
theHold.Accept (GetString (IDS_PAINTDEFORM));
break;
case IDC_PAINTDEFORM_CANCEL:
mpEPoly->EpModCancel ();
break;
case IDC_PAINTDEFORM_OPTIONS:
GetMeshPaintMgr()->BringUpOptions();
break;
default:
InvalidateUI (hWnd);
break;
}
}
return FALSE;
}
示例2: LOWORD
INT_PTR MonoFlectorTypeObjDlgProc::DlgProc(TimeValue t, IParamMap2 *map, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
int id = LOWORD(wParam);
switch (msg)
{
case WM_INITDIALOG:
{ ICustButton *iBut = GetICustButton(GetDlgItem(hWnd,IDC_EP_PICKBUTTON));
iBut->SetType(CBT_CHECK);
iBut->SetHighlightColor(GREEN_WASH);
ReleaseICustButton(iBut);
mf->hParams=hWnd;
mf->ShowName(mf->pblock2->GetINode(PB_MESHNODE));
}
break;
case WM_DESTROY:
ICustButton *iBut;
iBut=GetICustButton(GetDlgItem(hWnd,IDC_EP_PICKBUTTON));
if (iBut) iBut->SetCheck(FALSE);
ReleaseICustButton(iBut);
break;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDC_EP_PICKBUTTON:
{ sso->IntoPickMode();
break;
}
}
break;
}
return TRUE;
}
示例3: Update
/// Called to update the controls of the dialog
virtual void Update( TimeValue t, Interval &valid, IParamMap2 *map )
{
ICustButton *bmSelectBtn;
IParamBlock2 *pblock;
int i;
long buttons[ 6 ] = { IDC_FRONT_NAME, IDC_BACK_NAME, IDC_LEFT_NAME, IDC_RIGHT_NAME, IDC_TOP_NAME, IDC_BOTTOM_NAME };
BitmapInfo bi;
ParamMap2UserDlgProc::Update( t, valid, map );
pblock = map->GetParamBlock();
for( i = plStaticEnvLayer::kBmpFrontBitmap; i <= plStaticEnvLayer::kBmpBottomBitmap; i++ )
{
bmSelectBtn = GetICustButton( GetDlgItem( map->GetHWnd(), buttons[ i ] ) );
PBBitmap *pbbm = pblock->GetBitmap( i, t );
if( pbbm )
bmSelectBtn->SetText( (TCHAR *)pbbm->bi.Filename() );
else
bmSelectBtn->SetText( _T( "None" ) );
ReleaseICustButton( bmSelectBtn );
}
plStaticEnvLayer *layer = (plStaticEnvLayer *)map->GetParamBlock()->GetOwner();
bi.SetName( layer->GetBaseFilename( t ) );
SetDlgItemText( map->GetHWnd(), IDC_BASE_FILENAME, bi.Filename() );
map->Enable( plStaticEnvLayer::kBmpGenerateFaces, ( bi.Name() == NULL || bi.Name()[ 0 ] == 0 ) ? FALSE : TRUE );
bmSelectBtn = GetICustButton( GetDlgItem( map->GetHWnd(), IDC_GENERATE_FACES ) );
bmSelectBtn->SetText( _T( "Generate From Node" ) );
ReleaseICustButton( bmSelectBtn );
i = pblock->GetInt( plStaticEnvLayer::kBmpTextureSize, t );
pblock->SetValue( plStaticEnvLayer::kBmpLastTextureSize, t, i );
}
示例4: SetWindowText
void ParticleMesherObject::UpdateUI()
{
Point3 min,max;
pblock2->GetValue(particlemesher_customboundsa,0,min,FOREVER);
pblock2->GetValue(particlemesher_customboundsb,0,max,FOREVER);
Box3 box;
box.Init();
box += min;
box += max;
TSTR text;
BOOL useBounds;
pblock2->GetValue(particlemesher_usecustombounds, 0, useBounds, FOREVER);
if (useBounds)
{
if (box.IsEmpty())
text.printf(_T("%s"),GetString(IDS_EMPTY));
else
{
text.printf(_T("(%0.0f,%0.0f,%0.0f)"),min.x,min.y,min.z);
SetWindowText(GetDlgItem(hParams,IDC_BOUNDSTEXT),
text);
text.printf(_T("(%0.0f,%0.0f,%0.0f)"),max.x,max.y,max.z);
SetWindowText(GetDlgItem(hParams,IDC_BOUNDSTEXT2),
text);
}
//make sure we only enable the button in the modify panel
// bug 257747 1/30/01 watje
if (ip)
{
ICustButton *iBut = GetICustButton(GetDlgItem(hParams,IDC_PICKBB));
if (ip->GetCommandPanelTaskMode()==TASK_MODE_MODIFY)
{
if (iBut) iBut->Enable(TRUE);
}
ReleaseICustButton(iBut);
}
}
else
{
text.printf(_T(" "));
SetWindowText(GetDlgItem(hParams,IDC_BOUNDSTEXT),
text);
text.printf(_T(" "));
SetWindowText(GetDlgItem(hParams,IDC_BOUNDSTEXT2),
text);
ICustButton *iBut = GetICustButton(GetDlgItem(hParams,IDC_PICKBB));
if (iBut) iBut->Enable(FALSE);
ReleaseICustButton(iBut);
}
}
示例5: GetICustButton
void
BlobMesh::DisableButtons(HWND hWnd)
{
if (GetCOREInterface()->GetCommandPanelTaskMode() == TASK_MODE_CREATE)
{
ICustButton *iBut = GetICustButton(GetDlgItem(hWnd, IDC_ADD));
if (iBut)
{
iBut->Enable(FALSE);
ReleaseICustButton(iBut);
}
iBut = NULL;
iBut = GetICustButton(GetDlgItem(hWnd, IDC_PICK));
if (iBut)
{
iBut->Enable(FALSE);
ReleaseICustButton(iBut);
}
iBut = NULL;
iBut = GetICustButton(GetDlgItem(hWnd, IDC_REMOVE));
if (iBut)
{
iBut->Enable(FALSE);
ReleaseICustButton(iBut);
}
}
else
{
ICustButton *iBut = GetICustButton(GetDlgItem(hWnd, IDC_ADD));
if (iBut)
{
iBut->Enable(TRUE);
iBut->SetHighlightColor(GREEN_WASH);
ReleaseICustButton(iBut);
}
iBut = NULL;
iBut = GetICustButton(GetDlgItem(hWnd, IDC_PICK));
if (iBut)
{
iBut->Enable(TRUE);
iBut->SetType(CBT_CHECK);
iBut->SetHighlightColor(GREEN_WASH);
ReleaseICustButton(iBut);
}
}
}
示例6: LOWORD
//WIN32 : BOOL UVWFrameDlgProc::DlgProc(TimeValue t, IParamMap2 *map, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
INT_PTR UVWFrameDlgProc::DlgProc(TimeValue t, IParamMap2 *map, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
int id = LOWORD(wParam);
switch (msg)
{
case WM_INITDIALOG:
SetWindowText(GetDlgItem(hWnd,IDC_TKU_ABOUT),UVWFRAME_LABEL);
if (sho->uvwMesh)
SetWindowText(GetDlgItem(hWnd, IDC_UVWF_PICKOBJ), sho->uvwMesh->GetName());
else
SetWindowText(GetDlgItem(hWnd, IDC_UVWF_PICKOBJ), _T("Pick Object"));
LoadImages();
ICustButton *iTmp;
iTmp = GetICustButton(GetDlgItem(hWnd,IDC_TL_ABOUT));
iTmp->SetImage(hAboutImage, 0, 0, 0, 0, 16, 16);
iTmp->SetTooltip(TRUE,_T("About UVW Frame"));
iTmp = GetICustButton(GetDlgItem(hWnd,IDC_TL_HELP));
iTmp->SetImage(hHelpImage, 0, 0, 0, 0, 16, 16);
iTmp->SetTooltip(TRUE,_T("UVW Frame Help"));
ReleaseICustButton(iTmp);
break;
case WM_DESTROY:
break;
case WM_COMMAND:
switch(id)
{
case IDC_TL_ABOUT:
DialogBoxParam( hInstance, MAKEINTRESOURCE(IDD_ABOUT), GetCOREInterface()->GetMAXHWnd(), AboutDlgProc, 0);
break;
case IDC_TL_HELP:
ShellExecute(NULL, _T("open"), _T("http://www.mankua.com/uvwframe.php"), NULL, NULL, SW_SHOWNORMAL);
break;
case IDC_UVWF_SAVE:
sho->SaveUVW(hWnd);
break;
case IDC_UVWF_LOAD:
sho->LoadUVW(hWnd);
break;
}
break;
}
return FALSE;
}
示例7: Set
void Set(PB2Value& val, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t)
{
if (!owner)
return;
plStaticEnvLayer* layer = (plStaticEnvLayer*)owner;
IParamBlock2 *pb = layer->GetParamBlockByID(plStaticEnvLayer::kBlkBitmap);
switch (id)
{
case plStaticEnvLayer::kBmpFrontBitmap:
case plStaticEnvLayer::kBmpBackBitmap:
case plStaticEnvLayer::kBmpLeftBitmap:
case plStaticEnvLayer::kBmpRightBitmap:
case plStaticEnvLayer::kBmpTopBitmap:
case plStaticEnvLayer::kBmpBottomBitmap:
// Set up the enums so these would match...
if (pb->GetMap())
pb->GetMap()->Invalidate( id );
// Update the bitmap saved by the layer
//layer->SetBitmap( id, &val.bm->bi );
break;
case plStaticEnvLayer::kBmpBaseFilename:
if( pb->GetMap() )
{
pb->GetMap()->Enable( plStaticEnvLayer::kBmpGenerateFaces, ( val.s == NULL || val.s[ 0 ] == 0 ) ? FALSE : TRUE );
ICustButton *bmSelectBtn = GetICustButton( GetDlgItem( pb->GetMap()->GetHWnd(), IDC_GENERATE_FACES ) );
bmSelectBtn->SetText( _T( "Generate From Node" ) );
ReleaseICustButton( bmSelectBtn );
}
break;
}
}
示例8: switch
BOOL SWrapObjectDlgProc::DlgProc(
TimeValue t,IParamMap *map,HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
{int FToTick=(int)((float)TIME_TICKSPERSEC/(float)GetFrameRate());
switch (msg) {
case WM_INITDIALOG: {
ICustButton *iBut = GetICustButton(GetDlgItem(hWnd,IDC_AP_WRAPBUTTON));
iBut->SetType(CBT_CHECK);
iBut->SetHighlightColor(GREEN_WASH);
ReleaseICustButton(iBut);
po->hParams=hWnd;
Update(t);
return FALSE; // stop default keyboard focus - DB 2/27
}
case WM_COMMAND:
switch (LOWORD(wParam))
{ case IDC_AP_WRAPBUTTON:
{ if (po->ip->GetCommandMode()->ID() == CID_STDPICK)
{ if (po->creating)
{ theCreateSWrapObjectMode.JumpStart(po->ip,po);
po->ip->SetCommandMode(&theCreateSWrapObjectMode);
} else {po->ip->SetStdCommandMode(CID_OBJMOVE);}
} else
{ po->pickCB.po = po;
po->ip->SetPickMode(&po->pickCB);
}
break;
}
}
break;
}
return TRUE;
}
示例9: GetICustButton
void PickOrientNode::ExitMode(IObjParam *ip)
{
ICustButton *iBut = GetICustButton(GetDlgItem(p->hWnd,IDC_ORIENT_TARG_PICKNODE));
if (iBut) iBut->SetCheck(FALSE);
ReleaseICustButton(iBut);
GetCOREInterface()->PopPrompt();
}
示例10: EnableWindow
void TestSplitByAmountDlgProc::UpdateTypeDlg( HWND hWnd, int type )
{
bool enable = (type == kSplitByAmount_testType_fraction);
bool bRandom = enable;
EnableWindow( GetDlgItem( hWnd, IDC_RATIOTEXT ), enable );
ISpinnerControl* spin = GetISpinner( GetDlgItem( hWnd, IDC_RATIO2SPIN ) );
spin->Enable( enable );
ReleaseISpinner( spin );
enable = (type == kSplitByAmount_testType_everyN);
EnableWindow( GetDlgItem( hWnd, IDC_EVERYNTEXT ), enable );
spin = GetISpinner( GetDlgItem( hWnd, IDC_EVERYNSPIN ) );
spin->Enable( enable );
ReleaseISpinner( spin );
enable = (type >= kSplitByAmount_testType_firstN);
EnableWindow( GetDlgItem( hWnd, IDC_FIRSTNTEXT ), enable );
EnableWindow( GetDlgItem( hWnd, IDC_PERSOURCE ), enable );
spin = GetISpinner( GetDlgItem( hWnd, IDC_FIRSTNSPIN ) );
spin->Enable( enable );
ReleaseISpinner( spin );
EnableWindow( GetDlgItem( hWnd, IDC_UNIQUENESSBOX ), bRandom );
EnableWindow( GetDlgItem( hWnd, IDC_SEEDTEXT ), bRandom );
spin = GetISpinner( GetDlgItem( hWnd, IDC_SEEDSPIN ) );
spin->Enable( bRandom );
ReleaseISpinner( spin );
ICustButton* button = GetICustButton( GetDlgItem( hWnd, IDC_NEW ) );
button->Enable( bRandom );
ReleaseICustButton( button );
}
示例11: GetISpinner
void RendSplineParamsMapDlgProc::Initialize(HWND hWnd, TimeValue t)
{
if (hWnd == NULL) return;
else
{
ISpinnerControl *iSpin = GetISpinner(GetDlgItem(hWnd, IDC_ASPECTSPIN));
iSpin->LinkToEdit(GetDlgItem(hWnd, IDC_ASPECT), EDITTYPE_FLOAT);
iSpin->SetLimits(0.0f,99999999.0f);
iSpin->SetAutoScale(TRUE);
ReleaseISpinner(iSpin);
if (RendSpline::hLockButton == NULL) {
HBITMAP hBitmap, hMask;
RendSpline::hLockButton = ImageList_Create(16, 15, TRUE, 2, 0);
hBitmap = LoadBitmap(RendSplineDesc.HInstance(), MAKEINTRESOURCE(IDB_LOCK));
hMask = LoadBitmap(RendSplineDesc.HInstance(), MAKEINTRESOURCE(IDB_LOCKMASK));
ImageList_Add(RendSpline::hLockButton,hBitmap,hMask);
DeleteObject(hBitmap);
DeleteObject(hMask);
}
ICustButton *lockAspect = GetICustButton(GetDlgItem(hWnd,IDC_ASPECTLOCK));
lockAspect->SetImage(RendSpline::hLockButton,0,0,1,1,16,15);
lockAspect->SetType(CBT_CHECK);
ReleaseICustButton(lockAspect);
CheckRadioButton(hWnd, IDC_VIEWPORT, IDC_RENDERER, IDC_RENDERER);
BOOL usePhysUVs = mod->GetUsePhysicalScaleUVs();
CheckDlgButton(hWnd, IDC_REAL_WORLD_MAP_SIZE, usePhysUVs);
}
}
示例12: switch
INT_PTR BerconWoodDlgProc::DlgProc(TimeValue t,IParamMap2 *map,HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam) {
switch (msg) {
case WM_INITDIALOG: {
// Lock buttons
ICustButton* custButton = GetICustButton(GetDlgItem(hWnd, IDC_LOCK_GRAIN));
custButton->SetText(_T("L"));
ReleaseICustButton(custButton);
// Wood type
HWND hwndMap = GetDlgItem(hWnd, IDC_WOOD_TYPE);
SendMessage(hwndMap, CB_ADDSTRING, 0, (LPARAM)GetString(IDS_RADIAL_WOOD));
SendMessage(hwndMap, CB_ADDSTRING, 0, (LPARAM)GetString(IDS_PERLIN_WOOD));
SendMessage(hwndMap, CB_ADDSTRING, 0, (LPARAM)GetString(IDS_SIMPLEX_WOOD));
SendMessage(hwndMap, CB_ADDSTRING, 0, (LPARAM)GetString(IDS_LINEAR_WOOD));
// Set correct dropdown value
int curIndex;
map->GetParamBlock()->GetValue(wood_type, t, curIndex, FOREVER);
SendMessage(GetDlgItem(hWnd, IDC_WOOD_TYPE), CB_SETCURSEL, (WPARAM)curIndex, 0);
break;
}
case WM_SHOWWINDOW: {
// Set correct dropdown value
int curIndex;
map->GetParamBlock()->GetValue(wood_type, t, curIndex, FOREVER);
SendMessage(GetDlgItem(hWnd, IDC_WOOD_TYPE), CB_SETCURSEL, (WPARAM)curIndex, 0);
break;
}
default: return FALSE;
}
return TRUE;
}
示例13: SetupPadLockButton
void SetupPadLockButton(HWND hWnd,int id, BOOL check) {
ICustButton *iBut;
iBut = GetICustButton(GetDlgItem(hWnd,id));
iBut->SetImage(hLockButtons,2,2,2,2,16,15);
iBut->SetType(CBT_CHECK);
ReleaseICustButton(iBut);
}
示例14: TurnButton
void TurnButton(HWND hWnd,int SpinNum,BOOL ison)
{ ICustButton *iBut;
iBut=GetICustButton(GetDlgItem(hWnd,SpinNum));
if (iBut)
{ if (ison) iBut->Enable(); else iBut->Disable();}
ReleaseICustButton(iBut);
}
示例15: CheckButton
void CheckButton(HWND hWnd,int id, BOOL check) {
ICustButton *iBut;
iBut = GetICustButton(GetDlgItem(hWnd,id));
if( iBut )
iBut->SetCheck(check);
ReleaseICustButton(iBut);
}