ik heb in een groupbox een figuur random laten verspringen maar nu zou ik graag die cursor veranderen met een eigen figuur in plaats van de standaard cursors van windows.
De cursor zou de figuur "hand.jpg" moeten bevatten.
GroupBox1->Cursor->Picture->LoadFromFile("hand.jpg"); ->simpel voorgesteld
maar werkt dus niet.
// Screen->Cursors[crMyCursor] = LoadCursor(HInstance, "NewCursor");
// Cursor = crMyCursor;
staat in de help maar ksnap er ni te veel van
graag wat hulp.
eventjes nog de help file er in plakken:
This example shows how to add custom cursors to an application. It assumes that a custom cursor with the name NewCursor has been added to the resources (.RES file) of the application. You can add the cursor using the image editor. (Tools | Image Editor)
The following code makes this cursor available to the application via the constant crMyCursor, and sets it as the global cursor to the application.
const crMyCursor = 5;
void __fastcall TForm1::FormCreate(TObject *Sender)
{
Screen->Cursors[crMyCursor] = LoadCursor(HInstance, "NewCursor");
Cursor = crMyCursor;
}
De cursor zou de figuur "hand.jpg" moeten bevatten.
GroupBox1->Cursor->Picture->LoadFromFile("hand.jpg"); ->simpel voorgesteld
// Screen->Cursors[crMyCursor] = LoadCursor(HInstance, "NewCursor");
// Cursor = crMyCursor;
staat in de help maar ksnap er ni te veel van
graag wat hulp.
eventjes nog de help file er in plakken:
This example shows how to add custom cursors to an application. It assumes that a custom cursor with the name NewCursor has been added to the resources (.RES file) of the application. You can add the cursor using the image editor. (Tools | Image Editor)
The following code makes this cursor available to the application via the constant crMyCursor, and sets it as the global cursor to the application.
const crMyCursor = 5;
void __fastcall TForm1::FormCreate(TObject *Sender)
{
Screen->Cursors[crMyCursor] = LoadCursor(HInstance, "NewCursor");
Cursor = crMyCursor;
}
[ Voor 42% gewijzigd door Verwijderd op 03-04-2005 14:08 ]