views:

82

answers:

0

Hi All I am displaying acrobat reader 5.0 active x control in windows form. I inherited my form class with IMessageFilter and implement the PreFilterMessage function as given below.

if (m.Msg == 513)//left button click { int mouseY = HiWord(m.LParam.ToInt32()); int mouseX = LoWord(m.LParam.ToInt32());

// where axAcroPDF1 is pdf control //if handle is for acrobat active x control if (axAcroPDF1.Handle == m.HWnd) { MessageBox.Show("yes"); //check mouse coordinates within required area return true; } }

Somehow Left button click is not working when active x control displays the pdf while if control is not displaying pdf i.e initial visible stage of control then I am able to receive expected behavior.

Actually I don't want user to interact with left side panel of acrobat reader's panel. But unfortunately I am not able to find any property. So I decided to use mouse message filter such that the panel area will not be accessible.