oledlg: Handle paste / link mode change.

This commit is contained in:
Huw Davies 2006-10-19 11:21:38 +01:00 committed by Alexandre Julliard
parent aa9fdd06e4
commit 1d9e48c77e
1 changed files with 28 additions and 0 deletions

View File

@ -362,6 +362,23 @@ static void selection_change(HWND hdlg, ps_struct_t *ps_struct)
update_result_text(hdlg, ps_struct);
}
static void mode_change(HWND hdlg, ps_struct_t *ps_struct, UINT id)
{
if(id == IDC_PS_PASTE)
{
ps_struct->flags &= ~PSF_SELECTPASTELINK;
ps_struct->flags |= PSF_SELECTPASTE;
}
else
{
ps_struct->flags &= ~PSF_SELECTPASTE;
ps_struct->flags |= PSF_SELECTPASTELINK;
}
update_display_list(hdlg, id == IDC_PS_PASTE ? IDC_PS_PASTELIST : IDC_PS_PASTELINKLIST);
selection_change(hdlg, ps_struct);
}
static void post_help_msg(HWND hdlg, ps_struct_t *ps_struct)
{
PostMessageW(ps_struct->ps->hWndOwner, oleui_msg_help, (WPARAM)hdlg, IDD_PASTESPECIAL);
@ -437,6 +454,17 @@ static INT_PTR CALLBACK ps_dlg_proc(HWND hdlg, UINT msg, WPARAM wp, LPARAM lp)
default:
return FALSE;
}
case IDC_PS_PASTE:
case IDC_PS_PASTELINK:
switch(HIWORD(wp))
{
case BN_CLICKED:
mode_change(hdlg, ps_struct, LOWORD(wp));
return FALSE;
default:
return FALSE;
}
case IDC_OLEUIHELP:
switch(HIWORD(wp))
{