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

Hybrid View

  1. #1
    Join Date
    Mar 2007
    Posts
    238

    draw method of activex

    HI Gurus,
    Is it possible to attach a dialog class in the draw method of activx ctrl class?
    Code:
    void CRotaryCtrl::OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)
    
    pdc->......//(attach an cdialog subclass)
    thanks

  2. #2
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: draw method of activex

    Please elaborate on "attach". It can mean different things, so it's good to hear from you instead of guessing

  3. #3
    Join Date
    Mar 2007
    Posts
    238

    Re: draw method of activex

    By attach i mean, i have a dialog class which I created in the activex project which has combobox, edit box etc.
    I want to display this dialog box in the activex control draw method.
    Is it possible?

  4. #4
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: draw method of activex

    It is possible, but not the right approach. Draw is for drawing , not for creating dialog box.

  5. #5
    Join Date
    Apr 1999
    Posts
    3,585

    Re: draw method of activex

    Is this what you're trying to do?
    Gort...Klaatu, Barada Nikto!

  6. #6
    Join Date
    Mar 2007
    Posts
    238

    Re: draw method of activex

    Exactly Mike, that's what i am trying to do.
    But when i do exactly what the article says i get error :winocc.cpp line 307. Basically it doesn't like the movewindow method. I tested the control using visual studio activex test control container. Tried with IE as the article says same error message.

    Any suggestion?
    Last edited by tarunk; February 15th, 2008 at 05:58 AM. Reason: adding

  7. #7
    Join Date
    Apr 2013
    Posts
    5

    Re: draw method of activex

    Hi,

    I'm trying to do the same thing demonstrated by the article:

    Quote Originally Posted by Mike Harnad View Post
    Is this what you're trying to do?
    But keep getting errors, i'm using vs2010, my project is identical as the one posted here, did you guys figured out what was the problem?

    Thanks in Advance!

  8. #8
    Join Date
    Apr 2013
    Posts
    5

    Re: draw method of activex

    Well, if you're saying.

    I'm shallow at mfc development, just posting what works out for my problem.

    But anyway thanks for the correction! i'll try not to misguide people (unwittingly) again, haha.

    Thanks for the post link, this will surely help me with other issues.

    Cheers!

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