Results 1 to 12 of 12

Thread: (Quite Urgent) Complete Clear Of The Primary Surface Direct Draw Surface

  1. #1

    Thread Starter
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176

    (Quite Urgent) Complete Clear Of The Primary Surface Direct Draw Surface

    Hello I am trying to completely clear the front buffer, i currently clear all black from the screen and write red text to the backdrop, this is in order to be able to view text over a movie, However the Text never disappears it just writes over the top of the original, How can i remove the text and have a completely see through surface to write to again?????

    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  2. #2
    Addicted Member
    Join Date
    Aug 2002
    Location
    Baltimore, MD
    Posts
    230
    Use the surface's BltColorFill method:
    Code:
    Dim r As Rect
    
    surface.BltColorFill(r, RGB(0,0,0))

  3. #3

    Thread Starter
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    Sorry but i need it transparent when it clears because the movie in the background must be visible

    Thanks though
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    There is no background in DirectDraw. You are alone responsible for what is visible, so you have to draw the movie on your surface.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5

    Thread Starter
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    Here is My DX Code

    You Will notice it flickers the background and this is because every time i need to change the primary surface i must reload a new one in order to clear it completly of any data. I Need to Clear the data another way and in a way that doesnt require windows to refresh!

    Attached Files Attached Files
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Where's the movie?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  7. #7

    Thread Starter
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    you run the movie in media player

    Run the program i gave you now minimize the windows and start anything like a movie in the background The text scrolls above all windows but i cant actually clear the text from the primary surface so it starts becoming blured (Take Out Line 218 to see this)
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  8. #8
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    The idea of that app doesn't make sense to me. It is generally a bad idea to mess with other apps.

    The way it is you are taking control of the screen and no other app is really allowed to do drawing, windows expects you to hog everything.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  9. #9
    Addicted Member
    Join Date
    Aug 2002
    Location
    Baltimore, MD
    Posts
    230
    Have to agree with CornedBee - what's the point?

  10. #10

    Thread Starter
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    I work for a company and another company has requested a scroll program to scroll a message over a program they cant interact with therfore i have had to turn to dx in order to allow the other app to be visible in the background, i cant rewrite media player!!!!!!!!!!!!!

    Anyhow the question was do you know how to clear the surface completely without using a color???? Not what do you think of....blah blah blah

    I have no choice as to using the other program i am stuck with this one, although my opinion is almost the same as yours. I just take it as a challenge.

    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  11. #11
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    You could steal that other app's device context and draw on the app. It's not that hard (at least in C++). All you need to do is use Spy++ to find out the window class, use FindWindow to grab the window, take a DC and draw away.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  12. #12

    Thread Starter
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    hmm ill look into that thanks
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

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