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


C++ DialogBoxParamW函数代码示例

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


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

示例1: InternetErrorDlg

/***********************************************************************
 *         InternetErrorDlg
 */
DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest,
                 DWORD dwError, DWORD dwFlags, LPVOID* lppvData)
{
    struct WININET_ErrorDlgParams params;
    INT dwStatus;

    TRACE("%p %p %d %08x %p\n", hWnd, hRequest, dwError, dwFlags, lppvData);

    if( !hWnd && !(dwFlags & FLAGS_ERROR_UI_FLAGS_NO_UI) )
        return ERROR_INVALID_HANDLE;

    params.hWnd = hWnd;
    params.hRequest = hRequest;
    params.dwError = dwError;
    params.dwFlags = dwFlags;
    params.lppvData = lppvData;

    switch( dwError )
    {
    case ERROR_SUCCESS:
    case ERROR_INTERNET_INCORRECT_PASSWORD:
        if( !dwError && !(dwFlags & FLAGS_ERROR_UI_FILTER_FOR_ERRORS ) )
            return 0;

        dwStatus = WININET_GetConnectionStatus( hRequest );
        switch (dwStatus)
        {
        case HTTP_STATUS_PROXY_AUTH_REQ:
            return DialogBoxParamW( WININET_hModule, MAKEINTRESOURCEW( IDD_PROXYDLG ),
                                    hWnd, WININET_ProxyPasswordDialog, (LPARAM) &params );
        case HTTP_STATUS_DENIED:
            return DialogBoxParamW( WININET_hModule, MAKEINTRESOURCEW( IDD_AUTHDLG ),
                                    hWnd, WININET_PasswordDialog, (LPARAM) &params );
        default:
            WARN("unhandled status %u\n", dwStatus);
            return 0;
        }
    case ERROR_INTERNET_SEC_CERT_ERRORS:
    case ERROR_INTERNET_SEC_CERT_CN_INVALID:
    case ERROR_INTERNET_SEC_CERT_DATE_INVALID:
    case ERROR_INTERNET_INVALID_CA:
        if( dwFlags & FLAGS_ERROR_UI_FLAGS_NO_UI )
            return ERROR_CANCELLED;

        if( dwFlags & ~FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS )
            FIXME("%08x contains unsupported flags.\n", dwFlags);

        return DialogBoxParamW( WININET_hModule, MAKEINTRESOURCEW( IDD_INVCERTDLG ),
                                hWnd, WININET_InvalidCertificateDialog, (LPARAM) &params );
    case ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR:
    case ERROR_INTERNET_POST_IS_NON_SECURE:
        FIXME("Need to display dialog for error %d\n", dwError);
        return ERROR_SUCCESS;
    }

    return ERROR_NOT_SUPPORTED;
}
开发者ID:Sunmonds,项目名称:wine,代码行数:60,代码来源:dialogs.c

示例2: acmFormatChooseW

/***********************************************************************
 *           acmFormatChooseW ([email protected])
 */
MMRESULT WINAPI acmFormatChooseW(PACMFORMATCHOOSEW pafmtc)
{
    if (pafmtc->fdwStyle & ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE)
        return DialogBoxIndirectParamW(MSACM_hInstance32, (LPCDLGTEMPLATEW)pafmtc->hInstance,
                                       pafmtc->hwndOwner, FormatChooseDlgProc, (LPARAM)pafmtc);

    if (pafmtc->fdwStyle & ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE)
        return DialogBoxParamW(pafmtc->hInstance, pafmtc->pszTemplateName,
                               pafmtc->hwndOwner, FormatChooseDlgProc, (LPARAM)pafmtc);

    return DialogBoxParamW(MSACM_hInstance32, MAKEINTRESOURCEW(DLG_ACMFORMATCHOOSE_ID),
                           pafmtc->hwndOwner, FormatChooseDlgProc, (LPARAM)pafmtc);
}
开发者ID:Strongc,项目名称:reactos,代码行数:16,代码来源:format.c

示例3: TestBoard

