Here is the issue:
I remove the viewer control from the dialog template and put a static frame control in its place. I then dynamically create the control calling the create function and place it on the dialog in the same position as the frame. The control appears fine, except I do not get any events in my derived class like I did with the control on the dialog template. I can not figure out what is the problem.
The reason I need to dynamically create the control because I want to place the viewer in a splitter window with a Clistctrl with thumbs next to it. I was having all kinds of issues so I went back the the simple example code to see it was having issues too... If this control is too buggy, I may not be able to use it as a replacement for our legacy control. I am in the evaluation phase right now and all the features is promising if I can just get it to work with some stability...
// Snippet from my derived class:
- Code: Select all
class CGDViewerCtrl : public C_GdViewer
....
void CGDViewerCtrl::OnSize(UINT nType, int cx, int cy)
{
C_GdViewer::OnSize(nType, cx, cy);
TRACE("CGDViewerCtrl::OnSize()... \n");
}
void CGDViewerCtrl::OnLButtonDown(UINT nFlags, CPoint point)
{
TRACE("CGDViewerCtrl::OnLButtonDown()... \n");
C_GdViewer::OnLButtonDown(nFlags, point);
}
void CGDViewerCtrl::OnLButtonUp(UINT nFlags, CPoint point)
{
TRACE("CGDViewerCtrl::OnLButtonUp()... \n");
C_GdViewer::OnLButtonUp(nFlags, point);
}
// your sample project:
CSampleDlg::OnInitDialog()
.....
CRect rect;
m_Frame.GetWindowRect(&rect);
m_Frame.ShowWindow(SW_HIDE);
ScreenToClient(&rect);
m_viewer.Create(NULL, WS_VISIBLE | WS_TABSTOP, rect, (CWnd*)this, 500);
//Please, replace XXXX by a valid demo or commercial license key.
m_viewer.SetLicenseNumber("00*******************************00");
return TRUE; // return TRUE unless you set the focus to a control
}
If the control gets placed on the dialog template, it gets the TRACE messages with the window events. If I dynamically create the control, as shown above, I get no TRACE messages?? (FYI, I did remove the DDX_Control references)
Can you help me?
2nd, separate issue:
I had to use the GdPicturePro5S.Imaging wrappers, cause the one without the 'S' was giving me parameters errors. Not sure if this is a bug... I was under the assumption to use the non 'S' for windows applications, but they don't work.
I am using the latest Version, GdPicture Pro Imaging SDK Ver. 5.11.17 (08 July 2009)
Thanks,
-Paul
