Results 1 to 7 of 7

Thread: directdraw and forms

  1. #1
    sunnyl
    Guest

    Angry directdraw and forms

    When using DirectDraw (Dx7) in full screen, theres exclusive access. Is it possible to have a form (that is in the same program) be shown on top of the form that is being blitted to?

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    If you're using DDraw in fullscreen mode then you are blitting directly to the video memory that is being used to render the image to the monitor. You can't keep that primary surface's info as it is and display a window on top of it.

    Why use fullscreen mode if you want to show other windows?
    Harry.

    "From one thing, know ten thousand things."

  3. #3
    sunnyl
    Guest
    What I had in mind was to use the 'on top' form to display selection menus/player status while a game is running. I imagined that having a form with custom controls for a GUI on top of the blitted form would easier than blitting a GUI.

    Anyhow, since I can't do that. How would I go about blitting a GUI (simple things, like command buttons), what are some difficulties in doing this?

  4. #4
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Well I don't see any big difficulties really. You'll have to get the mouse clicks - I'm not sure if you're going to get click events if you're in fullscreen mode. You may have to use DirectInput or GetAsynchKeyState() or something similar. I have only done this in C, never VB. I don't see any major problems though.
    Harry.

    "From one thing, know ten thousand things."

  5. #5
    Lively Member
    Join Date
    Apr 2001
    Location
    Lebanon
    Posts
    90
    I have the same problem. But my question is, can I close the form i'm blitting into temporarily to open another window, and then come back to it?

  6. #6
    sunnyl
    Guest
    How about maximising and minimising the form?

    Code:
    Form.WindowState = vbMinimized
    
    'and
    
    Form.WindowState = vbMaximized

  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I think you could use clippers in both cases:
    http://msdn.microsoft.com/library/wc.../ddover_95.htm
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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