|
You said you want to use CreateProcess but you dont have path of project but I have a question wheres this project on memory or you have only a name?
|
|
|
|
|
I have a float value (123.456789).In this i want only two fractional digits (like 123.45).I dont want to copy this value into string variable and format it.How can i do this directly?Is any functions are available?
E-Ramu
|
|
|
|
|
floats are approximations, so there's really no way to get the exact value you want, but the closest would be to multiply by 10^the number of decimals, throw away the decimals ( by cast to int, or by calling floor ), and then divide again.
Christian Graus - C++ MVP
|
|
|
|
|
int i;
i=(123.3456)*100
float f=i/100;
|
|
|
|
|
Hello,
I have taken this code from somewhere i dont remember, and changed to work with doubles (since the int variable may not store the double variable)
double round(double Num, double Seed)
{
// get rational factor
double fac = Num / Seed;
// get natural factor
fac = (fac < 0) ? (ceil(fac - 0.5)) : (floor(fac + 0.5));
// fac = (fac < 0) ? static_cast<int>(fac-0.5) : static_cast<int>(fac+0.5);
// return multiple
return fac * Seed;
}
use it with round(3.8984, 0.01) for example....
Bekir...
|
|
|
|
|
hello
I use MFC in PPC to create a dialog to playback a video by direct show.
Because use direct show to playback, it will crate a video window view in toplevel.
But I wish the video is overlaped with the dialog and if some UI is showed in toplevel I can find by the message of the dialog.
Pls tell me how to solve the issue and thanks a lot.
Any suggestion is useful!! Thanks!!
|
|
|
|
|
I'm not sure I understand your question. Is the DirectShow window covering the dialog?
|
|
|
|
|
Yes. Use DirectShow will cover the dialog.
Any suggestion is useful!! Thanks!!
|
|
|
|
|
Assuming you are using one of the video mixing renderers (VMR-7 or VMR-9 then check this
out...
Using Windowless Mode[^]
Unfortunately, when using windowed mode, there's no interface to get the HWND for the window.
You can set its parent through the IVideoWindow interface but can't get its HWND to use as a
parent.
Anyway, windowless mode gives you much more flexibility/control.
Mark
|
|
|
|
|
hi,
i need to show a wait cursor while i'm savin on button click. i don't want to use CWaitCursor class. any other way?
|
|
|
|
|
You can use LoadCursor . But I would prefer CWaitCursor .
|
|
|
|
|
Well, why on earth do you want to do it the hard way ? Your other option is a try catch block that copies the code out of the CWaitCursor class.
In other words, the CWaitCursor encapulates the only way to create a wait cursor.
Christian Graus - C++ MVP
|
|
|
|
|
SetCursor(LoadCursor(NULL, IDC_WAIT));
and when you're done
SetCursor(LoadCursor(NULL, IDC_ARROW));
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
|
hi friends,
I need some help in logger design. I need to log information like
file_name : I can use __FILE__
line_number : I can user __LINE__
date_time_stamp: This can be done.
user_string: This is also stright forward.
User_variables: How to do this? Can I user variable args? how?
how the interface should look like from DLL?
Please guide me to develope an independent component.
Vikram S
|
|
|
|
|
hi vikram,
I dont have any answer to ur question. but, i have one question.
i think u know answer bcoz u told date_time_stamp can be done. if u know, guide me.
How do i get logon and logout date and time in windows 2000?
I want to find out first logon time & last logout time of the given date & user. Is there any event codes for logon & logout? should i need to check in Application or System(Event Viewer)?
Babu
Babu
|
|
|
|
|
hi Babu,
frankly speaking I am not working on windows 2000/or any other version specific stuff. Need to search on google.sorry
vikram S
|
|
|
|
|
Hi
1.IS IT TRUE in any case code of DLL is not duplicated?
2.Although as u said at first instance it may need relocation BUT wat if the next process also needs DLL to be relocated?
3.Is it like this that DLL uses data of the process associated with it at that time
Hope to get some answers soon
bye
pitchu
|
|
|
|
|
Hi,
I want to add some text to the begining of a existing text file while keping its
contents. I used SeekToBegin method but it overwrites the contents already in the
file. Is there a way to do that?
|
|
|
|
|
I presume you can't do that!
instead what u can do is open another temp file, and write the contents at the start of the temp file. and copy entire contents from the old file to temp file. After that replace old file by temp file.
--
reddy
|
|
|
|
|
Yes, But what if the contents of the old file is really large. Will that be a problem in efficiency?
|
|
|
|
|
u have to follow the same procedure even if the contents are very very large.
Because except Xenix, no other OS provide insertion of bytes in the middle of the file,
they support insertion only at the end of the file.
--
reddy
|
|
|
|
|
|
Open the file in different mode or flag
|
|
|
|
|