static void TestBoard( HWND hWnd, BOARD *p_board, int x, int y, int msg )
{
    POINT pt;
    unsigned col,row;

    pt.x = x;
    pt.y = y;

    if( PtInRect( &p_board->mines_rect, pt ) && p_board->status != GAMEOVER
    && p_board->status != WON )
        TestMines( p_board, pt, msg );
    else {
        UnpressBoxes( p_board,
            p_board->press.x,
            p_board->press.y );
        p_board->press.x = 0;
        p_board->press.y = 0;
    }

    if( p_board->boxes_left == 0 && p_board->status != WON ) {
        p_board->status = WON;

        if (p_board->num_flags < p_board->mines) {
            for( row = 1; row <= p_board->rows; row++ ) {
                for( col = 1; col <= p_board->cols; col++ ) {
                    if (p_board->box[col][row].IsMine && p_board->box[col][row].FlagType != FLAG)
                        p_board->box[col][row].FlagType = FLAG;
                }
            }

            p_board->num_flags = p_board->mines;

            RedrawWindow( p_board->hWnd, NULL, 0,
                RDW_INVALIDATE | RDW_UPDATENOW );
        }

        if( p_board->difficulty != CUSTOM &&
                    p_board->time < p_board->best_time[p_board->difficulty] ) {
            p_board->best_time[p_board->difficulty] = p_board->time;

            DialogBoxParamW( p_board->hInst, MAKEINTRESOURCEW(DLG_CONGRATS), hWnd,
                             CongratsDlgProc, (LPARAM) p_board);
            SaveBoard( p_board );
            DialogBoxParamW( p_board->hInst, MAKEINTRESOURCEW(DLG_TIMES), hWnd,
                             TimesDlgProc, (LPARAM) p_board);
        }
    }
    TestFace( p_board, pt, msg );
}
开发者ID:AndreRH,项目名称:wine,代码行数:49,代码来源:main.c

示例4: WlxDialogBoxParam

/*
 * @implemented
 */
int
WINAPI
WlxDialogBoxParam(
    HANDLE hWlx,
    HANDLE hInst,
    LPWSTR lpszTemplate,
    HWND hwndOwner,
    DLGPROC dlgprc,
    LPARAM dwInitParam)
{
    PDIALOG_LIST_ENTRY ListEntry;
    int ret;

    UNREFERENCED_PARAMETER(hWlx);

    TRACE("WlxDialogBoxParam()\n");

    ListEntry = AddDialogListEntry();
    if (ListEntry == NULL)
        return -1;

    ListEntry->DlgProc = dlgprc;
    ListEntry->lParam = dwInitParam;

    ret = (int)DialogBoxParamW(hInst, lpszTemplate, hwndOwner, DefaultWlxWindowProc, (LPARAM)ListEntry);

    RemoveDialogListEntry(ListEntry);

    return ret;
}
开发者ID:amaneureka,项目名称:reactos,代码行数:33,代码来源:wlx.c

示例5: drvCommConfigDialogW

/***********************************************************************
 * drvCommConfigDialogW ([email protected])
 *
 * Show a dialog for configuring a Serial Port.
 *
 */
DWORD WINAPI drvCommConfigDialogW(LPCWSTR lpszName, HWND hWndParent, LPCOMMCONFIG lpCommConfig)
{
    SERIALUI_DialogInfo info;
    INT res;

    info.lpCommConfig  = lpCommConfig;
    info.lpszDevice    = lpszName;
    info.bConvert      = FALSE;
    info.dwFlowControl = 0;

    if ((!lpCommConfig) || (!lpszName))
        return ERROR_INVALID_PARAMETER;

    if (lpCommConfig->dwSize < sizeof(COMMCONFIG))
        return ERROR_INSUFFICIENT_BUFFER;

    if (!lpszName[0])
        return ERROR_BADKEY;

    res = DialogBoxParamW( SERIALUI_hModule,
                           MAKEINTRESOURCEW(IDD_SERIALUICONFIG),
                           hWndParent,
                           SERIALUI_ConfigDialogProc,
                           (LPARAM)&info);

    return (res == -1) ? GetLastError() : res ;
}
开发者ID:MichaelMcDonnell,项目名称:wine,代码行数:33,代码来源:confdlg.c

示例6: SHBrowseForFolderW

/*************************************************************************
 * SHBrowseForFolderW [[email protected]]
 *
 * NOTES
 *  crashes when passed a null pointer
 */
LPITEMIDLIST WINAPI SHBrowseForFolderW (LPBROWSEINFOW lpbi)
{
    browse_info info;
    DWORD r;
    HRESULT hr;
    const WCHAR * templateName;
    INITCOMMONCONTROLSEX icex;

    info.hWnd = 0;
    info.pidlRet = NULL;
    info.lpBrowseInfo = lpbi;
    info.hwndTreeView = NULL;

    icex.dwSize = sizeof( icex );
    icex.dwICC = ICC_TREEVIEW_CLASSES;
    InitCommonControlsEx( &icex );

    hr = OleInitialize(NULL);

    if (lpbi->ulFlags & BIF_NEWDIALOGSTYLE)
        templateName = swNewBrowseTemplateName;
    else
        templateName = swBrowseTemplateName;
    r = DialogBoxParamW( shell32_hInstance, templateName, lpbi->hwndOwner,
	                 BrsFolderDlgProc, (LPARAM)&info );
    if (SUCCEEDED(hr)) 
        OleUninitialize();
    if (!r)
    {
        ILFree(info.pidlRet);
        return NULL;
    }

    return info.pidlRet;
}
开发者ID:DusteDdk,项目名称:wine-multimedia,代码行数:41,代码来源:brsfolder.c

