Using CDHtmlDialog
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Using CDHtmlDialog

Hybrid View

  1. #1
    Join Date
    Aug 2012
    Posts
    53

    Using CDHtmlDialog

    Hello,

    I am trying to use CDHtmlDialog in a MFC dialog based project.

    What i want to achieve is pretty sample. Have one image, one button and one text box in the HTML page.

    And then dynamically change this based on a timer. i.e., there're multiple images in the folder and it will change every seconds. Once the button is clicked, the timer stops and no more image changes. Same time when image changes the text in the text box also should change.

    I know this is pretty simple, but for some reason i am not able to make the image even display in the dialog.

    I am using Visual Studio 2012 in Windows 7 machine.

    Can somebody share some sample code that does this?

    I appreciate your help.

    Thanks in advance.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,392

  3. #3
    Join Date
    Aug 2012
    Posts
    53

    Re: Using CDHtmlDialog

    I have few specific questions :-)

    1. When i try to build the sample projects from web in the Visual Studio 2012, it gives the following error --> atlmfc\include\atlwinverapi.h(29): fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended.

    How to fix this?

    2. In the project i created, i am trying to load an image into the DHTML page and that doesn't work. How to load the image into the DHTML page? Also how to change the image in a DHTML page from the MFC code?

    2. How can i change the text in a DHTML page from the MFC code?

    Thanks in advance.

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,392

    Re: Using CDHtmlDialog

    Quote Originally Posted by Don Guy View Post
    I have few specific questions :-)

    1. When i try to build the sample projects from web in the Visual Studio 2012, it gives the following error --> atlmfc\include\atlwinverapi.h(29): fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended.

    How to fix this?

    2. In the project i created, i am trying to load an image into the DHTML page and that doesn't work. How to load the image into the DHTML page? Also how to change the image in a DHTML page from the MFC code?

    2. How can i change the text in a DHTML page from the MFC code?

    Thanks in advance.
    Add this line in the stdafx.h file:
    Code:
    #define _WIN32_WINNT  0x0501
    Victor Nijegorodov

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

    Re: Using CDHtmlDialog

    Quote Originally Posted by Don Guy View Post
    2. In the project i created, i am trying to load an image into the DHTML page and that doesn't work.
    How do you know it doesn't work when you're not able to build your project?

    How to load the image into the DHTML page?
    Do you have any knowledge in HTML programming? If you don't, you'd better start with getting into that first rather than doing CDHtmlDialog.

    Also how to change the image in a DHTML page from the MFC code?
    You get the element and set it up appropriately, I believe.

    2. How can i change the text in a DHTML page from the MFC code?
    Again, you get the element and set it up appropriately.
    Best regards,
    Igor

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