|
tonyro wrote: Is it possible to make my program such that it is the only task that is running on the computer?
I don't think so.there are many OS tasks that manage your system and you can not stop them , if you try to stop them (if you can!) the system may crash or go to an unstable condition.can you tell me the smallest unit of time you use in your program?
|
|
|
|
|
Thanks for your response. I'm trying to get all events in the program to be accurate down to the one millisecond scale.
|
|
|
|
|
Windows is NOT a real-time OS. So, the best you could hope for is around a 10-20 ms scale.
onwards and upwards...
|
|
|
|
|
Windows is not a real-time OS, It’s true! But there are techniques to satisfy timing constraints of a windows real-time application with 1 millisecond accuracy. Some of them may be complex and hard to implement but they are possible.
see this on MSDN: http://msdn.microsoft.com/library/en-us/dnxpembed/html/hardrealtime.asp[^]
-- modified at 0:47 Thursday 5th January, 2006
|
|
|
|
|
tonyro wrote: Is it possible to make my program such that it is the only task that is running on the computer?
Imagine if this were possible:
* How would the screen get drawn?
* How would the system read keyboard/mouse input?
* How would the system access the hard drive?
* How would the system manage the swap file?
Windows is the wrong OS for your task.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
This is why I continue to use Windows 98 on some systems and Exit to DOS, where I can control all of these functions. However, it is getting more and more difficult to maintain those machines. What modern OS would you recommend?
|
|
|
|
|
You can still run 98 on computers you can buy today. If 98 and DOS work for you, why change?
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
Magnae clunes mihi placent, nec possum de hac re mentiri.
|
|
|
|
|
http://www.sysinternals.com/Information/TipsAndTrivia.html Look for "Never-ending Quantum?".
NOTE: I only add this for interests sake. The users of you program will not thank you for disabling multitasking on his machine. Basically here's how to do it but by the way, don't do it. I haven't actually tried it myself, just came across it in my travels.
Steve
|
|
|
|
|
Hi everyone
I have some problem with fread and fwrite in VS2005 beta2
I have the following code, in it i generate a buffer and after assigning some values to it , i write it to a file , then i try to read it back to a new buffer which is not successful.
for variable bigVal=100 i get "k=100" for writing but for reading i get "k=77" , i would be pleased if someone can help me.
#include "stdafx.h"
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
typedef double dtype;
int _tmain(int argc, _TCHAR* argv[])
{
dtype *b;
int i,j,k;
int bigVal;
char filename[]="c:\\temp.data";
FILE *fp;
bigVal=100;
b=(dtype*) malloc(bigVal * sizeof(dtype));
for(i=0 ; i
|
|
|
|
|
Hello.
I'm not sure if it's your only problem, but you should definately use binary mode for your files. So use:
fopen(filename,"wb")
and
fopen(filename,"rb")
Kakan
|
|
|
|
|
in fread and fwrite the first parameter is "void *" so try typecasting the first parameter as following
fread((void*)b,sizeof(dtype),bigVal,fp);
fwrite((void*)b,sizeof(dtype),bigVal,fp);
it worked when i tried past.
FAILURE is the first step towards SUCCESS
|
|
|
|
|
Hi
The CListCtrl click handler shows an edit box that allows to edit the subitem values. That is working fine when I click using the mouse.
But now, I need to simulate a click in a ClistCtrl, to open that edit box automatically.
I already tried using mouse_event but the mouse pointer appears in the task bar, and nothing else happens.
So, I think, I should call the CListCtrl click handler.
OnClick(NMHDR* pNMHDR, LRESULT* pResult)
The NMHDR* really is a NMITEMACTIVATE pointer.
So I filled the ptAction, iItem, and iSubitem and created a LRESULT variable.
Then I call OnClick((NMHDR*)struct, &lResult);
The handler is called, but the edit doesn't appear, and when I close the application it hangs up, and tell me if want to tell it to Bill Gates
Any suggestion really appreciated, and thanks for reading all that
Sebastian
|
|
|
|
|
You could send a direct message to the list ctrl, like:
m_List.SendMessage(WM_LBUTTONDOWN,0,MAKELPARAM(2,20));<br />
Sleep(100);<br />
m_List.SendMessage(WM_LBUTTONUP,0,MAKELPARAM(2,20));
However, the mouse-location (2,20) must be correct for it to work properly. Most probably you want an item to be selected also, which means that you have to calculate the item's correct location in the list ctrl.
An alternative would be to select an item in the list ctrl through code, and take its text and show the edit box yourself, without depending on the click-handler.
this is this.
|
|
|
|
|
you remember you helped me with the same code. i'm using this still. its cool!
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
|
|
|
|
|
I think I'm gonna doit the hard way, because I can't simulate the click.
The code you gave me doesn't work, altought it should.
To get the coordinates, I used a MessageBox in the click handler to show me the point, and I used those values, but Nothing :S
Thanks for the help man
|
|
|
|
|
Is IE Plugins ( like Acrobat Plugin for IE
or Flash Plugin/ Media Player etc) are ActiveX Controls or ActiveX documents;?
Is there any link for more information?
Happy New Year
|
|
|
|
|
IE Plugins are ActiveX Object.
I dont know anything called ActiveX documents.
-Prakash
|
|
|
|
|
Hi
You can get the links on google.
One thing i know is that you have to implemet the IHtmlDocument interface for it
Cheers
Ganesh
hi
|
|
|
|
|
ActiveX Documents are a little-used technology that appeared in the mid '90s to allow embedding other document types within an application. For example, when you click a link in IE that loads an excel or word document, Excel or Word runs inside the IE application.
onwards and upwards...
|
|
|
|
|
basementman wrote: ActiveX Documents are a little-used technology that appeared in the mid '90s to allow embedding other document types within an application. For example, when you click a link in IE that loads an excel or word document, Excel or Word runs inside the IE application.
Thank you.
-Prakash
|
|
|
|
|
The Plugins are kind of viewer, which can load any special document and display it.
The behave is little different from other Active X Controls.
I am looking for any reference sample.
|
|
|
|
|
When using an application through automation you may not wish for error messages to appear, this being because if an error occurs your application would hang waiting for you to deal with the dialog box prompted by that error. This seems to be something to do with the modality of error messages. Is there something i can set prior to say calling CWinApp::OpenDocumentFile(filename); so that an errors generated by this call do not stop the application from continuing. I'm ok if the error message means that the application crashes or fails or whatever, i just want to provide that option to the user so that they can deal with the error themselves...does that make sense and is that possible (i'm thinking its gotta be!)
Thanks
Will
|
|
|
|
|
Is the dialog box that you are talking about is related to ASSERT dialog box?
If yes, build in Release version, In release version you wont see the ASSERT dialog box.
-Prakash
|
|
|
|
|
no its not, so that doesnt solve the problem
|
|
|
|
|
Can you type out the message that you see in the dialog box?
btw, it is not worth ignoring any error.
may be we can identify the problem and solve it permanently.
-Prakash
|
|
|
|