Display CDialog app inside a web browser like IE
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Thread: Display CDialog app inside a web browser like IE

  1. #1
    Join Date
    Aug 2012
    Posts
    53

    Display CDialog app inside a web browser like IE

    Hello there,

    I am making a dialog app using CDHtmlDialog and all the controls are done using HTML.

    Now i want to call/display this dialog inside a web browser like IE.

    How can i do that?

    If i could generelaize this question -

    Is it possible to display a dialog app that is derived from CDialog inside IE?

    If possible, how to do that?

    Thanks in advance.

  2. #2
    Join Date
    Jun 2002
    Location
    Stockholm, Sweden
    Posts
    1,618

    Re: Display CDialog app inside a web browser like IE

    You compile your app into native code, right? If so, it cannot be allowed inside a browser through other means than an ActiveX control. Since any native code is a potentially severe security threat, the user would first have to install the ActiveX control.
    Nobody cares how it works as long as it works

  3. #3
    Join Date
    Aug 2012
    Posts
    53

    Re: Display CDialog app inside a web browser like IE

    So if i create a ActiveX project with dialogs in it, can i show that inside the web browser?

    Is there any sample project that you can guide me to?

    Thanks

  4. #4
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,051

    Re: Display CDialog app inside a web browser like IE

    1. In Visual Studio, choose File/New/Project... menu item or hit Ctrl+Shift+N keys. "New Project" dialog appears.
    2. Type a name for the project.
    3. Select Visual C++ and MFC from left pane tree, then double click on MFC ActiveX Control in the right pane list.
    4. The MFC ActiveX Control (good) Wizard wakes up to help you making an ActiveX control project.
    Ovidiu Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

  5. #5
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,024

    Re: Display CDialog app inside a web browser like IE

    Quote Originally Posted by Don Guy View Post
    So if i create a ActiveX project with dialogs in it, can i show that inside the web browser?
    Generally speaking, no.

    To let your activex be loaded your customer must allow the loading, like allowing activex in IE settings and handling the dialog you saw in your DHTML project. To avoid that annoying dialog popping up you have to register your activex as safe for loading and execution. To overcome some paranoid IE security settings some customers might have you have to have your activex digitally signed. To avoid misunderstandings with reliable deploying you may have to provide it be downloadable from web. A lot of interesting stuff waits for you on this road.
    Best regards,
    Igor

  6. #6
    Join Date
    Dec 2012
    Location
    England
    Posts
    2,556

    Re: Display CDialog app inside a web browser like IE

    Quote Originally Posted by Igor Vartanov View Post
    Generally speaking, no.

    To let your activex be loaded your customer must allow the loading, like allowing activex in IE settings and handling the dialog you saw in your DHTML project. To avoid that annoying dialog popping up you have to register your activex as safe for loading and execution. To overcome some paranoid IE security settings some customers might have you have to have your activex digitally signed. To avoid misunderstandings with reliable deploying you may have to provide it be downloadable from web. A lot of interesting stuff waits for you on this road.

    Especially if the customers don't use IE and instead use a browser like Firefox....
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  7. #7
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,363

    Re: Display CDialog app inside a web browser like IE

    To further complicate things, when users install your activex add-in, they would also need to install MFC unless you statically link to MFC in your control. Either way, it's a big download. If the activex component is for a limited group of users (like you're part of the IT group within a company), then it's not too big of a problem because you can control the environment. However, if your target consumer is the general public, you may want to rethink the whole MFC/ActiveX approach because most users will not install an ActiveX control.

  8. #8
    Join Date
    Jun 2002
    Location
    Stockholm, Sweden
    Posts
    1,618

    Re: Display CDialog app inside a web browser like IE

    I agree with Arjay. Tech-savvy users will not install your control because they know about the security risk, and the rest will not install it because it is something alien that makes them wary.

    You should only go down this path if it is meant for your own business employees, or possibly the employees of your customer.
    Nobody cares how it works as long as it works

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center