🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #17437

Re: Resource dll

#17437
From: Remy Lebeau (TeamB)
Date: Mon, 24 Mar 2003 22:05
49 lines
3039 bytes
"ScOe" <sven.savic@zg.hinet.hr> wrote in message
news:3e7f7554@newsgroups.borland.com...

> As String ...

You didn't show that in your original sample.  Please provide more complete,
compilable, examples in the future.

> I'm not using .rh ...

Why not?

> I've edited .rc file which i've include in .dll and that is all ... did i
> miss something ? I'm using same thing in application and i didnt have
> any problems ...

How did you create the DLL to begin with?

> Dll is staticaly attached to application ... is there any diferences ?

Yes.  You don't have direct access to the DLL's HINSTANCE when statically
linking.  Unless you use GetModuleHandle(), but I haven't tried that with
static custom DLLs myself before.  Should work, though.

In any case, you're passing NULL to GetModuleHandle() when you should be
passing the DLL's actual filename instead.  As previously mentioned, when
passing NULL to GetModuleHandle(), the returned HINSTANCE will be for the
application itself, not the DLL.  But your resources reside in the DLL, so
you need the DLL's HINSTANCE instead.  Just because you statically link does
not negate the fact that the resources are still stored in an external file,
not the application.  You do not statically link to the DLL directly, but
instead only to its .lib file, which provides a means for the compiler to
resolve address references to the DLL's functions and such, nothing else.
The DLL itself is not put into the application directly.

> i need to achive smoother character move ... and with 10
> milisec i cant do it .. character is constantly moving in some
> direction. On key down direction is changing. On higher
> level moving need to be faster ... and it seems that i cant
> achive that with timer ... so i will need to use some kind
> of user defined message loops, or something like that ...

Sounds like you need to use a separate dedicated thread instead and don't
use messages at all, just track the keyboard directly for changes and update
your animation accordingly.


Gambit
Technical Details
Message-ID: <3e7f7ecb$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3e7f5a3a@newsgroups.borland.com> <3e7f64aa$1@newsgroups.borland.com> <3e7f7554@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,35566035837173d7
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-03-24 14:04:02 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3e7f5a3a@newsgroups.borland.com> <3e7f64aa$1@newsgroups.borland.com> <3e7f7554@newsgroups.borland.com>
Subject: Re: Resource dll
Date: Mon, 24 Mar 2003 14:05:12 -0800
Lines: 51
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 207.175.226.26
Message-ID: <3e7f7ecb$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1048542923 207.175.226.26 (24 Mar 2003 13:55:23 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail