CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Posts
    1

    I need help to synchronize an image with the screen refreshing

    (MFC et VC++7)

    i write an application which posts data converted into BMP line (752 pixels).
    These lines is draw on screen at the rate of source acquisition (ultrasound).
    All occurs well on a traditional screen, but on a TFT a flutter of the image appears.
    I use ScrollWindowEx() to move the image to the bottom of a line then my function writes the first line top.

    It is possible to synchronize the creation and the displacement of the image with beginning of the screen refreshing ?
    Tanks

  2. #2
    Join Date
    Sep 2002
    Posts
    1,747
    Alot of this more-hardware level stuff is done through video ports (ie. the IDirectDrawVideoPort interface). You have the GetLine method to retrieve the current line being written to the frame buffer, WaitForSync to align timing, etc. If you alternate syncs between a location in the top half and a location in the bottom half, you can write out the other half of the screen than is triggered, ensuring that any page drawn is fully consistent.
    */*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/

    "It's hard to believe in something you don't understand." -- the sidhi X-files episode

    galathaea: prankster, fablist, magician, liar

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