示例7: PickIconDlg

BOOL WINAPI PickIconDlg(
    HWND hwndOwner,
    LPWSTR lpstrFile,
    UINT nMaxFile,
    INT* lpdwIconIndex)
{
    HMODULE hLibrary;
    int res;
    PICK_ICON_CONTEXT IconContext;

    hLibrary = LoadLibraryExW(lpstrFile, NULL, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE);
    IconContext.hLibrary = hLibrary;
    IconContext.Index = *lpdwIconIndex;
    wcscpy(IconContext.szName, lpstrFile);

    res = DialogBoxParamW(shell32_hInstance, MAKEINTRESOURCEW(IDD_PICK_ICON), hwndOwner, PickIconProc, (LPARAM)&IconContext);
    if (res)
    {
        wcscpy(lpstrFile, IconContext.szName);
        *lpdwIconIndex = IconContext.Index;
    }

    FreeLibrary(hLibrary);
    return res;
}
开发者ID:RareHare,项目名称:reactos,代码行数:25,代码来源:dialogs.cpp

示例8: DialogBoxParamW

/**
 * Display the modal dialog.
 * @param hinst The app instance handle.
 * @param parent The parent window handle.
 * @return @c true.
 */
bool AboutDialog::ShowModal(HINSTANCE hinst, HWND parent)
{
	DialogBoxParamW(hinst, MAKEINTRESOURCEW(IDD_ABOUT),
		parent, DlgFunc, reinterpret_cast<LPARAM>(this));

	return true;
}
开发者ID:espes,项目名称:hoverrace,代码行数:13,代码来源:AboutDialog.cpp

示例9: EstEID_log

char *promptForPIN(void *nativeWindowHandle, const char *name, const char *message, unsigned int minPin2Length, int usePinPad) {	
	char *pin2;
	DialogData dialogData;
	INT_PTR result;

	LOG_LOCATION;
	dialogData.pin2[0] = '\0';
	dialogData.name = name;
	dialogData.message = message;
	dialogData.minPin2Length = minPin2Length;

	if(!usePinPad){
		EstEID_log("launching PIN2 dialog, browser window handle passed to PIN2 DialogBoxParam() = %08X", (HWND)nativeWindowHandle);		
		result = DialogBoxParam(pluginInstance, MAKEINTRESOURCEW(IDD_PIN_DIALOG), (HWND)nativeWindowHandle, Pin2DialogProc, (LPARAM)&dialogData);
		EstEID_log("PIN2 dialog ended");

		if (result == IDOK) {
			pin2 = strdup(CW2A(dialogData.pin2));
			memset(dialogData.pin2, '\0', PIN2_MAX_LEN + 2);
			EstEID_log("promptForPIN\t got pin");
		}
		else {
			pin2 = strdup("");
			EstEID_log("promptForPIN\t user canceled");
		}
	}
	else {
		DialogBoxParamW(pluginInstance, MAKEINTRESOURCEW(IDD_PINPAD_DIALOG), (HWND)nativeWindowHandle, PinPadDialogProc, (LPARAM)&dialogData);
		pin2 = strdup("");
	}
	
	return pin2;
}
开发者ID:Krabi,项目名称:idkaart_public,代码行数:33,代码来源:dialogs-win.c

示例10: UT_ASSERT

void XAP_Win32DialogBase::createModal(XAP_Frame* pFrame, LPCWSTR dlgTemplate)
{
	UT_ASSERT(m_tag == magic_tag);

	XAP_App* pApp = XAP_App::getApp();
	UT_ASSERT(pApp);

	XAP_Win32App* pWin32App = static_cast<XAP_Win32App*>(pApp);

	XAP_FrameImpl* pFrameImpl = pFrame->getFrameImpl();

	UT_ASSERT(pFrame);

	XAP_Win32FrameImpl* pWin32FrameImpl = static_cast<XAP_Win32FrameImpl*>(pFrameImpl);

	HWND hFrameWnd = pWin32FrameImpl->getTopLevelWindow();

	// raise the dialog
	int result = DialogBoxParamW(pWin32App->getInstance(),
						dlgTemplate,
						hFrameWnd,
						(DLGPROC)&XAP_Win32DialogBase::s_dlgProc,
						(LPARAM)this);
	// since we can't really know what to do in case of failure, we really
	// *should* return the error-code from this function I think.
	UT_ASSERT(result != -1);
}
开发者ID:monkeyiq,项目名称:odf-2011-track-changes-git-svn,代码行数:27,代码来源:xap_Win32DialogBase.cpp

示例11: SHBrowseForFolderW

