P
Peter Bromley
Hi,
Cursor hot-spots don't seem to to be stored or loaded properly for my
custom cursors.
If I create a Cursor (System::Windows:Forms::Cursor) from a file, the
hot-spot is correct (near the top-left corner of the cursor image).
But if I load a cursor into a resX file using a ResXResourceWriter, and
thence into a managed resources file, the cursor hot-spot is not correct
(in the center of the cursor image).
Am I doing something wrong? Or is there a bug?
Some C++ code:
ResXResourceWriter* resX = new ResXResourceWriter(S"out.resX");
Cursor cursor = new Cursor(S"MyCursor.cur");
resX->AddResource(S"MyCursor", cursor);
resX->Close();
and loading:
ResourceManager* rm = new ResourceManager(S"MyCursors",
Assembly::GetExecutingAssembly());
Cursor cursor = __try_cast<Cursor*>(resources->GetObject(S"MyCursor"));
Thanks,
--
If you wish to reply to me directly, my addres is spam proofed as:
pbromley at adi dot co dot nz
Or if you prefer - (e-mail address removed)
Cursor hot-spots don't seem to to be stored or loaded properly for my
custom cursors.
If I create a Cursor (System::Windows:Forms::Cursor) from a file, the
hot-spot is correct (near the top-left corner of the cursor image).
But if I load a cursor into a resX file using a ResXResourceWriter, and
thence into a managed resources file, the cursor hot-spot is not correct
(in the center of the cursor image).
Am I doing something wrong? Or is there a bug?
Some C++ code:
ResXResourceWriter* resX = new ResXResourceWriter(S"out.resX");
Cursor cursor = new Cursor(S"MyCursor.cur");
resX->AddResource(S"MyCursor", cursor);
resX->Close();
and loading:
ResourceManager* rm = new ResourceManager(S"MyCursors",
Assembly::GetExecutingAssembly());
Cursor cursor = __try_cast<Cursor*>(resources->GetObject(S"MyCursor"));
Thanks,
--
If you wish to reply to me directly, my addres is spam proofed as:
pbromley at adi dot co dot nz
Or if you prefer - (e-mail address removed)