On Jul 22, 7:04 am, Joseph M. Newcomer <newco...@flounder.com> wrote:
OnMouseMove events. Subclass the edit control.
Note that your question deals with whether or not tool tips are enabled. You have not
shown you you enable tooltips. And I'm a little suspicious of what you might be doing in
PreTranslateMessage.
joe
On Fri, 20 Jul 2007 09:26:19 -0700, przemyslaw.sl...@gazeta.pl wrote:
What message is posted when moving mouse over CEdit?
I would like to implament a tooltio which is displayed when the mouse
is moved over a control derived of CEdit. Therefore I would like to
ask you if someone know what message I have to capture in order to
call my finction displayinn the tooltip? Can someone help?
And perhaps someone knows what should be done to enable tooltips for
controls derived of CEdit? I have a dialog and implement the following
method:
BOOL COptionPricingFooterForm::OnToolTipNotify(UINT id, NMHDR *pNMHDR,
LRESULT *pResult)
everything works fine as long as my memebers are of type CEdit.
However, when I swich to CColourEdit, which is implemented in the
following way:
class CColourEdit : public CEdit
{
DECLARE_DYNAMIC(CColourEdit)
public:
static eRGBColour GoodColour;
static eRGBColour WrongColour;
*****
Why are these static? Is it your intent that every control display the same color?
******
CColourEdit();
virtual ~CColourEdit();
void SetBkColor(COLORREF crColor);
void SetTextColor(COLORREF crColor);
BOOL SetReadOnly(BOOL flag = TRUE);
COLORREF GetBkColor() const;
COLORREF GetTextColor() const;
void MarkAsGood();
void MarkAsWrong();
void AdjustColor(double dval);
BOOL OnToolTipNotify(UINT id, NMHDR *pNMHDR, LRESULT *pResult);
protected:
CBrush m_brBkgnd; // Holds Brush Color for the Edit Box
COLORREF m_crBkColor; // Holds the Background Color for the Text
COLORREF m_crTextColor; // Holds the Color for the Text
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
*****
Do you really need PreTranslateMessage here? I get nervous when I see this, because it is
a rather abused function, being used incorrectly in most cases.
****> afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
DECLARE_MESSAGE_MAP()
};
The tooltip no longer works.
Could someone help me with this???
Cheers
Joseph M. Newcomer [MVP]
email: newco...@flounder.com
Web:http://www.flounder.com
MVP Tips:http://www.flounder.com/mvp_tips.htm
I have found the problem - thanks for help guys. Strangelly, when I
class. That's is really weird.