本文整理汇总了C++中PluginStartupInfo::DialogRun方法的典型用法代码示例。如果您正苦于以下问题:C++ PluginStartupInfo::DialogRun方法的具体用法?C++ PluginStartupInfo::DialogRun怎么用?C++ PluginStartupInfo::DialogRun使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PluginStartupInfo
的用法示例。
在下文中一共展示了PluginStartupInfo::DialogRun方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OpenW
HANDLE WINAPI OpenW(const OpenInfo *OInfo)
{
static FarDialogItem DlgItems[]={
/* 0*/ {DI_DOUBLEBOX,2, 1,37, 5, {0},NULL ,NULL ,0 ,GetMsg(MTitle)},
/* 1*/ {DI_EDIT ,4, 2,34, 2, {1},PluginName,NULL ,DIF_HISTORY ,L""},
/* 2*/ {DI_CHECKBOX ,4, 3, 0, 0, {0},0 ,NULL ,0 ,GetMsg(MCase)},
/* 3*/ {DI_BUTTON ,0, 4, 0, 0, {0},0 ,NULL ,DIF_CENTERGROUP|DIF_DEFAULTBUTTON,GetMsg(MOk)},
/* 4*/ {DI_BUTTON ,0, 4, 0, 0, {0},0 ,NULL ,DIF_CENTERGROUP ,GetMsg(MCancel)}
};
CFarSettings settings(PluginId);
bPrevCaseSensitive = settings.Get(L"CaseSensitive", false);
DlgItems[ixCaseSensitive].Selected = bPrevCaseSensitive ? 1 : 0;
HANDLE hEdit = Info.DialogInit(&PluginId, &DialogId,
-1, -1, 40, 7,
PluginName,
DlgItems, ArraySize(DlgItems),
0, 0,
MyDlgProc, 0);
if (hEdit == INVALID_HANDLE_VALUE)
return INVALID_HANDLE_VALUE;
EditorInfo einfo = {sizeof(EditorInfo)};
Info.EditorControl(-1, ECTL_GETINFO, 0, &einfo);
InitialLine = einfo.CurLine;
InitialCol = einfo.CurPos;
InitialTop = einfo.TopScreenLine;
TotalLines = einfo.TotalLines;
nChanges = 0;
bSequentialInput = true;
bLineChanged = false;
ctx = SearchAlloc();
if (Info.DialogRun(hEdit)!=ixOk)
UndoAll();
RemoveHighlight();
settings.Set(L"CaseSensitive", bPrevCaseSensitive);
Info.DialogFree(hEdit);
if (Length(PrevPattern)<MAX_PATTERN_LEN)
SearchFree(ctx);
else
SearchHFree(ctx);
SetLength(&PrevPattern,0);
return INVALID_HANDLE_VALUE;
}
示例2: OpenW
HANDLE WINAPI OpenW(const struct OpenInfo*)
{
InitDialogItem InitItems[]=
{
//type,x1,y1,x2,y2,focus,selected,flags,default,data
{DI_DOUBLEBOX,3,1,67,18,0,0,0,0,_T("Very Cool Dialog")},
{DI_USERCONTROL,4,2,66,17,0,0,0,0,_T("")},
{DI_BUTTON,3,19,0,0,0,0,0,1,_T("Ok")},
{DI_BUTTON,12,19,0,0,0,0,0,0,_T("Cancel")},
};
FarDialogItem DialogItems[sizeof(InitItems)/sizeof(InitItems[0])];
InitDialogItems(InitItems,DialogItems,sizeof(InitItems)/sizeof(InitItems[0]));
FAR_CHAR_INFO *VirtualBuffer=(FAR_CHAR_INFO *)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,(DialogItems[1].X2-DialogItems[1].X1+1)*(DialogItems[1].Y2-DialogItems[1].Y1+1)*sizeof(FAR_CHAR_INFO));
DialogItems[1].VBuf=VirtualBuffer;
HANDLE hDlg=Info.DialogInit(&MainGuid,&DialogGuid,-1,-1,71,21,NULL,DialogItems,sizeof(DialogItems)/sizeof(DialogItems[0]),0,0,MainDialogProc,0);
if(hDlg!=INVALID_HANDLE_VALUE)
{
Info.DialogRun(hDlg);
Info.DialogFree(hDlg);
}
if(VirtualBuffer) HeapFree(GetProcessHeap(),0,VirtualBuffer);
return NULL;
}