|
How simple can this be?
I want to draw a moving white line on a black screen at a fixed frame rate.
How can this be achieved?
I need to ensure that only one line is visible on the screen at any one time. But I'm having trouble getting my head around how this works with monitor refresh rates.
Currently I'm using DirectX, drawing on the back surface and then flipping the primary surface and back surface (with DDFLIP_WAIT). I draw a black rectangle then the white line and then flip. But it doesn't seem to behave as I would expect. I appear to see two or three lines on screen at once.
If I draw the white line, then black rectangle over it and then flip I should see only a black screen right? Wrong I still see the line!!! How?!
Can anyone help?
--
The Obliterator
|
|
|
|
|
Hi there. I have a question for you all. At work, we have a large program that was written using VB6. The boss has decided that, for various reasons, it should be rewritten using VC++6. That's my job. He insists there's a program out there that can automate most of the porting but he can't remember the name. The only program I could find online was something by a company called Cicerosoft. They seem to have gone out of business, unfortunately, and I can't locate the software.
So, can any of you point me in the right direction? It doesn't matter if the software's free or not. Also, I'd be happy if all it did was automate the porting of the GUI screens and the prototypes for GUI functions (e.g., pressing buttons and such).
Thank you!
|
|
|
|
|
In VC6 you can import vb forms, through the IDE. It's in one of the books I have somewhere. I tried it once, but the only problem is that sometimes all of the controls don't import correctly, so a lot of the time I just had forms with textboxes on them. If you look and can't find this feature, post again and I'll see if I can find it for you on my system.
Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store
My articles[^]
bdiamond
|
|
|
|
|
I just tried it. Just go to the menu (in VC6) and click 'Insert'->Resource. Choose 'Dialog' from the list of options and then click the 'Import' button. In the list of file types listed in the following file open box there will be a type for 'Visual Basic forms (.frm)'. don't know if this will get you where you want to be, but that VC IDE way.
Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store
My articles[^]
bdiamond
|
|
|
|
|
Hi there. Thanks for the reply. It's definitely not perfect but it seems to work for the most part. We'll see how things go.
Thanks again!
|
|
|
|
|
may be i think you can go for .Net enviornment to solve you problem
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
This may have been brought up in previous posts and I apologize for rehashing an old argument. I am working on an application written in VS 6.0 and I would like to implement some functionality that would allow for the option to check for an update from a website. Someday, I would like to incorporate the ability to pull down the update. But for right now, I would just like to find a way to check for an update on a website. Any ideas or suggestions? Does anybody know of any articles on CodeProject for doing such a thing?
|
|
|
|
|
|
Is there an easy way to determine if a window is on top of all other windows?
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
How about GetTopWindow() ?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I guess my question was a little vague. What I am trying to do is determine if my application is on top of all other applications. I receive data through a socket and when that data arrives if my app isn’t on top of all other apps I want to flash my app so it lights up on the task bar.. I have tried the following yet it still flashes even if the application is on top and has focus…
if(IsIconic() || GetDesktopWindow()->GetTopWindow() != AfxGetApp()->m_pMainWnd)
FlashWindow(TRUE);
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
if(IsIconic() || GetForegroundWindow() != AfxGetApp()->m_pMainWnd)
FlashWindow(TRUE);
Thanks
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Can anybody know the answer to the folloing problem:
Given a window handle, how can we tell whether this
is a message box or not in C++ .Net.
Thanks!
|
|
|
|
|
To my knowledge, there's not. Like all dialog boxes, a message box belongs to the window class #32770.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I want to display a sequence of 10-15 jpeg images in a dialog box with a scroll bar which can move between tha images .I have just started with VC++ and have the faintest idea of what to do .
|
|
|
|
|
Hi guys
Is there a simple way to play a sound that you previously included as a resource?. For only 17Kb it's annoying to have to add a extern wav file to the program.
Best Regards.
Doc
|
|
|
|
|
doctorpi wrote:
There is a simple way to play a sound that you previously included as a resource.
Are you asking or telling? If the former, see if this article is of any help.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Sorry David
I've corrected my question.
Sometimes my english is not as good as needed to understand my questions.
I'm taking a look your article. I think is what I need to have the resource on memory.
But, what about to play a sound?
Thanks
Doc
|
|
|
|
|
In Resource View Right Click On Your Resource Folder
Select "Import"
In The File Types Filter Select All Files Or *.wav If there is
Then Add The File U Want Thats it
Use ::PlaySound(MAKEINTRESOURCE(ID_MYWAVE,m_hwnd,SND_RESORCE|SND_ASYNC/*other parameters if u want to*/);
include the mmsystem.h header file and add the library winmm.lib in the debug and release configurations
I Have A Problem With PlaySound
The Problem I am Having Is when I exit my app the thread created for playsound with the SND_ASYNC returns a value of -1 i know that using ::PlaySound(NULL,0,0) the thread should be terminated safley i tried it but it fails i created a click sound for each mouse click on LButtonDown I use PlaySound with correct params on LButtonUp i use PlaySound(NULL,0,0) but the thread exits with -1 normal terminal should exit with 0
|
|
|
|
|
Thanks you guy.
It works perfectly.
Doc
|
|
|
|
|
Leyusha wrote:
I Have A Problem With PlaySound
The Problem I am Having Is when I exit my app the thread created for playsound with the SND_ASYNC returns a value of -1 i know that using ::PlaySound(NULL,0,0) the thread should be terminated safley i tried it but it fails i created a click sound for each mouse click on LButtonDown I use PlaySound with correct params on LButtonUp i use PlaySound(NULL,0,0) but the thread exits with -1 normal terminal should exit with 0
ANY ONE
|
|
|
|
|
Leyusha wrote:
...normal terminal should exit with 0
Are you sure?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
doctorpi wrote:
Sorry David
I've corrected my question.
Sometimes my english is not as good as needed to understand my questions.
Not a problem. I don't criticize people's speech, either written or verbal, but I will ask for clarification if it is necessary.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I am trying to pull specific information from the Security Event Log in windows 2000, in Visual C++ 6 for a auditing system I am creating. Using information from MSDN I have been able to extract the event number, the time it occurred, and the user who triggered the event. The last thing i need is the file that was modified. I know this only applies to certain events. How can i get the file that was accessed/modified/deleted? I have not been able to find a clear example. I've tried using GetEventLogInformation but i was unable to get it to work. I also tried get the message map but I failed at that as well. Are either of these the correct approach? Anyone know of any examples? Any suggestions would be appricated.
|
|
|
|
|
jet9153 wrote:
The last thing i need is the file that was modified.
What file? The event file itself, or a file that an event message refers to?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|