[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

in directdraw.

Posted on 2001-07-18
3
Medium Priority
?
926 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Introduction to Processes
Starting up a Project
Suggested Courses

656 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