Advertisement

DirectX/Windows Help, Please

Started by May 30, 2000 12:23 PM
6 comments, last by Tony Chamblee 24 years, 7 months ago
Is it possible to still have a windows menu on a full-screen DirectX window? And still page flip with DirectX? It works fine as long as I don''t page-flip or blit over the menu, but when I page flip, the windows menu disappears. Even if I put a clipping region over the menu. Does anyone know how to solve this problem? *Tony Chamblee*
Nucleus Software
*Tony Chamblee*
Liquid Flame Software
I don''t think that''s possible.
When you have set up a flipping chain then all surfaces has the same size and that size is meant to take up the entire window. So when you flip then the menu is overpainted because the backbuffer (which becomes front buffer when flipping) has the same size as the entire window.
Clipping regions has nothing to do with page flipping, it is only used for blits so I guess you have to do blits.
Advertisement
One way to solve your problem would be to use the double buffering method. Do all you blitting to an offscreen surface and once that is done, blit this offscreen surface to the screen.
While this method may be slower than page-flipping, but at least this method does clipping if you''ve set a clipper.
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
Sorry I can't help you but I have a question myself. It seems that the WIN32 API has no support for numbers with decimal points for edit boxes. If the only possible way is the get the value as text, could you tell me how to convert it to a float value. Thanx!

Edited by - Darkor on June 2, 2000 1:26:06 AM
Maybe you should try the atof() function? Get the text in the textbox and then place it in a character array. Then call atof()
That should do the trick. Haven''t tried it my self. So I don''t really know whether it will work.
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
Are you sure? Please include an example.
Advertisement
Hmm, an example?

say you have a string that holds a float in characters
char *string = "2.456";

now to convert this to a float, you''d call atof();

float fNumber = atof(string);

This should place a float value of 2.456 in fNumber. So in your case, the value of string would be something from your edit box. That should do it

Hope that helps.


p.s. Why don''t you start a new thread instead of asking questions in one that is totally irrelavant?



========================================================
If something sounds stupid but works, it's not stupid
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
Got it! Thanks!

This topic is closed to new replies.

Advertisement