|
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...
|
|
|
|
|
Take help of
UpdateData(FALSE);
I think thats only missing in ur code...
Have good luck...!
Jagdish Bhimbha
S/W Engineer
|
|
|
|
|
kildareflare wrote: I have solved problem (1) by overriding the base class (CFormView) OnDraw method and calling UpdateWindow as shown below:
This shouldn't fix anything. OnDraw() is called for every WM_PAINT message
so calling UpdateWindow() to force a WM_PAINT message from the WM_PAINT
message handler is just wrong.
If you are using both WM_PAINT handlers and OnDraw() in your CView-derived classes,
then make sure you're not doing recursive stuff like this.
It's much simpler to use just the OnDraw() method for your painting.
If you must use your own WM_PAINT handler, then you can eliminate the OnDraw()
virtual call if you need to.
See the source code for CView::OnPaint() for details.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello All
I've found the solution to the problem, thoug not sure exactly why.
Since the "explorer" view allways drew itself correctly when the application is first started and also when resizing the view I guessed that one difference is that the problem occurs when trying to update the view while it is not in focus - i.e. minimized.
Figuring that there must be something different in the two scenarios I checked the InitialiseTreeCtrl method. The only extra code completed here that was not called when the window was minimized was a call to destroy and then recreate the control.
I found that I needed to call the above function prior to calling setFocus() and UpdateWindow(). This appears to resolve the problem.
I have moved the calls to SetFocus and UpdateWindow from the overriden OnDraw method to my mainFrames Move method, since this is called when the window is minimized/maximized.
So the code required to fix this is below:
workspacewindow is derived from CSizingTabCtrlBar
After getting a pointer to the view on which the explorer window lies I have to:
1) Initialize the tree (destroy it and creat again, resize as appropriate and assign image list)
2) Update the tree (insert items from list, expand and ensure visibile)
3) Invalidate ctrl
4) Give the view and so control focus
5) Update the window
void CMainFrame::OnMove(int x, int y)
{
CWorkspaceWindowTab2View* pWorkspaceTab2View = (CWorkspaceWindowTab2View*)((CMainFrame*)theApp.m_pMainWnd)->m_pWorkspaceWindow->GetView(EXPLORER_VIEW);
pWorkspaceTab2View->InitializeLoopBrowserTree();
pWorkspaceTab2View->UpdateLoopBrowserTree();
pWorkspaceTab2View->GetDlgItem(IDC_LOOPS_TREE)->Invalidate(TRUE);
pWorkspaceTab2View->SetFocus();
pWorkspaceTab2View->UpdateWindow();
}
Although, I have just noticed that occasionly when changing views using the tabcontrol this view is not updated. I can "fix" this also by placing a call to the InitialiseTreeCtrl method in the CSizingTabCtrlBar::SetActiveView method, however this of course breaks a few rules...any other suggetions...?
Thanks
Rich
modified on Wednesday, June 11, 2008 8:29 AM
|
|
|
|