|
i have noticed one more thing.
this problem is not occur in case of .avi files.
|
|
|
|
|
I never used mci for playing files, what about directshow or WMP activeX control.
|
|
|
|
|
i need the coding to implement dijkstra algorithm in vc++.......
|
|
|
|
|
Is this your homework?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
|
Nice
|
|
|
|
|
|
Rajkumar R wrote: And I found a good prerequisite [^] recently.
You liked that?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Not Sure, But I don't have reason to dislike it.
|
|
|
|
|
Did you search on the Net?
|
|
|
|
|
Good Luck!
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hi all...
How can i change only day of week on button click??
I'm using DateTimePicker and in long date format i'm printing day with the help of "dddd"... How can i change day on button click??
i.e Increment by one day...
SendMessage(GetDlgItem(hdlg,IDC_DATETIMEPICKER6),DTM_SETFORMAT,(WPARAM) wParam,(LPARAM) (LPCTSTR) lpszFormat3);
and in "lpszFormat3" i'm writing this..
CHAR lpszFormat3[MAX_PATH] = "HH':'mm 'every'dddd";
I need to change "dddd" on button click...
How can i do this??
Thanks..
Ash..
|
|
|
|
|
Hi there,
Ashish Chauhan wrote: IDC_DATETIMEPICKER6),DTM_SETFORMAT,(WPARAM
Why are you sending a SetFormat() message to set the date/time? Have you tried something as simple as having a member variable to the control and then calling SetTime() ?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
I need to show custom format of date and time..
Date and time with some string..That's why using DTM_SETFORMAT..
Is their any other way to do that??
Ash..
|
|
|
|
|
In your previous message, you stated that you need to just increment the day by one. You didn't say about date/time format. Are you having a trouble setting the format or changing the date/time?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
I successfully managed to setting the format.. Actually i took 5 to 6 DateTimePicker..All for different purpose..
This one is printing "02:36 Every Tuesday"
The first one is time and last one is Day and "Every" is string.. On button click i need to change Tuesday to Wednesday then if i click one more time then Wednesday to thursday and so on...
Ash..
|
|
|
|
|
Can you try SetTime()[^]?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
BTW it's Non MFC Application.
Ash..
|
|
|
|
|
Ashish Chauhan wrote: BTW it's Non MFC Application.
OK. I get it now. Have you tried the DateTime_SetSystemtime macro?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Thanks Rajesh..
SystemTime Works... Manage to manipulate day of week...
But how to print the changed day in DateTimePicker??
I mean if today is tuesday i can change it to wednesday with the help of
SYSTEMTIME st;
GetSystemTime(&st);
st.wDayofWeek += 1;
After that it increment the day. But when i try to print the result on DateTimePicker using DTM_SETFORMAT it doesn't reflect...
What could be the problem??
Ash..
|
|
|
|
|
And when i apply the code below on button click it changes time only not day of week. Also i'm not doing manipulating time as well..
Case IDC_BUTTON1:
{
st.wDayOfWeek += 1;
BOOL a =DateTime_SetSystemtime(GetDlgItem(hdlg,IDC_DATETIMEPICKER6),GDT_VALID, &st);
TCHAR lpszFormat3[MAX_PATH] = "hh':'mm 'every' dddd";
SendMessage(GetDlgItem(hdlg,IDC_DATETIMEPICKER6),DTM_SETFORMAT,(WPARAM) wParam,(LPARAM) (LPCTSTR) lpszFormat3);
}
Ash..
modified on Tuesday, March 11, 2008 9:00 AM
|
|
|
|
|
Please try this code and tell me if it helped.
void NextDayOfWeek(const SYSTEMTIME& st, SYSTEMTIME *calculatedTime)
{
FILETIME ft;
SystemTimeToFileTime(&st, &ft);
ULARGE_INTEGER nenoSeconds, nenoseconds_in_a_day;;
nenoseconds_in_a_day.QuadPart = 24*60*60*1000;
nenoseconds_in_a_day.QuadPart *= 10000;
nenoSeconds.HighPart= ft.dwHighDateTime;
nenoSeconds.LowPart= ft.dwLowDateTime;
nenoSeconds.QuadPart += nenoseconds_in_a_day.QuadPart;
ft.dwHighDateTime = nenoSeconds.HighPart;
ft.dwLowDateTime = nenoSeconds.LowPart;
FileTimeToSystemTime(&ft, calculatedTime);
}
case IDC_BUTTON1:
{
SYSTEMTIME myTime, ans;
HWND hdt;
GetDlgItem(IDC_DATETIMEPICKER6, &hdt);
if(DateTime_GetSystemtime(hdt, &myTime) == GDT_VALID)
{
NextDayOfWeek(myTime, &ans);
::SendMessage(hdt, (UINT)DTM_SETSYSTEMTIME, (WPARAM)(DWORD)GDT_VALID, (LPARAM)(LPSYSTEMTIME)&ans);
}
}
I'd also suggest you read a little bit about FILETIME on MSDN.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hi..
Thanks Rajesh...Code works..
Thanks a ton...
I'm actually new in this...Anyways you mind telling me the calculation?
I mean i'm bit confused in quadpart, Lowpart, Highpart..
Gone through MSDN but still confused...
How did you calculate the next day.
Thanks Again..
Ash..
|
|
|
|
|
To manipulate time as a long integer, we need to convert it to FILETIME . ULARGE_INTEGER[^] is an union, defined in Winnt.h . This data structure can store a 64 bit unsigned integer. This data structure has a Low part (the low order 32 bits) and a High part (the high order 32 bits), whereas the Quadpart will be the unsigned 64 bit integer itself. I take up the high and low order bits from the SYSTEMTIME variable passed on to this function and assign it to the ULARGE_INTEGER variable. And then I calculate the no. of nano seconds in a day (24 hours, 60 minutes, 60 seconds, 1000 milliseconds, 10000 nanoseconds). Then, I add it up to the Quadpart of the ULARGE_INTEGER variable, nenoSeconds. This way, we've incremented one day of the week. Assign it back to SYSTEMTIME variable, and convert it back to SYSTEMTIME from FILETIME . Look at the code simultaneously and you will understand it.
Original idea - Credits to Rehan Nadeem[^]
MSDN - FILETIME[^]
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Alright Cool...
Got it..
One more problem..I'm using property sheet for tab control..There are 3 tabs(Property pages) in my property sheet..
How can position my property sheet at the center of the screen. I tried with SetWindowPos but couldn't succeed..Cause i'm not sure about the handle of propertysheet.
Can you help me in that??
Ash..
|
|
|
|