Subject: VC++ Cursor mask problem on windows vista

R

Ronen Yacov

Hi Guys!

I've built a test application in VC++ 6.0 which runs on windows XP.
It is a just a simple mfc dialog app, which changes the cursor image
using cur file.

The code is:

BOOL CProjectDlg::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT
message)
{
// TODO: Add your message handler code here and/or call default

m_hCurPenBlue = LoadCursor(AfxGetResourceHandle(),
MAKEINTRESOURCE(IDC_CURSOR1));
::SetCursor(m_hCurPenBlue);
return TRUE;
}


The image is composed of a green mask, transparent on XP.

While in XP the cursor has transparency over the dialog, running the
same application in windows vista creates a black rectangle
surrounding the cursor's image (It is not transparent any more).

Do you know how to solve this (So the margin will be transparent on
vista)

Thanks,
Ron
 
R

red floyd

Ronen said:
Hi Guys!

I've built a test application in VC++ 6.0 which runs on windows XP.
It is a just a simple mfc dialog app, which changes the cursor image
using cur file.

The code is:

BOOL CProjectDlg::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT
message)
{
// TODO: Add your message handler code here and/or call default

m_hCurPenBlue = LoadCursor(AfxGetResourceHandle(),
MAKEINTRESOURCE(IDC_CURSOR1));
::SetCursor(m_hCurPenBlue);
return TRUE;
}


The image is composed of a green mask, transparent on XP.

While in XP the cursor has transparency over the dialog, running the
same application in windows vista creates a black rectangle
surrounding the cursor's image (It is not transparent any more).

Do you know how to solve this (So the margin will be transparent on
vista)

I'm afraid you are asking in the wrong group. This is a Windows
specific question (the actual language you are using to call the Windows
API is irrelevant).

Please post in a newsgroup with microsoft or windows in its name instead.

Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,000
Messages
2,570,252
Members
46,848
Latest member
CristineKo

Latest Threads

Top