|
Are you sure OnDestroy isn't called?
How do you 'close' the window?
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
[My articles]
|
|
|
|
|
I find the answer by trial and error
PostNcDestroy is called when a non modal page is closed.
Thank you for your help.
|
|
|
|
|
The CWnd::OnDestroy() should be called as per documentation.
Extract from MSDN : "This method is called by the framework to inform the CWnd object that it is being destroyed. OnDestroy is called after the CWnd object is removed from the screen."
I guess, something went wrong when you add your message handler for WM_DESTROY . Try once again by adding WM_DESTROY message handler by using class wizard.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Gut Mikh Tappe wrote: I test following Items and dont get answer
Did you add entries to the window class' message map so
those methods would actually get called?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I am using mfc to develop a dialog based application and want to change the color of static text
labels to from blue to red.
How to do it.
Thanks.
Dhiraj kumar Saini
modified on Monday, August 25, 2008 8:06 AM
|
|
|
|
|
Handle the WM_CTLCOLORSTATIC message. Check here[^] for code snippet.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hi,
I am using MFC and not win32.
Thanks
Dhiraj Kumar Saini
|
|
|
|
|
Dhiraj kumar Saini wrote: I am using MFC and not win32.
gr8, and mfc is just a wrapper over win32.
In OnCtlColor of your class do this
if(pWnd->GetDlgCtrlID ()==IDC_STATIC1)
{
pDC->SetTextColor(RGB(255,0,0));
}
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
MFC is a wrapper framework over win32 api to make our life easier. Well, you could add ON_WM_CTLCOLOR() in you message map and implement afx_msg HBRUSH OnCtlColor( CDC*, CWnd*, UINT );
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hi,
Try like this...
HBRUSH CDialog::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if( pWnd->GetDlgCtrlID() == IDC_STATIC1)
{
hbr = CreateSolidBrush(RGB(240, 240, 240));
return hbr;
}
return hbr;
}
The price of anything is the amount of life you exchange for it.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
Dhiraj kumar Saini wrote: I am using MFC and not win32.
Unfortunately MFC does use Win32 . Are you lost now?
BTW have a look at [^].
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
[My articles]
|
|
|
|
|
hi,
Actually my static label text value is being set during run time so its background becomes white and not tranparent using SetBkMode.
What to do.
Thanks
Dhiraj Kumar Saini
|
|
|
|
|
See the Extras section of this article. It changes the text to bold, but using color instead is a trivial matter.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hello,
I am planning to write a dialog-based application that behaves similar to the microsoft installer, i.e. I will have to display several pages of information where the user can read text, and make some desicions using several controls. Each time the user presses the "Next" button in my app, he will be presented a new dialog-page with new information and new controls. Optionally, the user can press the "Previous" button to step back one page.
My question now is very simple: what is - technically - the best way to create this kind of application using MFC. I have already thought about having various dialog windows, which are controlled from within my "App" class. Another possibility would be to have all controls of all available pages in only one dialog resource, and make only the ones visible that are required in a certain step, and hide all the other ones.
I don't like either way, since there are disadvantages, so I am asking for your oppinion: how would you create this app?
Thanks alot.
|
|
|
|
|
CPropertySheet[^] will be the best choice. Look here[^]and here[^] about how to use it.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
modified on Monday, August 25, 2008 8:14 AM
|
|
|
|
|
Hi All
I want to develop a utility which have information about All file/folder copy and past.See i havn't know from which drive file is copy/past but when action is perform then show a message like that(source full path name with file name and destination full path name with file name).Plz help me ..
Thanks in Advance
singh
|
|
|
|
|
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Rajesh R Subramanian wrote: .·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
MVP's are not allowed to confuse... they should go directly into person soul for reteriving the answer
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
Sorry brother, I'm a new award winner. I'll try harder to be more MVPish next time.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
You need more information..
singh
|
|
|
|
|
Nope. He only needs to charge up his CPMRU's batteries.
BTW What about reading the forum posting guidelines?
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
[My articles]
|
|
|
|
|
Rajesh R Subramanian wrote: .·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
MVP's are not allowed to confuse... they should go directly into person soul for reteriving the question
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
Hey Alok, don't torture too much the poor MVP newbie : you already posted such a note (Or was it the OP's title?).
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
[My articles]
|
|
|
|
|
Plz some atten my question also..
|
|
|
|
|
Your? Have you changed identity? If your question is the same of polopo then you have to elaborate it a bit unless you want no replies.
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
[My articles]
|
|
|
|