Solved

set cursor size to 64*64

Posted on 2002-05-30
6
742 Views
Last Modified: 2013-11-20
mouse cursor is of size of 32*32,can i change it to 64*64?
how to do ?
waiting
thanks
0
Comment
Question by:kickdog
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 8

Accepted Solution

by:
fl0yd earned 75 total points
ID: 7046787
The problem here is that your actual display hardware is responsible for drawing the cursor, thus the hardware must support the appropriate size. Use GetSystemMetrics with SM_CXCURSOR and SM_CYCURSOR to retrieve the size supported by the hardware. The MSDN about GetSystemMetrics:
"Width and height, in pixels, of a cursor. The system cannot create cursors of other sizes."
However, the MSDN says about SetCursor:
"Windows 95: The width and height of the cursor must be the values returned by the GetSystemMetrics function for SM_CXCURSOR and SM_CYCURSOR. In addition, either the cursor bit depth must match the bit depth of the display or the cursor must be monochrome."
So this sounds a lot like you could create a cursor of other dimensions on system other than win95 -- on the other hand on CreateCursor which does take nWidth and nHeight parameters it is stated again, that the system can only create cursors of size SM_CXCURSOR x SM_CYCURSOR. You will have to try it yourself...
0
 

Author Comment

by:kickdog
ID: 7048499
but i can change standard cursor to larger cursor using
windows tool,how does it do?
0
 

Author Comment

by:kickdog
ID: 7048501
why can it work?
please tell me its principle.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:vbk_bgm
ID: 7048576
Perhaps you can try this
Go to the resource editor, Insert New Cursor
Click on New Cursor Image (this is next to combobox)
Choose Custom (specify 64x64, 16 colors). Then draw your cursor
In your app, put this code
HCURSOR hCursor = LoadCursor(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDC_CURSOR1));
SetCursor(hCursor);
where IDC_CURSOR1 is the cursor in the resource editor
0
 
LVL 8

Expert Comment

by:fl0yd
ID: 7048636
Creating a cursor in the resource editor and loading with LoadCursor( ... ) is the same as creating a cursor using CreateCursor( ... ). With CreateCursor you can also specify nWidth and nHeight -- but like I stated above, the MSDN states that only cursors of size SM_CXCURSOR x SM_CYCURSOR can be created.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7049251
I think you will need to use the LoadImage API in order to get an HCURSOR for an unusually-sized cursor.  The LoadCursor API is going to grab the 32x32 cursor from the resource file.

-- Dan
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Whole sheet autoscrub still needed 19 54
iSeries DB2 Query 2 101
sumDigits challenge 9 178
viewing source code from eclipse 13 111
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question