|
But to get the WM_KEYDOWN for a edit box he has to subclass the edit box.
|
|
|
|
|
Subclass the edit control and handle the WM_CHAR message.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
How do i display time and date in an application? the current time and the current date.
|
|
|
|
|
I suggest you to split this daunting task in two steps:
(1) ask the system current date and time.
(2) display the date and time values
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.
[my articles]
|
|
|
|
|
Its a real answer or a Joke!?
|
|
|
|
|
Every joke is, really, an answer.
(A bit philosophic today...)
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.
[my articles]
|
|
|
|
|
CPallini wrote: Every joke is, really, an answer.
(A bit philosophic today...)
I knew it.
Maxwell Chen
|
|
|
|
|
OMG you got it [^] too!
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.
[my articles]
|
|
|
|
|
Philosophic + vc++ forum then result=?
|
|
|
|
|
Hamid. wrote: Philosophic + vc++ forum then result=?
IF Philosophic = VC + forum THEN result="?"
But..., wait a moment..., OMG infamous VB6 code inside VC++ forum!!!!!!!!!!!!!!!!!!!
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.
[my articles]
|
|
|
|
|
Except it your code has problem where's End IF,or Maybe you want to make a new language (Composite of Vc++ and VB=VBC++ ).
|
|
|
|
|
Hamid. wrote: Except it your code has problem
You're wrong, see
http://msdn2.microsoft.com/en-us/library/aa243382(VS.60).aspx[^]
Hamid. wrote: Maybe you want to make a new language (Composite of Vc++ and VB=VBC++ ).
OMG this hybrid is even worse than a shoggoth!
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.
[my articles]
|
|
|
|
|
But its correct:
Sub num()
Dim a As Integer
a = 2
If a = 2 Then
End If
End Sub
|
|
|
|
|
Hamid. wrote: Its a real answer or a Joke!?
Both.
Maxwell Chen
|
|
|
|
|
I saw he selected Joke Icon but his answer was correct ask of system and display values!
|
|
|
|
|
1. You have to set a timer. (If you need to show the second then ellapsed time should be less than 1 sec)
2. In the OnTimer function you can call InvalidateRect.
3. In the OnPaint get the current time using COleDateTime::GetCurrentTime, format and draw it to the DC.
|
|
|
|
|
See
CFileTime m_Time;
m_Time = CFileTime::GetCurrentTime();
|
|
|
|
|
did it by using CCustomTime
<br />
CString strTime = CCustomTime::GetCurrentTimeString();<br />
CString str, str1;<br />
str.Format(" Date and Time:%s ", strTime); <br />
MessageBox(str);<br />
the format will be 01/08/2008 16:13:25:715.
will be helpful for somebody also who is looking out for date and time related queries.
thanks for the help guys.
|
|
|
|
|
Chandrasekharanp wrote: CString strTime = CCustomTime::GetCurrentTimeString();
CString str, str1;
str.Format(" Date and Time:%s ", strTime);
MessageBox(str);
Is str1 declared for solidarity with str ?
(Just kidding, pardon... )
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.
[my articles]
|
|
|
|
|
hey that was a mistake.. pardon me..
|
|
|
|
|
Oh no, not a mistake, it was merely a minor defect.
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.
[my articles]
|
|
|
|
|
Chandrasekharanp wrote: How do i display time and date in an application?
In the same way you would display anything else. If it's a GUI application, most controls support the WM_SETTEXT message. If it's a console application, check out cout or printf() .
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi guys. I am using Form View and trying to draw on a dialog box that is a child of the form view. I realized that it does not have a virtual function i can override unlike In CView. Please help.
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
Can't you implement the Dialog WM_PAINT message handler (OnPaint )?
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.
[my articles]
|
|
|
|
|
Thanks. I had not thought of that. But first let me view you article!!
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|