example use GLG control in Dialogbox

56 views
Skip to first unread message

yudi...@gmail.com

unread,
Jan 14, 2015, 2:12:31 PM1/14/15
to glg...@googlegroups.com
Hi:
Have any example to use GLG control on MFC Dialog Box?

Thanks
Lu

glg_devel

unread,
Jan 15, 2015, 1:56:15 PM1/15/15
to glg...@googlegroups.com
Hello Lu,

There are GLG MFC examples for the SDI MFC architecture, but unfortunately, there are no examples for the Dialog based MFC application.  In the existing MFC SDI examples, GLG custom control is added as a child of the CView class.

We can suggest 2 options for using GLG in a Dialog based MFC application:

a) use GLG ActiveX control, as opposed to the GLG MFC custom control;
examples of the GLG ActiveX control usage may be found in the directory examples_csharp.NET;

b) add GLG MFC custom control as a child of the MFC dialog object, using the same technique as demonstrated in the GLG MFC examples, where GLG control is added as a child of the CView class.

Using option a), GLG ActiveX control can be added in the MFC Design mode;
using option b), GLG custom  control is added programmatically.

Hope this helps.
Kind regards,
GLG Support Team

yudi...@gmail.com

unread,
Jan 23, 2015, 2:53:13 PM1/23/15
to glg...@googlegroups.com
Hi

I had try CView and it work. But not CFormView?

I don't know why?

Thanks
Lu

glg_devel

unread,
Jan 28, 2015, 5:15:29 PM1/28/15
to glg...@googlegroups.com
GLG control can be used in the CFormView just like in the CView.
GLG drawing (.g file) should be present in the directory where .exe resides,
and the code should be added to CFormViewOnSize() to define the control's
size.
Reply all
Reply to author
Forward
0 new messages