|
No wonder: I'm a man.
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
|
|
|
|
|
You can use COleDateTime::SetDate() . Check the return value to check whether the date is wrong. For instance, in your leap year checking case,
COleDateTime DateTime;
if( 0 == DateTime.SetDate( 2007, 2, 29 ))
{
}
if( 0 == DateTime.SetDate( 2008, 2, 29 ))
{
}
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Something wrong in it?
Might not be the best, but its just a different method. Please correct me if I'm wrong.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Got my five to balance a bit.
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
|
|
|
|
|
Thanks buddy! Now I'll tell one secret. Just few hrs back I've also done the same for your - http://www.codeproject.com/script/Forums/View.aspx?fid=1647&msg=2588613[^]
BTW, I think we need one optional field to tell the reason, "whats wrong in it" while marking negative. I'm always open to critic, since mistakes are just human. But here how can we correct and improve ourself without knowing the reason? Pallini, what's your opinion?
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Jijo raj wrote: Thanks buddy! [Big Grin] Now I'll tell one secret. Just few hrs back I've also done the same for your - http://www.codeproject.com/script/Forums/View.aspx?fid=1647&msg=2588613[^]
Thanks.
Jijo raj wrote: BTW, I think we need one optional field to tell the reason, "whats wrong in it" while marking negative. I'm always open to critic, since mistakes are just human. But here how can we correct and improve ourself without knowing the reason? Pallini, what's your opinion?
IMHO people voting down has the moral duty to motivate it (and you have pointerd out why). I often ranted about down-voting-without-reply (got no results, of course).
I think, no matter what we can do, the battle against trolls is a lost one, my friend.
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
|
|
|
|
|
CPallini wrote: I think, no matter what we can do, the battle against trolls is a lost one, my friend.
[Frown]
Very true.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
5 for inventiveness, 1 because I'd never want one of my programmers to use it!
Graham
Librarians rule, Ook!
|
|
|
|
|
ThatsMe. wrote: Feburary is Leap year or not
Because February can never be a leap year, not even a year for that matter.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
|
i have set my default page as www.google.com whenever. i wanted to know where the history for search gets stored.
how can i delete this history programatically.
|
|
|
|
|
Hi,
I need to implement FTP server in my project to keep track of the images sent by the surveillane camera.how to do it?
|
|
|
|
|
|
A program that will prompt the user to enter the
numerical grade, converts the numerical grade
to a letter grade, and displays the letter grade as
shown in the table:
NUMERICAL GRADE LETTER GRADE
greater than or equal to 95 A+
Less than 95 but greater than or equal 90 A
Less than 90 but greater than or equal 85 B+
Less than 85 but greater than or equal 80 B
Less than 80 but greater than or equal 75 C+
Less than 75 but greater than or equal 70 C
Less than 70 but greater than or equal 60 D
Less than 60 F
|
|
|
|
|
Post what you have already done and we will correct it. We do not do your homework for you.
|
|
|
|
|
You forgot to say it was URGENT PLZZZZZZ !!11!!!1
|
|
|
|
|
You posted the same yesterday. What part of "We won't do your homework" don't you understand?
|
|
|
|
|
guess what :
Rating now 1 (votes: 3). Message reported as abuse
we don't do homeworks, and we don't pee code on demand.
ask your classmates who heard at the teacher when you where drawing on your paper.
also, i believe in your case, it's worth it reading this[^]
modified on Tuesday, June 10, 2008 7:33 AM
|
|
|
|
|
I hate mondays .... yeah, monday's posts on tuesday mornings....
This signature was proudly tested on animals.
|
|
|
|
|
Try @
www.rentacoder.com
www.getfreelancer.com
www.getacoder.com
etc... If still unable then directly contact me...
Good luck...
Jagdish Bhimbha
S/W Engineer
|
|
|
|
|
Hello
I've searched google and MSDN but cannot search the forums here yet as it keeps timing out. I've managed to improve my problem butnot completely resolve it.
My application is divided into 3 panes (left, right and bottom). In one of them is a window derived from CSizingTabCtrlBar. This has 3 tab views assigned to it.
One of these tab views uses a CTreeCtrlDnD object and so looks like an explorer window.
The problem was two fold:
1) If I opened a modal dialog that happened to obscure part of this window and then closed it again, the part of the underlying window that was hidden was not redrawn. It would be redrawn if I toggled the view however.
2) If I minimize / maximize the application then the explorer view is greyed out. This occurs no matter what view (of the 3 tabbed views) is active at the time that the application is minimized. I.e. so even if the the "explorer" view is not active and hidden under one of the other tabbed views, if I minimize and maximize the application then select the "exploer" view it is greyed out. Again, if I cycle the views using the tabs it is redrawn correctly.(Also, I sometimes need to cycle views twice).
Through using the debugger I know that the relevant OnDraw and OnPaint messages are being called and so I guess the WM_PAINT message is being sent as expected. (I tried using Spy++ to confrim message is being sent but it keeps crashing)
I have solved problem (1) by overriding the base class (CFormView) OnDraw method and calling UpdateWindow as shown below:
void CWorkspaceWindowTab2View::OnDraw(CDC *pDC)
{
this->UpdateWindow();
CView::OnDraw(pDC);
}
However, even though the program is entering this OnDraw method when I minimize/maximize the application the explorer view (CWorkspaceWindowTab2View) is not being redrawn.
Any ideas?
Thanks in advance
Rich
modified on Tuesday, June 10, 2008 6:36 AM
|
|
|
|
|
kildareflare wrote: the part of the underlying window that was hidden was not redrawn
Maybe you could send a Redraw message to that view when closing your dialog ?
kildareflare wrote: the explorer view is greyed out
Do you mean "disabled", or simply filled with grey color ?
|
|
|
|
|
Hello, I mean that the view is filled with grey colour. Occasionally, one the root item of the tree will also be displayed, with everything else grey.
As it happens there is no longer a problem when closing the dialog. that was fixed when i overode the base class OnDraw function.
The problem that remains is when the application is minimized and then maximized again....
|
|
|
|
|
It looks like the drawing stuff is not done in the OnPaint method but somewhere else in the code. It means that the redrawing is not handled properly.
Did you write the code yourself ?
|
|
|
|
|
Hi Cedric
I wrote some of the code myself, some i inherited and the rest is standard MFC stuff.
The application only contains dialogs and buttons etc there are no user defined images etc that required customised drawing methods. With the exception of the problem listed the default base class methods (CView) handle the redrawing of all items correctly.
while you may be correct that OnPaint is not doing the drawing whatever is doing it is part of the MFC and so one would imagine that would work OK, right?
I initially thought the problem was that for some reason the window was not receiving a WM_PAINT message. However since the program allways breaks at the OnDraw methodit must be....
I have completed some more testing and have the following to add...
When the app is first opened this problem does not occur.
If i then do anything that causes the explorer view ot refresh (Correctly) add an item to the explorer view for example. The problem is now present until the application is restarted...
|
|
|
|