CDHtmlDialog - Programmer

This is a discussion on CDHtmlDialog - Programmer ; Hi! I came across quite interesting problem and I need someone to take a look at it and tries to find best solution. So about the problem ... I am using CDHtmlDialog for user interface which was working just fine ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: CDHtmlDialog

  1. CDHtmlDialog

    Hi!

    I came across quite interesting problem and I need someone to take a look at
    it and tries to find best solution. So about the problem ...

    I am using CDHtmlDialog for user interface which was working just fine for
    me, till now. But then I wanted to show something more complex, like runtime
    created bitmap. How can I show it in html when I'm having just handle of
    bitmap.

    I tried next things:
    1. Save bitmap to a file and then load it and show it from html. It works
    fine, but this is what I want to avoid - storing to disk.

    2. I created activex control with method which takes handle to bitmap as a
    paramether. It would probably work just fine, but that IE popup dialog (Do
    you really want to execute object ... or something) keeps appearing, which
    is also not good enough. It would be great if I would know how to remove
    this popup message.

    3. I also tried to use OnPaint method of CDHtmlDialog but it seems that Html
    control is drawn after OnPaint is called. This would probably be best
    solution if I would know how to draw after CDHtmlDialog is being drawn.

    4. Fourth possibility that came to my mind and I haven't tried it yet,
    because I don;t know how to do it, is to store the bitmap in resources (in
    runtime) and then load it from there with html file. Or maybe not to
    resources - to anything else (memory would be the best solution), but I
    don't know if there is a protocol to load image from memory in html.

    Anyone who can solve any solution from 2 to 4 is more than welcome.

    Thanks in advance

    Zombi



  2. Re: CDHtmlDialog

    2 you need to implement IObjectSafety in your activex
    3 the client area of CDHtmlDialog is covered by a webbrowser control and not
    visible.
    4 you can query IPersistStream from IHTMLDocument2 and replace the content
    of the document...but sometimes IE6 failed to detect content type and
    display it in plain text.



    "Zombi" дʼ
    news:BqCYc.2027$F6.428594@news.siol.net...
    > Hi!
    >
    > I came across quite interesting problem and I need someone to take a look

    at
    > it and tries to find best solution. So about the problem ...
    >
    > I am using CDHtmlDialog for user interface which was working just fine for
    > me, till now. But then I wanted to show something more complex, like

    runtime
    > created bitmap. How can I show it in html when I'm having just handle of
    > bitmap.
    >
    > I tried next things:
    > 1. Save bitmap to a file and then load it and show it from html. It works
    > fine, but this is what I want to avoid - storing to disk.
    >
    > 2. I created activex control with method which takes handle to bitmap as a
    > paramether. It would probably work just fine, but that IE popup dialog (Do
    > you really want to execute object ... or something) keeps appearing, which
    > is also not good enough. It would be great if I would know how to remove
    > this popup message.
    >
    > 3. I also tried to use OnPaint method of CDHtmlDialog but it seems that

    Html
    > control is drawn after OnPaint is called. This would probably be best
    > solution if I would know how to draw after CDHtmlDialog is being drawn.
    >
    > 4. Fourth possibility that came to my mind and I haven't tried it yet,
    > because I don;t know how to do it, is to store the bitmap in resources (in
    > runtime) and then load it from there with html file. Or maybe not to
    > resources - to anything else (memory would be the best solution), but I
    > don't know if there is a protocol to load image from memory in html.
    >
    > Anyone who can solve any solution from 2 to 4 is more than welcome.
    >
    > Thanks in advance
    >
    > Zombi
    >
    >




+ Reply to Thread