/*************************************************************************
 * SHBrowseForFolderW [[email protected]]
 *
 * NOTES
 *  crashes when passed a null pointer
 */
LPITEMIDLIST WINAPI SHBrowseForFolderW (LPBROWSEINFOW lpbi)
{
    browse_info info;
    DWORD r;
    HRESULT hr;
    const WCHAR * templateName;

    info.hWnd = 0;
    info.pidlRet = NULL;
    info.lpBrowseInfo = lpbi;
    info.hwndTreeView = NULL;

    hr = OleInitialize(NULL);

    if (lpbi->ulFlags & BIF_NEWDIALOGSTYLE)
        templateName = swNewBrowseTemplateName;
    else
        templateName = swBrowseTemplateName;
    r = DialogBoxParamW( shell32_hInstance, templateName, lpbi->hwndOwner,
	                 BrsFolderDlgProc, (LPARAM)&info );
    if (SUCCEEDED(hr))
        OleUninitialize();
    if (!r)
        return NULL;

    return info.pidlRet;
}
开发者ID:HBelusca,项目名称:NasuTek-Odyssey,代码行数:33,代码来源:brsfolder.c

示例12: SplashScreenThreadProc

DWORD WINAPI SplashScreenThreadProc(LPVOID notused) 
{
  DialogBoxParamW( GetModuleHandle( 0 ),
                   MAKEINTRESOURCE( IDD_SPLASHSCREEN ),
                   HWND_DESKTOP,
                   (DLGPROC)SplashScreenDialogProc,
                   NULL );
  return 0;
}
开发者ID:diversys,项目名称:bezilla,代码行数:9,代码来源:SplashScreen.cpp

示例13: __DialogBoxParamW

INT_PTR WINAPI __DialogBoxParamW(HINSTANCE hInstance, LPCWSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam) {
	if (g_bOutput) {
		if (lpTemplateName == MAKEINTRESOURCEW(IDD_SERVER_SETUP)) {
			GetServerName((char*)dwInitParam);
			return TRUE;
		}
	}
	return DialogBoxParamW(hInstance, lpTemplateName, hWndParent, lpDialogFunc, dwInitParam);
}
开发者ID:KGE-INC,项目名称:vdubauo,代码行数:9,代码来源:fake.cpp

示例14: return

BOOL
CAboutDlg::ShowDialog(HWND hParent)
{
    return (DialogBoxParamW(g_hInstance,
                            MAKEINTRESOURCEW(IDD_ABOUTBOX),
                            hParent,
                            AboutWndProc,
                            (LPARAM)this) > 0);
}
开发者ID:wyrover,项目名称:development,代码行数:9,代码来源:AboutDlg.cpp

示例15: class

void AP_Win32Dialog_Paragraph::runModal(XAP_Frame * pFrame)
{
	/*
	  This dialog is non-persistent.

	  This dialog should do the following:

	  - Construct itself to represent the paragraph properties
	    in the base class (AP_Dialog_Paragraph).

		The Unix one looks just like Microsoft Word 97's Paragraph
		dialog.

	  - The base class stores all the paragraph parameters in
	    m_paragraphData.

	  On "OK" (or during user-interaction) the dialog should:

	  - Save all the data to the m_paragraphData struct so it
	    can be queried by the caller (edit methods routines).

	  On "Cancel" the dialog should:

	  - Just quit, the data items will be ignored by the caller.

	  On "Tabs..." the dialog should (?):

	  - Just quit, discarding changed data, and let the caller (edit methods)
	    invoke the Tabs dialog.

	*/

	// store frame for later use
	m_pFrame = pFrame;

	// raise the dialog
	XAP_Win32App * pWin32App = static_cast<XAP_Win32App *>(m_pApp);

	XAP_Win32LabelledSeparator_RegisterClass(pWin32App);	

//	createModal(pFrame, MAKEINTRESOURCEW(AP_RID_DIALOG_PARAGRAPH));

	LPCWSTR lpTemplate = NULL;

	UT_ASSERT(m_id == AP_DIALOG_ID_PARAGRAPH);

	lpTemplate = MAKEINTRESOURCEW(AP_RID_DIALOG_PARAGRAPH);

	XAP_Win32FrameImpl* pWin32FrameImpl = static_cast<XAP_Win32FrameImpl*>(pFrame->getFrameImpl());

	HWND hFrameWnd = pWin32FrameImpl->getTopLevelWindow();

	int result = DialogBoxParamW(pWin32App->getInstance(),lpTemplate,
								hFrameWnd,
								(DLGPROC)s_dlgProc,(LPARAM)this);
	UT_ASSERT((result != -1));
}
开发者ID:lokeshguddu,项目名称:AbiWord,代码行数:57,代码来源:ap_Win32Dialog_Paragraph.cpp


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