Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Forms in DirectX

  1. #1

    Forms in DirectX

    How can I get forms working in DirectX? Do I need to create my own TDXForm? Can anyone give me any pointers on solutions to this problem? How do you do it?

    Thanks
    http://www.c5software.co.uk (site is being developed at the moment)

  2. #2

    Forms in DirectX

    *bump*
    http://www.c5software.co.uk (site is being developed at the moment)

  3. #3

    Forms in DirectX

    I'm probably stupid but what exactly do you want? Do you want to use DirectX to draw on your form (then it should be something like myDirectDraw.SetCooperativeLevel(MyForm.Handle, DDSCL_FULLSCREEN or DDSCL_EXCLUSIVE or DDSCL_ALLOWREBOOT)) or do you want to have a form pop up at runtime? Then this link may be useful (FullscreenDialog I think).

    I guess it's the same thing with Direct3D.
    Signature:
    <br />This is a block of text that can be added to posts you make. There is a 255 character limit

  4. #4

    Forms in DirectX

    Quote Originally Posted by Ultra
    I'm probably stupid but what exactly do you want? Do you want to use DirectX to draw on your form (then it should be something like myDirectDraw.SetCooperativeLevel(MyForm.Handle, DDSCL_FULLSCREEN or DDSCL_EXCLUSIVE or DDSCL_ALLOWREBOOT)) or do you want to have a form pop up at runtime? Then this [url=http://groups.yahoo.com/group/JEDI-DirectXExamples/files/DirectDraw/] ] may be useful (FullscreenDialog I think).

    I guess it's the same thing with Direct3D.
    Thanks for that link, it may help me to work out what I need. Basically I want to show TForms inside my DX application. It's fullscreen so I guess that TForm wont get drawn.
    http://www.c5software.co.uk (site is being developed at the moment)

  5. #5

    Forms in DirectX

    What DirectX version?
    There are only 10 types of people in this world; those who understand binary and those who don't.

  6. #6

    Forms in DirectX

    Quote Originally Posted by Clootie
    What DirectX version?
    Hi, thanks for replying!

    DX7
    http://www.c5software.co.uk (site is being developed at the moment)

  7. #7

    Forms in DirectX

    In DirectDraw7/Direct3D7:

    [pascal][background=#FFFFFF][normal=#000000][number=#0000FF][string=#0000FF][comment=#248F24][reserved=#000000](1) at init time:
    if (ddObject.CreateClipper(0, @ddClipper, NULL) = DD_OK) then
    ddClipper.SetHWnd(0, hwndAppWindow);
    ddObject.FlipToGDISurface;

    (2) later
    ddFrontBuffer.SetClipper(ddClipper);
    ddFrontBuffer.Blt(NULL, ddBackBuffer, NULL, DDBLT_WAIT, NULL);
    // or Flip
    ddObject.FlipToGDISurface;[/pascal]
    There are only 10 types of people in this world; those who understand binary and those who don't.

  8. #8

    Forms in DirectX

    Quote Originally Posted by Clootie
    In DirectDraw7/Direct3D7:

    [pascal][background=#FFFFFF][normal=#000000][number=#0000FF][string=#0000FF][comment=#248F24][reserved=#000000](1) at init time:
    if (ddObject.CreateClipper(0, @ddClipper, NULL) = DD_OK) then
    ddClipper.SetHWnd(0, hwndAppWindow);
    ddObject.FlipToGDISurface;

    (2) later
    ddFrontBuffer.SetClipper(ddClipper);
    ddFrontBuffer.Blt(NULL, ddBackBuffer, NULL, DDBLT_WAIT, NULL);
    // or Flip
    ddObject.FlipToGDISurface;[/pascal]
    Thanks for the quick reply again, but I am using fullscreen mode!
    http://www.c5software.co.uk (site is being developed at the moment)

  9. #9

    Forms in DirectX

    You mean you need this?
    [pascal]surface.Flip();
    DDraw.FlipToGDISurface;[/pascal]
    There are only 10 types of people in this world; those who understand binary and those who don't.

  10. #10

    Forms in DirectX

    Quote Originally Posted by Clootie
    You mean you need this?
    [pascal]surface.Flip();
    DDraw.FlipToGDISurface;[/pascal]
    Thanks, but what I really wanted was some miracle way of getting forms to paint to DirectX surfaces! I think without a lot of coding it isn't going to happen. I played around with FlipToGDISurface already, it's very very slow to the point it may as well not be used.
    http://www.c5software.co.uk (site is being developed at the moment)

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •