|
CompareFileTime is a win32 function that'll compare two FILETIME structs
|
|
|
|
|
Unfortunately, none of the two suggestion above will do what DATEDIFF does...
You need to separate the DATE part of your time value. You didn't say what data type you use for your date/time variables.
The easiest way, I think, is to convert both dates to COleDateTime (which wraps double representation of date/time), truncate the fractional part and simply subtract one value from another.
-----------------------------
Get trial copy of FeinViewer - an integrated GDI objects viewer for Microsoft Visual Studio .NET 2005 (8.0) Visual C++ Debugger, and other convenience and productivity tools for Microsoft Visual Studio .NET at at www.FeinSoftware.com
|
|
|
|
|
Hi all,
I would liek to know if it is possible to create dynamic structures? And if it is possible, how would one go about doing it?
Many Thanks
Regards,
The Code Project...Where men are made and legends are born
Programm3r
My Blog: ^_^
|
|
|
|
|
Hi,
i think the only way is to use void* Pointer into your struct.
So you can store what-ever in your structure.
But the number of pointers must be specified in the code.
Good luck
|
|
|
|
|
Programm3r wrote: I would liek to know if it is possible to create dynamic structures?
What do you mean? Do you want to dynamically create statically declared structs?
If the answer is yes, then use the new operator. On the other hand, if the answer is no, please detail you request.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
CPallini wrote: What do you mean?
Well for example, instead of creating five structures, is it possible to create one structure that can dynamically cater for each of the five structs during run time.
Makes sense ?
Thanks for the response ...
Regards,
The Code Project...Where men are made and legends are born
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: is it possible to create one structure that can dynamically cater for each of the five structs during run time
Why don't you use a container (such as std::vector ) for your dynamically created structures?
(Maybe I haven't fully understood your requirements).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Thanks for the info CPallini, never really used a std::vector before, but I'll give it a shot.
Thanks
Regards,
The Code Project...Where men are made and legends are born
Programm3r
My Blog: ^_^
|
|
|
|
|
You mean 5 different structures? , then you can't use vectors straight away. You can use vectors to grow itself dynamically but not different data struct types. May be you can cast everything to void* then push it inside the vector. I mean if you are talking about different structs.
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
I developed application using SDI CHTMLView
Is it possible to have dialog at one corner of
my view ? If yes how to acvhieve that.
|| Lust Causes Sorrow ||
|
|
|
|
|
I`ve got MFC dialog-based program and i`ve made html help support by this way:
pressing F1 in dialog calls OnHelpInfo(..) in which i call HtmlHelp(..). It works in some strange way: if before pressing F1 i press button Browse (that calls standart file open dialog CFileDialog) and point to some file, HtmlHelp() does not work after this.
What do i do wrong?
VC++ 6.0
Thx.
|
|
|
|
|
I would guess that your current directory is being set by the FileOpen dialog, and you are not calling the help function with the correct name.
Imagine your program lives in "c:\myprog".
User runs your program:
Dir is set to c:\myprog
User asks for help
HtmlHelp ("myhelp.chm") runs c:\myprog\myhelp.chm.
User changes directory to c:\other
User asks for help
HtmlHelp ("myhelp.chm") runs c:\other\myhelp.chm, and fails.
What you need to do is to make sure you're running the correct help file.
What I do is: Use GetModuleFilename to get the full path of the exe. replace exe with chm, and then run that help file.
I hope that helped!
Iain.
|
|
|
|
|
Yes, it works! Thanks very much!
|
|
|
|
|
I am using Visual c++ NET 2005
How to convert string^ to numeric
|
|
|
|
|
|
::Int32::parse(String ^)
Manish Rastogi
|
|
|
|
|
That's the gook reply, It's OK Now
|
|
|
|
|
That's the good reply, It's OK Now
|
|
|
|
|
It was better you asked on the (Managed) C++/CLI forum.
|
|
|
|
|
I am developing software in which MFC exes are called by HTML sripts. I am only involved in developing exe. Now need of time is that I have to include
mpeg player in html display at one corner. And based on event in code mpeg will display video. I dont know how to handle situation. And where to read which articles.
|| Lust Causes Sorrow ||
|
|
|
|
|
If you want to get something up and running quickly, you could probably use the Windows Media
Player control. The WMP Player SDK can be found here: Windows Media Downloads[^]
If you want complete control over the media, and don't mind doing more coding, you could maybe use
DirectShow[^] and/or the Windows Media Format SDK. found at the Windows Medaia Downloads link
above.
I'm sure there's many third-party video controls you can embed as well.
Hope this helps a little.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks to your suggestion, I included windows media player
control successfully, but now I am getting problem with that. I am not able to play movie inside that.
It does not resond to any of its functions like
SetFileName, SetEnabled,Play. Its buttons doesnot activate.
|| Lust Causes Sorrow ||
|
|
|
|
|
I have 3 items in list view say Name , Number and Mark. i want to sort the items on clicking the header of one column in list view.how can i do this , is there any simple way to do this task ?
thanks !
|
|
|
|
|
Sorting of items in list control is implemented in this[^] article. Check the MainDlg::OnColumnclickList1() function in it.
|
|
|
|
|