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


C++ InitDialog函数代码示例

本文整理汇总了C++中InitDialog函数的典型用法代码示例。如果您正苦于以下问题:C++ InitDialog函数的具体用法?C++ InitDialog怎么用?C++ InitDialog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: SaveFlightDialogHandleEvent

Boolean SaveFlightDialogHandleEvent(EventPtr event) {

	Boolean handled = false;
	Boolean savedOk = false;
	char *inputName;

	switch (PFEventGetType(event)) {

	case frmOpenEvent:
		InitDialog();
		GUIFormDraw();		handled = true;
		break;

	case ctlSelectEvent:

		switch (PFEventGetControlSelectID(event)) {

		case SaveFlightOKButton: 
			inputName = GUIFieldGetText(SaveFlightFileNameField);
			if (inputName && StrLen(inputName)) {

				savedOk = FlightDBSaveFlight(GUIFieldGetText(SaveFlightFileNameField), FlightPlan, FpStackPeek(FlightPlanStackB, 0), false);

				if (!savedOk && GUIAlertShow(FlightExistsAlert) == 0) {

					savedOk = FlightDBSaveFlight(GUIFieldGetText(SaveFlightFileNameField), FlightPlan, FpStackPeek(FlightPlanStackB,0), true);

					if (!savedOk) ErrThrow(1966);

				}

			}

			if (savedOk) {

				StrNCopy(Preferences.FlightPlanName, inputName, sizeof(Preferences.FlightPlanName));
				GUIFormReturn();

			}

			handled = true;
			break;

		case SaveFlightCancelButton:
			handled = true;
			GUIFormReturn();
			break;
			
		}

		break;
			

	default:
		break;
	}

	return handled;

}
开发者ID:kbhaines,项目名称:flightmaster-legacy,代码行数:60,代码来源:SaveFlightDialog.c

示例2: nuiDialog

nuiDialogSelectDirectory::nuiDialogSelectDirectory(nuiMainWindow* pParent, const nglString& rTitle, const nglPath& rPath, const nglPath& rRootPath, nuiSize Left, nuiSize Top, nuiSize Width, nuiSize Height)
: nuiDialog(pParent), mpParent(pParent), mPath(rPath), mEventSink(this)
{
  mpContainer = new nuiSimpleContainer();

  nuiSize userWidth = (Width == 0.f) ? mpParent->GetWidth() * .8 : Width;
  nuiSize userHeight = (Height == 0.f) ? mpParent->GetHeight() * .8 : Height;
  
  mpContainer->SetUserSize(userWidth, userHeight);
  
  mpSelector = new nuiFileSelector(mPath, rRootPath);
  mpContainer->AddChild(mpSelector);
  
  mEventSink.Connect(mpSelector->OK, &nuiDialogSelectDirectory::OnSelectorOK);
  
  nuiLabel* pTitle = new nuiLabel(rTitle);
  pTitle->SetObjectName(_T("nuiDialog::Title"));
  InitDialog(pTitle, NULL, nuiDialog::eDialogButtonOk + nuiDialog::eDialogButtonCancel);
  
  nuiButton* pButton = new nuiButton(_T("New Folder"));
  pButton->SetObjectName(_T("nuiDialog::Button"));
  AddButton(pButton, nuiDialog::eDialogButtonCustom);
  mEventSink.Connect(pButton->Activated, &nuiDialogSelectDirectory::OnCreateNewFolder);
  
  SetContents(mpContainer);
  
  if ((Top == 0.f) && (Left == 0.f) && (Width == 0.f) && (Height == 0.f))
    SetDefaultPos();
  else
    SetUserPos(Left, Top);

  mEventSink.Connect(DialogDone, &nuiDialogSelectDirectory::OnDialogDone);
  
  mpSelector->UpdateLayout();
}
开发者ID:YetToCome,项目名称:nui3,代码行数:35,代码来源:nuiDialogSelectDirectory.cpp

示例3: InitToolTips

BOOL CSnapperOptions::OnInitDialog()
{
	CDialog::OnInitDialog();
	InitToolTips();
	InitDialog();
	return TRUE;
}
开发者ID:nicklepede,项目名称:onesnap,代码行数:7,代码来源:SnapperOptions.cpp

示例4: UNREFERENCED_PARAMETER

