CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  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,641

    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
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    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
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

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

    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
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    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. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

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

    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,641

    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
  •  





Click Here to Expand Forum to Full Width

Featured