AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Cursor aus resource laden

Ein Thema von k4ni · begonnen am 16. Mai 2008 · letzter Beitrag vom 16. Mai 2008
Antwort Antwort
k4ni

Registriert seit: 17. Jul 2007
Ort: Ulm
258 Beiträge
 
Delphi 7 Enterprise
 
#1

Cursor aus resource laden

  Alt 16. Mai 2008, 20:50
Hallo,

Ich hab schon ein paar themen gefunden, aber keine davon haben mir geholfen.
Ich habe 2 cursor in meiner .RES datei.

Hier erstmal die .rc datei:
Code:
1 CURSOR "Cursor 1.cur"
2 CURSOR "Cursor 2.cur"
Wieso geht das dann nicht: ?
Delphi-Quellcode:
var
  Form1: TForm1;

implementation
const
  cursors = 5;
{$R *.dfm}
{$R cursors.res}
procedure TForm1.FormCreate(Sender: TObject);
begin
  Screen.Cursors[cursors] := LoadCursor(HInstance, 'CURSOR');
  Cursor := cursors;
end;
end.
  Mit Zitat antworten Zitat
Benutzerbild von DeddyH
DeddyH

Registriert seit: 17. Sep 2006
Ort: Barchfeld
27.537 Beiträge
 
Delphi 11 Alexandria
 
#2

Re: Cursor aus resource laden

  Alt 16. Mai 2008, 20:54
Zitat von Win32 SDK:
The LoadCursor function loads the specified cursor resource from the executable (.EXE) file associated with an application instance.

HCURSOR LoadCursor(

HINSTANCE hInstance, // handle of application instance
LPCTSTR lpCursorName // name string or cursor resource identifier
);


Parameters

hInstance

Identifies an instance of the module whose executable file contains the cursor to be loaded.

lpCursorName

Points to a null-terminated string that contains the name of the cursor resource to be loaded. Alternatively, this parameter can consist of the resource identifier in the low-order word and zero in the high-order word. The MAKEINTRESOURCE macro can also be used to create this value.
Detlef
"Ich habe Angst vor dem Tag, an dem die Technologie unsere menschlichen Interaktionen übertrumpft. Die Welt wird eine Generation von Idioten bekommen." (Albert Einstein)
Dieser Tag ist längst gekommen
  Mit Zitat antworten Zitat
k4ni

Registriert seit: 17. Jul 2007
Ort: Ulm
258 Beiträge
 
Delphi 7 Enterprise
 
#3

Re: Cursor aus resource laden

  Alt 16. Mai 2008, 20:58
Also mit 1 und 2 hab ichs auch schon versucht, ging nicht :/
edit: habs
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:16 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz