Results 1 to 2 of 2

Thread: Direct Draw windowed mode problems

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2001
    Location
    Garden Grove, CA
    Posts
    72

    Red face Direct Draw windowed mode problems

    I am having a problem with using direct draw for a windowed application. Everything works in full screen exclusive mode. But when I rewrote it to use windowed mode it doesnt work. I don't have the exact code here, but what I am doing is creating the primary and secondary(back buffer) surfaces and setting the clipping region (DirectDrawClipper) to the primary surface and to a picturebox that is the size of the form. I go to add text to the screen like this

    Pirmary.DrawText 50,50,"This is a Test", False

    It draws it to 50,50 on the SCREEN not the form/picture box.

    Or if I have a rect that is 800x600 top 0 left 0 it comes out at 0,0 on the SCREEN

    How do I set DD to draw ONLY to the picturebox (or even the forms hWnd)?

    What am I doing wrong?

    Thanks
    Chris Wilson
    Chris Wilson

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    if you want the text to be drawn on the form or picturebox you'd better use the GDI api's instead.
    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