Solved

in directdraw.

Posted on 2001-07-18
3
913 Views
Last Modified: 2013-11-13
I have two questions.

1.
  I'm using it for overlay.

  And input video singal format is yuy2.

  It works well.

  But there is one problem..

  The surface for overlay is always on the top.

  If a messagebox is appeared, it is always behind the
  surface..

  What's wrong ?
  and How can I display message box over overlay surface ?

//following source is what i used for creation

  ddsdYUV.dwSize = sizeof(ddsdYUV);
  ddsdYUV.dwFlags = DDSD_CAPS|DDSD_HEIGHT | DDSD_WIDTH |
                   DDSD_BACKBUFFERCOUNT | DSD_PIXELFORMAT;
  ddsdYUV.ddsCaps.dwCaps = DDSCAPS_OVERLAY | DDSCAPS_FLIP
                  | DDSCAPS_COMPLEX | DDSCAPS_VIDEOMEMORY;
  ddsdYUV.dwWidth = 640;
  ddsdYUV.dwHeight = 480;
  ddsdYUV.dwBackBufferCount = 1;
  ddsdYUV.ddpfPixelFormat = PixelFormatYUV;
  m_pDD->CreateSurface(&ddsdYUV, &m_pBufferYUV, NULL);

/////////////////////////////////////////////////////

2.
  I'm using YUY2 video format.
  I want to use RGB24 format.
  What are to be change for using RGB24 ?

Thanks.
0
Comment
Question by:can9999
3 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 6297207
Indeed MessageBoxes will show up when you are using directdraw in fulscreen mode. That is why new version of windows (and the development environment) support the use of multiple monitors. When you are then running in fllscreen you can use the other monitor for debugging purposes. Windows cannot show the messagebox because DirectX needs full control over what is being placed on the screen...

Best way to go on about is to fetch the hDc of the primary surface (or the backbuffer before flipping surfaces), and using the API function TextOut to show a message.

In general, the question you are asking cannot be done when running in fullscreen mode.

To use 24 bits videosurfaces you have a couple of ways to do that, depending on the directx sdk verison you are using. For DirectX 7 you will need to define the PixelFormat. Create the structure and fill the datamembers, one of the variables needs to be filled with the 24 variable. I do not have the SDK at work but at home. For more detailed information you will have to wait for a while (if needed).

Please also note that a lot of new videocards do NOT suport the 24 bit anymore!

Regards,
CJ
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7487639

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7518872
Per recommendation, points NOT refunded and question closed.

Netminder
EE Admin
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now