Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Down

How to load the cursor from the resource, and then save it to disk? Find similar branches


Delphimun   (2001-12-18 17:11) [0]

How to load the cursor from the resource, and then save it to disk (under the cur extension)?



Delphimun   (2001-12-18 17:18) [1]

Already the second time I ask this question, surely I will not wait for an answer to it again?



Delphimun   (2001-12-18 17:30) [2]

Oh please!!!!!!!!!!!!!!



Dimka Maslov   (2001-12-18 17:38) [3]

TResourceStream.Create -> TFileStream.Create -> TFileStream.Assign



Delphimun   (2001-12-18 17:56) [4]

And with an example



Delphimun   (2001-12-18 17:59) [5]

I apologize for such persistence on an easy question, but I have no help (the old disk with Delphi broke, I bought a new one, but there is no help there)



Delphimun   (2001-12-18 18:11) [6]

When I write:
.
{$ R x: \ cur.res}
.
was
a: TResourceStream;
begin
a: = TResourceStream.Create (form1.Handle, "cur", "Cursor");
It gives me a dynamic error: Resource cur not found
although the cursor in the resource is named cur
And what should I do after this, and is it possible with an example



Dimka Maslov   (2001-12-18 18:33) [7]

TResourceStream.Create ( hInstance



Delphimun   (2001-12-18 18:40) [8]

Dimka Maslov:
Same



Иван Шихалев   (2001-12-18 19:04) [9]

The cursor is stored as a list of links to its images. Perhaps this is a problem, although TResourceStream can render under it sharpened. Look at how I have the icons delivered - in the pantry Icon Extractor - the cursor is completely similar. If TResourceStream specially sharpened, instead "Cursor" should help RT_CURSOR_GROUP or "CURSOR"



Delphimun   (2001-12-19 12:57) [10]

When I write:
var Curs: HCursor;
CN: string;
begin
CN: = "cur" + # 0;
{"CUR" is Name from Res file}
Curs: = LoadCursor (hInstance, @ CN [1]);
Screen.Cursors [crHandPoint]: = Curs;
button1.Cursor: = curs;
The button cursor does not change, what is the mistake here, that is, how to make the button become the cursor as a resource?



Digitman   (2001-12-19 13:14) [11]

button1.Cursor is a type of TCursor type, and you are trying to assign a value of type HCursor to it.



Delphimun   (2001-12-19 13:18) [12]

And how to do it (how to translate Hcursor to Tcursor) Please help, but I say I have no help, write PLEASE!



Digitman   (2001-12-19 13:19) [13]

and in general it is not good to replace system cursors with your own.
const
crMyCursor = 1; // for example

Screen.Cursors [crMyCursor]: = Curs;
button1.Cursor: = crMyCursor; // like this right




Digitman   (2001-12-19 13:20) [14]

and in general it is not good to replace system cursors with your own.
const
crMyCursor = 1; // for example

Screen.Cursors [crMyCursor]: = Curs;
button1.Cursor: = crMyCursor; // like this right




Delphimun   (2001-12-19 13:29) [15]

Digitman:
At last, it happened, a clever man was found. I am tormenting this question for the second day, and one cannot give an answer, as if someone has never used it!



Digitman   (2001-12-19 14:51) [16]

> Delphimun
And then another similar primitive question will torment the week. And all you do not know that the types must match, and info about types - at least in the help is, and help for you is written - to read it with any problem that arises, and not to keep it dead useless rubbish on the disk)



Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Top









Memory: 0.6 MB
Time: 0.028 c
1-22002
BFG
2001-12-16 16:24
2002.01.08
Graphs


3-21955
kalinka17
2001-12-03 13:16
2002.01.08
Help me find DBTreeView =)


1-22058
$ Hic0
2001-12-16 11:49
2002.01.08
TTreeView and TListView


1-22057
AlexeyV
2001-12-19 03:34
2002.01.08
How to cause a dialogue


1-22059
Leo ^ Sun
2001-12-19 07:24
2002.01.08
Who worked on





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian Japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Español swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish