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
Solved

in directdraw.

Posted on 2001-07-18
3
921 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How can i compile this github project?? 2 90
Modify a small python script 19 116
Regular Expression Calculator Tester 2 80
Why use this lambda? 12 37
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This article will show, step by step, how to integrate R code into a R Sweave document
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 …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

860 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