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


C++ PluginStartupInfo::DialogFree方法代码示例

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


在下文中一共展示了PluginStartupInfo::DialogFree方法的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;
}
开发者ID:iyudincev,项目名称:FilterLines,代码行数:50,代码来源:FilterLines.cpp

示例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;
}
开发者ID:Maximus5,项目名称:evil-programmers,代码行数:23,代码来源:test.cpp


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