|
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.
|
|
|
|
|
Wamuti wrote: Thanks. I had not thought of that. But first let me view you article!!
Thanks, Have a look also at Libor's one [^](there algo implementation is cleaner).
Wamuti wrote: Wamuti: Any man can be an island, but islands to need water around them!
shouldn't be too, should it?
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]
|
|
|
|
|
Hello everyone,
I am using perfmon to watch the working set and virtual bytes, when I do a keyword search in SourceInsight.
I found the value of working set is larger than virtual bytes when do a search, I am confused how could working set larger than virtual bytes? I have this confusion is virtual bytes is all things -- reserved, committed memory -- which includes RAM (working set) and page swap file. So, virtual bytes should be always larger than working set.
BTW: I watched that private bytes is always lower than virtual bytes when do the search.
thanks in advance,
George
|
|
|
|
|
Sometimes pages are left in the Working Set of a process even if they are not in use, hence the number might be larger than the process' virtual address space.
"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
|
|
|
|
|
Thanks DavidCrow, great!
Your reply is great! I have made some self-study as well. The following MSDN page describes the situation when the unused pages are put on system standby list if the system has enough free memory, I think this is one of the situations when it will make the working set larger than virtual memory?
Do you agree? Any comments about my new findings?
This new case is mentioned here,
http://support.microsoft.com/kb/108449/en-us
--------------------
Process pages that are paged out of your process space are moved into the "standby list," where they remain until sufficient free RAM is available, or until system memory is low and they need to be reused. If these pages are accessed by your process while they are still on the standby list and more RAM has become available, they will be "soft-faulted" back into the working set. This does not require any disk access, so it is very quick. Therefore, even though you have an upper limit to the size of your working set, you can still have quite a few process pages in memory that can be pulled back into your working set very quickly.
--------------------
regards,
George
|
|
|
|
|
Are you asking whether I agree with you, or an article on MSDN? I realize that MSDN and its authors are not infallible, but why constantly ask if we, a small set of CP developers, agree with it? Whether we do or not is irrelevant.
"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
|
|
|
|
|
My mistake not making myself understood.
I mean whether you think my understanding of the MSDN article is correct...
regards,
George
|
|
|
|
|
Hi,
I have a multi-icon resource which has a bunch of different icons within it:
resource id: IDI_MYICON
16x16 (16 colours, 24-bit, and 32-bit)
32x32 (16 colours, 24-bit, and 32-bit)
48x48 (16 colours, 24-bit, and 32-bit)
'LoadIcon' takes a 'BOOL' which can be used to select big or small. How can I load the 48x48 icon at the best possible quality which can be drawn to a window?
Cheers,
Lea Hayes
|
|
|
|
|
Have you tried LoadImage?
modified on Thursday, January 10, 2008 4:24:50 AM
Sample:
HICON hIcon = (HICON) LoadImage( AfxGetInstanceHandle(), MAKEINTRESOURCE( IDI_ICON1 ), IMAGE_ICON, 48, 48, 0 );
DrawIconEx( dc.m_hDC, 0, 0, hIcon, 0, 0, 0, 0, DI_NORMAL );
DestroyIcon( hIcon );
|
|
|
|