Re: VC++ Cursor mask problem on windows vista



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!

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
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: Transparent PNG
    ... Until I decided I wanted to show the mouse cursor. ... I got a screenshot ... Viewing the PNG standalone in Firefox ... the transparent part doesn't show up. ...
    (comp.text.tex)
  • Re: Transparent PNG
    ... Until I decided I wanted to show the mouse cursor. ... Viewing the PNG standalone in Firefox ... the transparent part doesn't show up. ... PostScript certainly does not. ...
    (comp.text.tex)
  • Screenshot with mouse cursor (was: Transparent PNG)
    ... Viewing the PNG standalone in Firefox ... the transparent part doesn't show up. ... creating screenshots including the mouse cursor. ...
    (comp.text.tex)
  • Re: CellRendererPane causes cursor flickering during drag and drop
    ... finally managed to isolate the problem. ... I have compiled the program and run it on Windows Vista on an Acer ... integrated Video card. ... then erased as you move the cursor. ...
    (comp.lang.java.gui)
  • Re: Keeping cursor visible while holding down space bar in Word
    ... For Windows Vista the 'Ease of Access Center' has separated the size of cursor and cursor blink rate into separate dialogs. ... 'Make the Keyboard Easier to use=>Keyboard Settings. ...
    (microsoft.public.word.newusers)