LRESULT CAboutDlg::DlgFunc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    UNREFERENCED_PARAMETER(lParam);
    switch (uMsg)
    {
    case WM_INITDIALOG:
        {
            InitDialog(hwndDlg, IDI_COMMITMONITOR);
            // initialize the controls
            m_link.ConvertStaticToHyperlink(hwndDlg, IDC_WEBLINK, _T("http://stefanstools.sourceforge.net"));
            TCHAR verbuf[1024] = {0};
#ifdef _WIN64
            _stprintf_s(verbuf, _countof(verbuf), _T("CommitMonitor version %d.%d.%d.%d (64-bit)"), CM_VERMAJOR, CM_VERMINOR, CM_VERMICRO, CM_VERBUILD);
#else
            _stprintf_s(verbuf, _countof(verbuf), _T("CommitMonitor version %d.%d.%d.%d"), CM_VERMAJOR, CM_VERMINOR, CM_VERMICRO, CM_VERBUILD);
#endif
            SetDlgItemText(hwndDlg, IDC_VERSIONLABEL, verbuf);
        }
        return TRUE;
    case WM_COMMAND:
        return DoCommand(LOWORD(wParam));
    default:
        return FALSE;
    }
}
开发者ID:CalciferLorain,项目名称:CommitMonitor,代码行数:25,代码来源:AboutDlg.cpp

示例5: main

int main(int argc, char *argv[]) {
    tmsg Msg;
    tevent_gadget EventG;
    uldat err;

    if (!ParseArgs(argc, argv))
	return 255;

    if (InitDialog()) while ((Msg=TwReadMsg(TRUE))) {
	if (Msg->Type==TW_MSG_WIDGET_GADGET) {
	    EventG=&Msg->Event.EventGadget;
	    if (EventG->W == Dialog_Win) switch (EventG->Code) {
	      case 0:
		return 1;
	      default:
		return EventG->Code - 1;
	    }
	}
    }
    if ((err = TwErrno))
	fprintf(stderr, "%s: libTw error: %s%s\n", argv[0],
		TwStrError(err), TwStrErrorDetail(err, TwErrnoDetail));

    if (!TwInPanic())
	TwClose();
    return 255;
}
开发者ID:Mirppc,项目名称:twin,代码行数:27,代码来源:dialog.c

示例6: UNREFERENCED_PARAMETER

LRESULT CAboutDlg::DlgFunc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    UNREFERENCED_PARAMETER(lParam);
    switch (uMsg)
    {
    case WM_INITDIALOG:
        {
            InitDialog(hwndDlg, IDI_TORTOISEIDIFF);
            // initialize the controls
            m_link.ConvertStaticToHyperlink(hwndDlg, IDC_WEBLINK, L"http://tortoisesvn.net");
            TCHAR verbuf[1024] = {0};
            TCHAR maskbuf[1024] = {0};
            if (!::LoadString (hResource, IDS_VERSION, maskbuf, _countof(maskbuf)))
            {
                SecureZeroMemory(maskbuf, sizeof(maskbuf));
            }
            swprintf_s(verbuf, maskbuf, TSVN_VERMAJOR, TSVN_VERMINOR, TSVN_VERMICRO, TSVN_VERBUILD);
            SetDlgItemText(hwndDlg, IDC_ABOUTVERSION, verbuf);
        }
        return TRUE;
    case WM_COMMAND:
        return DoCommand(LOWORD(wParam));
    default:
        return FALSE;
    }
}
开发者ID:TortoiseGit,项目名称:tortoisesvn,代码行数:26,代码来源:AboutDlg.cpp

示例7: InitDialog

bool wxDialog::Show(bool show)
{
    if ( !wxDialogBase::Show(show) )
    {
        // nothing to do
        return FALSE;
    }

    if ( show )
    {
        // usually will result in TransferDataToWindow() being called
        InitDialog();
    }

    if ( IsModal() )
    {
        if ( show )
        {
            DoShowModal();
        }
        else // end of modal dialog
        {
            // this will cause IsModalShowing() return FALSE and our local
            // message loop will terminate
            wxModalDialogs.DeleteObject(this);
        }
    }

    return TRUE;
}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:30,代码来源:dialog.cpp

示例8: Tokenize

		GUITextEntryDialog::GUITextEntryDialog(const char* prompt, const char* windowCaption, const char* buttonCaption)
		{
			windowCaption_ 	= windowCaption;
			buttonCaption_	= buttonCaption;

			std::string promptStr = prompt;
			std::vector<std::string> lines = Tokenize(promptStr, "\n");
			unsigned int lineCount = lines.size();
			if (lineCount < 4)
			{
				for (unsigned int index = 0; index < lineCount; index++)
				{
					prompts_.push_back(lines.at(index).c_str());
				}
				while(prompts_.size() < 4) { prompts_.push_back(""); }
			}
			else
			{
				lineCount = (lineCount > 4) ? 4 : lineCount;
				for (unsigned int index = 0; index < lineCount; index++)
				{
					prompts_.push_back(lines.at(index).c_str());
				}
			}

			InitDialog();
		}
开发者ID:RichardMarks,项目名称:48h2009MiniRPGJamEntry,代码行数:27,代码来源:GUITextEntryDialog.cpp

示例9: SetupDlgFunc

