Solved

in directdraw.

Posted on 2001-07-18
3
923 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about a problem I had getting the GPS LocationListener working.
This is about my first experience with programming Arduino.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Six Sigma Control Plans

690 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