API Graphics Drawing


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: API Graphics Drawing

  1. #1
    Les F. Guest

    API Graphics Drawing

    Hello:
    I use some API calls to draw graphics
    on a MSFlexGrid cell. When I add text
    to that cell the graphics disappear. Is
    there a way to prevent that?

    Les F




  2. #2
    Michael Culley Guest

    Re: API Graphics Drawing

    Les,

    Most likely you could not actually stop it drawing. If you could find a way
    it would most likely be difficult and unreliable (someone will probably come
    up with an easy way to do it!)

    But instead of stopping it from drawing you could place your what you want
    to draw in a window on top of the flex grid. I'd use a frame control, set
    its border to none, place it were you like and draw on it with your api
    calls in the Frame_Paint event.

    Michael Culley
    www.vbdotcom.com

    "Les F." <zala_@hotmail.com> wrote in message
    news:3a83a3bd$1@news.devx.com...
    > Hello:
    > I use some API calls to draw graphics
    > on a MSFlexGrid cell. When I add text
    > to that cell the graphics disappear. Is
    > there a way to prevent that?
    >
    > Les F
    >
    >
    >




  3. #3
    Michael Culley Guest

    Re: API Graphics Drawing

    Les,

    I just checked and the frame does not have a paint event. You will need to
    subclass the frame. There is a subclass control on my site. Just add this
    code to the Form_Load

    mcSubclasser1.SubclassAddMessage WM_PAINT,Frame1.Hwnd
    mcSubclasser1.SubClassRunning (Frame1.HWnd)=True

    private Sub mcSubclasser1_WndProc (....)
    'Do painting here
    End Sub

    --
    Michael Culley
    www.vbdotcom.com


    "Michael Culley" <m_culley@one.net.au> wrote in message
    news:3a83b65f@news.devx.com...
    > Les,
    >
    > Most likely you could not actually stop it drawing. If you could find a

    way
    > it would most likely be difficult and unreliable (someone will probably

    come
    > up with an easy way to do it!)
    >
    > But instead of stopping it from drawing you could place your what you want
    > to draw in a window on top of the flex grid. I'd use a frame control, set
    > its border to none, place it were you like and draw on it with your api
    > calls in the Frame_Paint event.
    >
    > Michael Culley
    > www.vbdotcom.com
    >
    > "Les F." <zala_@hotmail.com> wrote in message
    > news:3a83a3bd$1@news.devx.com...
    > > Hello:
    > > I use some API calls to draw graphics
    > > on a MSFlexGrid cell. When I add text
    > > to that cell the graphics disappear. Is
    > > there a way to prevent that?
    > >
    > > Les F
    > >
    > >
    > >

    >
    >




  4. #4
    Les F. Guest

    Re: API Graphics Drawing

    Hi
    thanks for the reply
    Its not a bad idea except that what I am
    after is to retain the gaphic as the
    background of the cell with the text on
    top of it. I tried setting the cellpicture
    property to that of the graphic but it aligns
    3 pixels right and down in the cell (probably
    to retain the 3d cell effect). That looks
    terrible
    Thanks again
    Les F
    Michael Culley <m_culley@one.net.au> wrote in message
    news:3a83b65f@news.devx.com...
    > Les,
    >
    > Most likely you could not actually stop it drawing. If you could find a

    way
    > it would most likely be difficult and unreliable (someone will probably

    come
    > up with an easy way to do it!)
    >
    > But instead of stopping it from drawing you could place your what you want
    > to draw in a window on top of the flex grid. I'd use a frame control, set
    > its border to none, place it were you like and draw on it with your api
    > calls in the Frame_Paint event.
    >
    > Michael Culley
    > www.vbdotcom.com
    >
    > "Les F." <zala_@hotmail.com> wrote in message
    > news:3a83a3bd$1@news.devx.com...
    > > Hello:
    > > I use some API calls to draw graphics
    > > on a MSFlexGrid cell. When I add text
    > > to that cell the graphics disappear. Is
    > > there a way to prevent that?
    > >
    > > Les F
    > >
    > >
    > >

    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center