how to add cur resources to any executable by program?
-
Have you looked at
UpdateResource(hResource, RT_CURSOR, ...)
and related functions?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
-
Have you looked at
UpdateResource(hResource, RT_CURSOR, ...)
and related functions?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
-
Yes, I have looked. It's ok for icon resources, but fail for cur resources, who can help me, thanks ;)
Explain what you mean by "fail"? It crashes, UpdateResource returns with FALSE (in this case, what does GetLastError give you?), everything seems to succeed but the executable is not updated/saved?
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > "It doesn't work, fix it" does not qualify as a bug report. < > Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
-
Explain what you mean by "fail"? It crashes, UpdateResource returns with FALSE (in this case, what does GetLastError give you?), everything seems to succeed but the executable is not updated/saved?
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > "It doesn't work, fix it" does not qualify as a bug report. < > Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
-
Everything is ok, but the cur added is black and with wrong data attribute(size, color and so on), i don't know which go wrong, however the same code is fine for icon file :doh:
And you are sure the source is OK, i mean the cursor file you want to add.
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > "It doesn't work, fix it" does not qualify as a bug report. < > Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
-
And you are sure the source is OK, i mean the cursor file you want to add.
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > "It doesn't work, fix it" does not qualify as a bug report. < > Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
-
Yes, i think so, as i replace the source of one cur resource with the tools of "Res Hacker", it's ok!
Maybe the data gets corrupted when you load the cursor file to be passed as the
pData
parameter of UpdateResource[^]? The documentation also says that it has to be properly alligned, could this maybe be the cause of the problem?> The problem with computers is that they do what you tell them to do and not what you want them to do. < > "It doesn't work, fix it" does not qualify as a bug report. < > Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
-
Yes, I have looked. It's ok for icon resources, but fail for cur resources, who can help me, thanks ;)
nenfa wrote:
...but fail for cur resources...
So
UpdateResource()
returns0
?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
-
nenfa wrote:
...but fail for cur resources...
So
UpdateResource()
returns0
?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius