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

Thread: Win32 API

  1. #1
    Join Date
    May 1999
    Location
    Mumbai, India
    Posts
    8

    Win32 API

    Dear Sir,

    I have a query regarding some Win32 API functionality in Visual Basic. I hope that you will help me solve this.

    I need to draw on the WANG Image Edit control supplied with Windows 95/NT using the Win32 API drawing functions like LineTo, Ellipse, Arc etc. Is it possible?

    I mean, I tried doing it by using the follwing code, but could not. Please guide me.
    How do I proceed?
    -------------------------------------------------------------------------------------

    Dim dc as Long, dummy as Long
    dc = GetDC(ImgEdit1.hwnd)
    dummy = Ellipse(dc, 10, 10, 300, 300)



    -------------------------------------------------------------------------------------

    Thanks & Regards.
    Sanjay.

    P.S.- If you are unable to solve my problem, can you please guide me to someone/some other forum which can.

    My requirement is extremely urgent. Please help me.





  2. #2
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: Win32 API

    Hi,

    Wang Image Edititing controls (ImgEdit & the rest) are different animals er.. OCXs
    and stright forward WinAPI like
    GetDC & Ellipse dont work on them, because they
    may not be using a single DC. there could be a set of cashed DCs to do actual image editing.
    Instead use their own image editing API fns like
    ImgEdit.AnnotationType = 4 ' Filled Rectangle
    ImgEdit.Draw ... etc

    Take a look at thier Annotation fns/APIs

    So much so, even VB's Picture box employs a cashed/memory DC to get max advantage.. and memory DC is same as actual DC only if AutoRedraw is false.

    Ravi


  3. #3
    Join Date
    May 2002
    Location
    san diego
    Posts
    6
    Hi Sanjay,
    Did you able to solve your problem..I am also facing the same problem now . Can you help me in this.
    sami

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