Commit 1d9e48c7 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

oledlg: Handle paste / link mode change.

parent aa9fdd06
......@@ -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))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment