|
hem sorry mista rateepzzzzzzzzzz,
i'm a bit off topic, but 1 ms is 1 milli-second for me, while 1 micro-second is written 1 µs...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
like duh!!!!! ......
ahem...sorry mr toxxxxxxxxcit,
i am not off thiz topic;) ,coz my bachelors happen to be in electronics &communication......
well i was wondering if microsec precision is possible with the QueryPerformance function taking into account that the windows aint an rtos system......my question seem to have just popped up when thiz question abt millisecond was put into,.....itz not the issue or misunderstanding of millisec,or pico sec,or nano sec or whatever!!!!!;)
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
The best way is to run under a real-time OS...!
Seriously, I think that the solution given to use the QueryPerformance*(...) functions (also check out the multimedia timers) in a tight loop would do it for you. You might have to worry about the cases where your qauntum expires during the execution of the loop, though.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
But doing such a thing makes you a bad windows user.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
oh really ?!
do you know hardware programming ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I think he was referring to my line:
"The best way is to run under a real-time OS...! "
Otherwise he would have said "bad Windows developer", not "user". :P
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Yes. I have been doing process control and industrial automation for many years. I have worked on my embedded processor systems (not just WinCE) and have written many device drivers for different hardware platforms (Z-80 using CPM, 68k running PDOS(?), 386 using only god knows what).
Doing anything in a tight loop testing any type of flag without resolving to a kernel waitable object is a bad idea. It will lock other applications out of the CPU. Even spinlocks will only loop for a very limited amount of time prior to resorting to a kernel object.
I would question the overall design if someone needed to do such a thing. There are cases where that level of timing is needed, but as already stated user mode isn't a good place to do such things. Thus, even if he could get it to work, it wouldn't be reliable in the real world.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
|
I need an opaque dialog or bitmap for demo version. The GUI is in written in MFC. I need something over all dialogs with opaque letters DEMO.
What can you suggest me,
thanx Dina
Dina
|
|
|
|
|
Use OnEraseBkgrnd to replace the background color with a bitmap of your choice? That might be the easiest way.
|
|
|
|
|
Draw directly to the user's screen?
Writing DEMO all over the place?
|
|
|
|
|
i want to know that how to hide the application from appplication list when we press the Ctrl+alt+delete. i want to do this in the visual c6.
ddd
|
|
|
|
|
|
i want to compile this code :
<br />
template <class T> <br />
inline const T& max ( const T& a, const T& b) <br />
{ <br />
return a < b ? b : a ; <br />
<br />
<br />
}<br />
got this error message :
: error C2226: syntax error : unexpected type 'T'
: error C2062: type 'const int' unexpected
: error C2059: syntax error : ')'
: error C2143: syntax error : missing ';' before '{'
: error C2447: '{' : missing function header (old-style formal list?)
but it's successfully compiled on BCB6.0 .
VC7.1 is just stupid???
|
|
|
|
|
Teerayoot wrote:
template
inline const T& max ( const T& a, const T& b)
{
return a < b ? b : a ;
}
put above code in header file !
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
try using as
template<typename T><br />
inline const T& getMax ( const T& a, const T& b) <br />
{ <br />
return a < b ? b : a ; <br />
}
The problem is with the name of the function. I have renamed it from "max" to "getMax" because macros with the name "min" and "max" already exist in stdlib.h, and same name of the function as those macros caused the errors.
Rahim Rattani
Software Engineer,
Matrix Systems (Pvt) Ltd.,
Karachi - Pakistan
|
|
|
|
|
Error message make me very confuse.
it should say
"name of the function max alredy exist in standard library!"
or somethings that can make sense.
Thank you.
|
|
|
|
|
Hi,
i know that i can set each of the incoming parameters of my function to a default value, like this:
void Function(int x , int y = 10);
and then,i can call to the function in 2 ways:
Function(10,20);
Function(10);
my question is - how can i set a CString object to empty by default?
for example:
void Function(int x , CString string = ???????);
and call that function:
Function(10,"Not an empty string");
Function(10);
anyone????????
Regards,
Eli
|
|
|
|
|
As smple as u set the integer values.
void Function( int x , CString string = "" );
Rahim Rattani
Software Engineer,
Matrix Systems (Pvt) Ltd.,
Karachi - Pakistan
|
|
|
|
|
eli15021979 wrote:
my question is - how can i set a CString object to empty by default?
for example:
void Function(int x , CString string = ???????);
and call that function:
Function(10,"Not an empty string"); // x = 10 , string = "Not an empty string"
why don't you do the same as you code with integers...?
<font color=blue>void</font> Function(<font color=blue>int</font> x , CString string = <font color=gray>""</font>); Then you call it the way you like...
Function(10, <font color=gray>"Hello CP"</font>); <font color=green>
Function(10); <font color=green>
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Also, you need to decide if the function accepting the CString really REQUIRES a CString object.
Maybe you can get by with a LPCTSTR instead.
Then you can write your function:
void Function(int x , LPCTSTR szString = NULL);
and call that function:
Function(10, "Not an empty string");
Function(10);
You can get really tweaked after awhile working with code all written to accept a CString by value, and then when you examine the function's use of the string, it could have easily sufficed to send it a string constant instead.
|
|
|
|
|
Is there any Group Calender control available (preferably as a MFC Control)?
(Commercial or Non - Commercial)
Something like http://www.officeclip.com/web/calendar/tour3.html
and the OfficeClip Group Calendar - Invite Attendees - Picture (the one down the site).
I should see the appointments of a group of people and (ideally) someone should be able to dynamically drag an appointment and move it to another date / time.
Any help appreciated.
All the label says is that this stuff contains chemicals "... known to the State of California to cause cancer in rats and low-income test subjects." Roger Wright http://www.codeproject.com/lounge.asp?select=965687&exp=5&fr=1#xx965687xx
|
|
|
|
|
Hi
I am trying to set a region for buttons. here is code:
CRect the_rect;
m_SearchBtn->GetClientRect(the_rect);
HRGN region_handle = CreateEllipticRgnIndirect(the_rect);
int nRet=m_SearchBtn->SetWindowRgn(region_handle,TRUE);
nRet value is always non-zero. But still the button shape won't change. Could anyone tell me what is wrong?
Regards
|
|
|
|
|
Do NOT conflit refrence and value!
In MSDN --> void GetClientRect( LPRECT lpRect ) const;
So use m_SearchBtn->GetClientRect(&the_rect);
HRGN region_handle = CreateEllipticRgnIndirect(&the_rect);
....
|
|
|
|
|
It won't work even with reference.
|
|
|
|