|
Dhiraj kumar Saini wrote: The articles are good but not good enough to solve my problem.
Why? don't they fit to your need. You can extract the code for painting the group box background? or do you need some code that you can directly use...
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
The problem here is that the static labels which i am having as a part of the GroupBox is either appearing without their background color changed.
In some cases the static labels are hidden as the group box is being repainted.
Thanks
Dhiraj kumar Saini
|
|
|
|
|
Hi all,
i have a date in dd/mm/yyyy format .
i want to find weekday name with help of this.
please tell me how can i do this.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
COleDateTime dt("9/24/2008");
CString dayNameLong = dt.Format("%A");
CString dayNameShort = dt.Format("%a");
- S
50 cups of coffee and you know it's on!
A post a day, keeps the white coats away!
|
|
|
|
|
thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
|
One of best article on DATE and TIME understanding, i must say that!
"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>
|
|
|
|
|
i am getting a compile error while using an conversion operator which returns an list iterator. i am using visual studio 2005
code sample:
template<class t="">
class MyClass
{
public:
MyClass();
operator list<class t="">::iterator ()
{
return m_it;
}
list<class t="">::iterator m_it;
};
i am getting an error for following (when i assign the object to the iterator):
MyClass<int> myObj;
list<int>:: iterator it = myObj;
plz tell if there is any mistake in the above code.
thanks
|
|
|
|
|
the template syntax didnt appear properly in the code sample. trying to put again
|
|
|
|
|
template < class T >
class MyClass
{
public:
MyClass();
operator list <class T>::iterator ()
{
return m_it;
}
list<class T>::iterator m_it;
};
i am getting an error for following (when i assign the object to the iterator):
MyClass <int > myObj;
list <int >:: iterator it = myObj;
|
|
|
|
|
I think the operator list <class T>::iterator() should be actually define like
operator list <T>::iterator()
Also the member variable list<class T>::iterator m_it should be
list<T>::iterator m_it;
|
|
|
|
|
actually this is the first thing i had tried : it gives other compile errors.
|
|
|
|
|
I tried this in vc 6 environment. It is working fine..
What error are you getting..?
|
|
|
|
|
exactly, it works fine in vc6, but gives errors in vc2005
if i use the class keyword in the declaration then it gives: no operator found which converts from MyClass<class t=""> to iterator.
and if i do not use the class keyword then it gives : c2833 'operator qualified-name' is not a recognised operator or type.
thanks
|
|
|
|
|
I dont have the VS2005. How ever in VS 2008, I had to prefix the typename keyword to get it compiled. Try the same in VS2005.
operator typename list<T>::iterator()
{
return m_it;
}
typename list<T>::iterator m_it;
|
|
|
|
|
it really works
thank u so much
Prasann
|
|
|
|
|
Any time you use a type that is dependent on the template parameter (such as list<T>) you must preface it with the typename keyword.
|
|
|
|
|
How do I change the font style of the text in CView to the font style selected from the fontdialog?
|
|
|
|
|
LOGFONT newlf;
CFontDialog fd;
if(fd.DoModal() == IDOK)
{
fd.GetCurrentFont(&newlf);
setfont(newlf);
UpdateData(FALSE);
}
The price of anything is the amount of life you exchange for it.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
Thanks. I have used this method, font style of the text is changed but the alignment of the text is not proper. How do I ensure that the text alignment isn't changed?
|
|
|
|
|
Hi,
You can change the alignment using SetTextAlign();
pDCMem->SetTextAlign (TA_BASELINE);
The price of anything is the amount of life you exchange for it.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
i want to change background color of group box caption
in OnCtrlColor method i can change color of caption of groupbox but i want to change background color of groupbox caption
how is that possible?
|
|
|
|
|
Call pDC->SetBkColor(); also OnCtrlColor() function should return the brush with that color.
|
|
|
|
|
|
Who must be see this link? Naveen or anilaabc?
|
|
|
|