Click here to Skip to main content
16,006,355 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: FilePointer for reading/writing Pin
Blake Miller31-Aug-05 5:07
Blake Miller31-Aug-05 5:07 
AnswerRe: FilePointer for reading/writing Pin
John R. Shaw30-Aug-05 13:33
John R. Shaw30-Aug-05 13:33 
AnswerRe: FilePointer for reading/writing Pin
cmk30-Aug-05 18:34
cmk30-Aug-05 18:34 
AnswerRe: FilePointer for reading/writing Pin
normanS30-Aug-05 19:40
normanS30-Aug-05 19:40 
QuestionIdle state on a Dialog based App! Pin
Hachaso30-Aug-05 9:24
Hachaso30-Aug-05 9:24 
AnswerRe: Idle state on a Dialog based App! Pin
Ravi Bhavnani30-Aug-05 9:45
professionalRavi Bhavnani30-Aug-05 9:45 
AnswerRe: Idle state on a Dialog based App! Pin
PJ Arends30-Aug-05 10:53
professionalPJ Arends30-Aug-05 10:53 
Questionchange window region on mouse over Pin
funkaster30-Aug-05 8:30
funkaster30-Aug-05 8:30 
Hi all,
I'm using CTaskbarNotifier (found it here) to display a popup. It works just fine, but now I want it to change it's shape when the mouse is over.
I added a m_biHoverSkinBackground member variable, and it's corresponding with and height properties.
I modified the OnMouseHover function, like this:

LRESULT CTaskbarNotifier::OnMouseLeave(WPARAM w, LPARAM l)
{
	if (m_bMouseIsOver==TRUE)
	{
		m_bMouseIsOver=FALSE;
		RedrawWindow();
	}
	return 0;
}


The OnMouseLeave function was also modified. and in the OnEraseBkgnd function I added this:

if (m_bMouseIsOver)
{
    SetWindowRgn(m_hHoverSkinRegion, true);
    GetObject(m_biHoverSkinBackground.GetSafeHandle(), sizeof(bm), &bm);
    pOldBitmap=memDC.SelectObject(&m_biHoverSkinBackground);
}
else
{
    SetWindowRgn(m_hSkinRegion, true);
    GetObject(m_biSkinBackground.GetSafeHandle(), sizeof(bm), &bm);
    pOldBitmap=memDC.SelectObject(&m_biSkinBackground);
}


I also changed the code so that where it asks for the skin width/height, it gets the current skin width/height (depends if the mouse is over or not).

The problem is that it works when the mouse is over: the region and bitmap changes, but when the mouse goes out, the bitmap changes but not the region, it stays with the "mouse-over" region...
can anyone give me a hint why it's not working as it should?
thanks a lot!
QuestionLinker error LNK2001 Pin
fenixk1930-Aug-05 7:40
fenixk1930-Aug-05 7:40 
AnswerRe: Linker error LNK2001 Pin
Mohammad A Gdeisat30-Aug-05 8:02
Mohammad A Gdeisat30-Aug-05 8:02 
QuestionHow to Use SetFocus() ? Pin
MacKrish30-Aug-05 7:39
MacKrish30-Aug-05 7:39 
AnswerRe: How to Use SetFocus() ? Pin
Ravi Bhavnani30-Aug-05 8:52
professionalRavi Bhavnani30-Aug-05 8:52 
GeneralRe: How to Use SetFocus() ? Pin
Amarelia30-Aug-05 22:29
Amarelia30-Aug-05 22:29 
GeneralRe: How to Use SetFocus() ? Pin
Ravi Bhavnani31-Aug-05 1:40
professionalRavi Bhavnani31-Aug-05 1:40 
QuestionOver-riding ToolTip Text in an CSliderCtrl Pin
sharpanil30-Aug-05 7:39
sharpanil30-Aug-05 7:39 
Questionerror using #pragma pack(...) Pin
wookie18230-Aug-05 6:53
wookie18230-Aug-05 6:53 
AnswerRe: error using #pragma pack(...) Pin
Rick York30-Aug-05 14:21
mveRick York30-Aug-05 14:21 
AnswerRe: error using #pragma pack(...) Pin
Jose Lamas Rios30-Aug-05 18:22
Jose Lamas Rios30-Aug-05 18:22 
QuestionRegistering controls using code Pin
Tom Wright30-Aug-05 6:39
Tom Wright30-Aug-05 6:39 
QuestionSendInput Problem Pin
Mohammad A Gdeisat30-Aug-05 6:18
Mohammad A Gdeisat30-Aug-05 6:18 
AnswerRe: SendInput Problem Pin
Rage30-Aug-05 7:05
professionalRage30-Aug-05 7:05 
GeneralRe: SendInput Problem Pin
Mohammad A Gdeisat30-Aug-05 7:51
Mohammad A Gdeisat30-Aug-05 7:51 
AnswerRe: SendInput Problem Pin
Jose Lamas Rios30-Aug-05 8:54
Jose Lamas Rios30-Aug-05 8:54 
GeneralRe: SendInput Problem Pin
Mohammad A Gdeisat30-Aug-05 10:22
Mohammad A Gdeisat30-Aug-05 10:22 
GeneralRe: SendInput Problem Pin
Jose Lamas Rios30-Aug-05 18:13
Jose Lamas Rios30-Aug-05 18:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.