|
Coder8725 wrote: I am trying to write a program to get list of files in a folder sorted by created Date and Time. Is there a function to do the same.
Can anyone reply me on this......
There is an API CompareFileTime . Along with this API you can use GetFileTime API to get the time of the two files.
Take a look at qsort for sorting.
|
|
|
|
|
I get txt files to upload into my system
say
1) 00002.txt 01/11/2006 11:00 AM
2) 00001.txt 01/11/2006 10:00 AM
3) 00003.txt 01/11/2006 11:10 AM
I need to pick files by time and upload in the order 2) then 1) then 3)
Number of files is not limited.
I am currently using FindFirstFile and FindNextFile and the DWORD as mentioned in the other post. But this sorts by FileName.
|
|
|
|
|
Coder8725 wrote: I am currently using FindFirstFile and FindNextFile and the DWORD as mentioned in the other post. But this sorts by FileName.
Not necessary, you can use FindFirstFile and FindNextFile to get file information ( which is better than GetFileTime ). Then sort them based on the file creation time.
Use CompareFileTime .
qsort also helps. You can specify a custom compare function callback and just return the value returned by CompareFileTime from this callback function because that is what qsort expects.
|
|
|
|
|
i am using the IMessenger2 interface, when i try to get my contacts, i see the number returned is 0 (it doesn't happened on every computer , it occured 3 out of 10 i've tested).
why is that? i must add that my messenger is online and i have plenty of contacts...
can any1 help?
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
|
Is WM_CTLCOLORBTN helpfuls
|
|
|
|
|
WhiteSky wrote: Is WM_CTLCOLORBTN helpfuls
This won't work for buttons...
|
|
|
|
|
|
Thank you so much for all the replys. As said by Nibu babu thomas, WM_CTLCOLORBTN cannot be used for command(push) buttons. So, can anyone enlighten me.
|
|
|
|
|
codesen wrote: So, can anyone enlighten me.
The only way to go about this is to owner draw this button.
|
|
|
|
|
Thanx for ur reply. I guess there is no other way than to use the one that i posted in the beginning of this thread (ColorButton). Thanx a lot.
|
|
|
|
|
Hi All,
I am creating one shared memory. In that I can create it using CreateFileMapping() in one process and i can write datas on that memory.
but How can i read its contents from another process or application?
Kindly Help me .
|
|
|
|
|
Have a look on this.
Link[^]
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
I have used new ATL object to do OLE DB connection,bywhich i got table.h header file,and now i want to insert data in msaccess table by using following code...can anybody help me to solve my problem can you just tell me one thing first whether this way of using to insert data is correct or not...
and what changes should i make it here to correct it
.
//BOOL m_bInserting; // addedd for database
m_TQuote.Open(); // addedd for database
m_bInserting = FALSE; // addedd for datbase
DoModal();
//GetDlgItemText(IDC_EDIT1 ,m_MainEdit);
GetDlgItemText(IDC_EDIT1,m_TQuote.m_DateTimeStamp);
GetDlgItemText(IDC_EDIT1,m_TQuote.m_MarketNo);
GetDlgItemText(IDC_EDIT1,m_TQuote.m_Bid);
GetDlgItemText(IDC_EDIT1,m_TQuote.m_MarketName);
GetDlgItemText(IDC_EDIT1,m_TQuote.m_Ask);
GetDlgItemText(IDC_EDIT1,m_TQuote.m_MarketState);
HRESULT hr = 0;
if (m_bInserting)
{
hr = m_Set.Insert(); // add new row
}
else
{
hr = m_Set.SetData(); //update row
}
m_bInserting = FALSE;
|
|
|
|
|
|
|
|
What is m_TQuote ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
CTquote is class
CTQuote m_TQote
|
|
|
|
|
So what is CTQuote ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Suppose I am receiving an OrderID defined through the following series of declarations:
typedef CHAR Array10[11];
.....
typedef Array10 OrderIDStr;
.....
OrderIDStr OrderID; <--this is the one I am working with
Now, I want a bunch of OrderID, so I make an array like this:
OrderIDStr OrderIDLadder [100];
Then I receive an newOrderID. It is declared as OrderIDStr newOrderID. I try to put it into the array like this:
OrderIDLadder[i] = newOrderID;
And the compiler says "cannot convert from 'char []' to 'char [11]'"
I think it is looking at only 1 character in OrderIDLadder[i], but I'm not sure how to declare my array to make this work. Or maybe I'm not using the subscripts correctly? I have a number of other arrays, but they are float and int, and all work OK.
Bottom line: I want to put each newOrderID into the array. Ideas???
Thanks.
|
|
|
|
|
Use the string functions to copy strings. = doesn't work for strings.
|
|
|
|
|
Thanks.
I used the following:
sprintf(OrderIDLadder[i], "%s\0", orderID);
|
|
|
|
|
i want the animation dialog of Uploading and downloading of files in my FTP client application . To achieve this do i need to have a separate thread compulsory which will show this animation and main thread is downloading / uploading the files.......
Can somebody help me in this.....
Thanks in advance
Saniaa
|
|
|
|
|
The one with the flying documents from folder to folder?
If so, it's an AVI that can be played in an animation control on a dialog.
No secondary thread necessary. Using MFC?
I have the avi if you need it as well.
Mark
|
|
|
|