Re: VC++ Cursor mask problem on windows vista
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Wed, 10 Oct 2007 10:06:42 -0400
A cursor does not have a "green mask". A cursor has a mask, which is portrayed in an odd
green color by the editor, but it isn't itself a green mask.
By the way, you would write the load as
AfxGetApp()->LoadCursor(IDC_CURSOR1)
You should change names from the useless names like IDC_CURSOR1 to something meaningful.
What is the color depth of your cursor? How many alternative cursor sizes and color
depths do you have?
joe
On Wed, 10 Oct 2007 06:28:09 -0700, Ronen Yacov <rdiment@xxxxxxxxx> wrote:
Hi Guys!Joseph M. Newcomer [MVP]
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'ss image (It is not transparent any more).
Do you know how to solve this (So the margin will be transparent on
vista)
Thanks,
Ron
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- References:
- VC++ Cursor mask problem on windows vista
- From: Ronen Yacov
- VC++ Cursor mask problem on windows vista
- Prev by Date: Re: Add timer to a dll
- Next by Date: CStatic and painting problems : bis
- Previous by thread: VC++ Cursor mask problem on windows vista
- Next by thread: CStatic and painting problems : bis
- Index(es):
Relevant Pages
|