BOOL CALLBACK SetupDlgFunc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	switch (uMsg) {
	case WM_INITDIALOG:
		return InitDialog(hWnd);

	case WM_NOTIFY:
		OnNotify(hWnd, wParam, lParam);
		break;

	case WM_COMMAND:
		switch (LOWORD(wParam))	{
		case IDOK:
			OnSetupOK(hWnd);
			EndDialog(hWnd, IDOK);
			break;

		case IDCANCEL:
			EndDialog(hWnd, IDCANCEL);
			break;

		case IDC_PROPERTY: // プロパティ
			OnProperty(hWnd);
			break;
		}
	}
	return false;
}
开发者ID:sunaoka,项目名称:bkwhitelist,代码行数:28,代码来源:SetupDlg.cpp

示例10: InitDialog

bool ArmDialog::Initialize(dxKeyboard *_keyBoard, ArmGuiData* _armGuiData,
						   ArmConnector* _armConnector,ArmConfig* _armConfig,Calibrate* _calibrate,
						   Surf *_surf,CameraManager *_cameraMan,Stereo *_stereo,Cube* _cube,Mesh *_mesh)
{
	keyboard = _keyBoard;
	armDlgData = _armGuiData;
	armConnector = _armConnector;
	armConfig = _armConfig;
	stereo = _stereo;
	calibrate = _calibrate;
	cube = _cube;
	mesh = _mesh;


	targetX=0;targetY=0;targetZ=0;

	surf = _surf;
	cameraMan = _cameraMan;
	InitDialog();

	if(FAILED(keyboard->OnCreateDevice( m_hDlg )))
	{
		MessageBox( NULL, _T("Failed To Initialize keyboard."), _T("ERROR"), MB_OK | MB_ICONEXCLAMATION );
		return false;
	}

	glApp.m_hWnd = GetDlgItem( m_hDlg, IDC_Render_Pic );
	if ( !glApp.CreateGLWindow( GetModuleHandle(NULL), 0, 0, 0, 0 ) )
	{
		MessageBox( NULL, _T("Failed To Create GL Windows."), _T("ERROR"), MB_OK | MB_ICONEXCLAMATION );
		return FALSE;										// Quit If Window Was Not Created
	}

	camera.SetUpAxis(ModelViewerCamera::UPAXIS_Z);
	camera.m_fAngleY = G_PI;
	camera.m_fAngleX = G_PI/8;
	camera.CalPosition();
//	originCamera = camera;


	
	
	ResetDialog();

	armDlgData->isScanning	= false;
	armDlgData->hasObj		= false;
	armDlgData->noObj		= false;
	armDlgData->unknownObj	= false;

	positionPath	= fopen("img/savepos/path.txt","w");
	walkPath		= fopen("img/savepos/path2.txt","r");

	numsave			= 0;


	return true;
}
开发者ID:mabaw,项目名称:3DRobotArm,代码行数:57,代码来源:ArmDialog.cpp

示例11: InitDialog

void COptionsSubtitlesTime::OnButtonDefault() 
{
	bSubtitlesLoaded = defConfig.bSubtitlesLoaded;
	bSubtitlesOffsetTime = defConfig.bSubtitlesOffsetTime;
	valSubtitlesOffsetTime = defConfig.valSubtitlesOffsetTime;

	InitDialog();
	m_BApply.EnableWindow();
}
开发者ID:adamjoniec,项目名称:theimp,代码行数:9,代码来源:OptionsSubtitlesTime.cpp

示例12: ConfigManagerBaseDlg

ConfigurationManagerDlg::ConfigurationManagerDlg( wxWindow* parent )
		: ConfigManagerBaseDlg( parent )
		, m_dirty(false)
{
	PopulateConfigurations();
	InitDialog();
	
	WindowAttrManager::Load(this, wxT("ConfigurationManagerDlg"), NULL);
}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:9,代码来源:configuration_manager_dlg.cpp

示例13: InitLanguage

BOOL COptionsSubtitlesTime::OnInitDialog() 
{
	CDialog::OnInitDialog();

	InitLanguage();
	InitDialog();
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:adamjoniec,项目名称:theimp,代码行数:10,代码来源:OptionsSubtitlesTime.cpp

示例14: PHPLintBaseDlg

PHPLintDlg::PHPLintDlg(wxWindow* parent)
    : PHPLintBaseDlg(parent)
{
    // center the dialog
    Centre();

    InitDialog();

    SetName("PHPLintDlg");
    WindowAttrManager::Load(this);
}
开发者ID:eranif,项目名称:codelite,代码行数:11,代码来源:phplintdlg.cpp

示例15: StartInSearch

void CSearchResultView::GetTextSearch(const TDesC& aText)
{
	if(aText.Length()>0)
	{
		StartInSearch(aText);
	}
	else
	{
		InitDialog(iMainEngine.GetDesById(ETurkeyTextRes_InputNull),ESRDialogShowInfo);
	}
}
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:11,代码来源:SearchResultView.cpp


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