PDA

View Full Version : unmeant reaction on a mouse click inside the Smart Control



FS7
March 5, 2009, 17:01:47
Hello,

i enlarge the Smart Control to adjust it to the Framework in runtime.
Now i get a unmeant reaction on a mouse click inside the Smart Control:
The Smart Control Window get the size of initialisation->The size i drag and drop it in my dialog-resources.

For any idea i'm really glad!

FS7
March 6, 2009, 09:34:48
Hi,
i solve this in OnPaint...

void CLocalCamera::OnPaint()
{
CPropertyPage::OnPaint();

if(m_SCVideo){
CRect rcCtrl,rcWnd,rcBtn;
GetWindowRect(&rcWnd);
m_SCVideo.GetWindowRect(&rcCtrl);
m_btnScreenshot.GetWindowRect(&rcBtn);
CString str;
if(rcCtrl.Width() != rcWnd.Width() ||
rcCtrl.Height() != (rcWnd.Height()-rcBtn.Height()) ){
// Set position and size of SmartControl
SetSize(rcWnd.Width(),rcWnd.Height());
}
}


If anybody know an other/better solution, please let me know!

Marc Cymontkowski
July 10, 2009, 16:44:11
Hi,

Did you try IMVSCVideoWindow::ControlToVideo, which converts video coordinates to screen coordinates?


Best Regards,

Marc Cymontkowski

FS7
July 15, 2009, 16:28:02
Hi Marc,

many thanks for your reply.
I understand how this function works, but I don't understand how it could help me to solve my problem that I tried to explain in my first message.


Best Regards


Ps: When callling this function without the graph being started, I get an exception.