|
using HBITMAP hbitmap = (HBITMAP)LoadImage(NULL,"D:\\a.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
but how can make resource ID of this image.
|
|
|
|
|
If you have loaded the bitmap once you havent to load it anymore.
You can make copies or use it. Read the CBitmap class in MFC.
Greetings from Germany
|
|
|
|
|
ani_ikram wrote: how can make resource ID of this image.
You can't. Only resources have resource IDs!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Dear All,
My project requirement is VC++ application need to support multilanguage.That is Im having 3 different language files(english.txt,Català.txt,Français.txt). All files having same messages but different language.I need to access all the messages throws key(ex. 1,2,3..).If i send key(1) and lanuage name means it will show the corresponding language message.
It will be much helpful to me to give some advice on this..
Thank you very much,
|
|
|
|
|
Please check Localisation[^] section of CP.
I hope it helps.
Regards,
Sandip.
|
|
|
|
|
How can I get the ID of a thread that has created a specific window?
for clarification, see we have the handle of a window (e.g m_hWnd). Now for any reason, I'm gonna get the ID of the thread that has created this window.
Please pay attention I mean a window from another application.
Thank you masters!
modified on Friday, September 26, 2008 3:26 AM
|
|
|
|
|
Is GetCurrentThreadId of any use???
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
Thanks, but I meant a window that belongs to another application than mine!
Thank you masters!
|
|
|
|
|
What exactly do you need - Process Id or Thread Id?
modified 7-Mar-17 16:34pm.
|
|
|
|
|
|
LORD! You're an angel It really works! Thank you as much as the number of letters in my last project (It's a huge one)
Thank you masters!
|
|
|
|
|
Hi,
How to link a Regular DLL (Static) to the application?
Regards
Sairam
|
|
|
|
|
you haev to include it .lib file in your project!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
It's either a static library or a dynamic link library (dll). You don't have a static dll. So, please reformat your question properly so that it is understandable.
|
|
|
|
|
Hi,
I have one JNI shared libray which depends on a CPP library.
In my module loading CPP shared library first and loading JNI library, eventhough the dependant library is loaded JNI library tries to load CPP shared library.
Please let me know how to avoid loading an already loaded shared library ....
Thanks,
Yashu
|
|
|
|
|
Hi,
Details needed !
1) What problem are you facing if you are again loading the already loaded library.Asd i dont see any issue with that.
2) Are you loading these .dll's explicitly or implicityly i.e.using LoadLibrary or directlinking to it? As in case of explicit linking your process must have the Lib handle to call its function.
Regards,
Abhishek
Abhishek Srivastava
Technical Lead.
India.
|
|
|
|
|
Please find my problem in datail...
The problem statement:
--------------------------------------------------------------------------------
Problem with loading a dependant shared object while loading the parent shared object.
Description:
--------------------------------------------------------------------------------
My project has a java module. At runtime this java module loads a JNI shared object(libJNIApi.so).This JNI shared object is dependant on a CPP shared object (libV5Capi.so). Both objects reside in the same directory under installation directory. But the installation directory is not pre defined and can be anywhere on the system.
When libJNIApi.so is loaded through java call System.load("InstallPath/lib/libJNIApi.so"), it also tries to load the libV5Capi.so.
This works fine when the java is invoked from the directory where the libraries are present. But when java is run from a different loaction, the load fails.
The error during this load is
java.lang.UnsatisfiedLinkError: /home/chikkall/test//lib/libJNIApi.so (JVMPORT003E Dependent module libV5Capi.so could not be loaded)
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:952)
at java.lang.System.load(System.java:440)
at com.ov.lic.sm.Init.init(Init.java:154)
at com.ov.lic.sm.ConfigManager.init(ConfigManager.java:194)
at com.ov.lic.sm.ConfigManager.initialize(ConfigManager.java:245)
at com.ov.lic.sm.ConfigManager.initialize(ConfigManager.java:259)
at com.ov.lic.sm.ConfigManager.initSecurityModule(ConfigManager.java:170)
at com.ov.lic.sm.ConfigManager.InitializePath(ConfigManager.java:87)
at com.ov.lic.sm.SecurityModule.InitializePath(SecurityModule.java:59)
at JDemoUtility.initPath(JDemoUtility.java:83)
at JDemoUtility.main(JDemoUtility.java:938)
libJNIApi.so is searching for the libV5Capi.so in the current working directory and fails to find it.
Options we considered:
--------------------------------------------------------------------------------
1. Load the dependent shared object(libV5Capi.so) explicitly in java module before loading the parent shared object(libJNIApi.so).
2. Use $ORIGIN in the runtime path of libJNIApi.so, which gets resolved to the absolute path of libNIApi.so at runtime.
Both options work for all unix flavors. But on AIX, For option 1: The parent library still tries to load the dependent library, even if it is loaded.
For option 2: $ORIGIN option is not available(couldn't find in the linker n loader manuals)
Build details:
--------------------------------------------------------------------------------
The libJNIApi.so is built in the make file as
SHRD=/usr/XLC/usr/vacpp/bin/makeC++SharedLib_r
SHRD_OBJ= -p -8192 -bM:SRE -bnoquiet -bnoentry -lc
libJNIApi.so: libV5Capi.so JNIApi.o
$(SHRD) -G $(SHRD_OBJ) -L. -lV5Capi -o $@ $?
Dump of libJNIApi.so
$ dump -Hv libNIApi.so
libJNIApi.so:
***Loader Section***
Loader Header Information
VERSION# #SYMtableENT #RELOCent LENidSTR
0x00000001 0x00000050 0x000000b4 0x0000005c
#IMPfilID OFFidSTR LENstrTBL OFFstrTBL
0x00000003 0x00001010 0x00000cd4 0x0000106c
***Import File Strings***
INDEX PATH BASE MEMBER
0 .:/usr/XLC/usr/vacpp/lib:/usr/lib/threads:/usr/lib:/lib
1 libc.a shr.o
2 libV5Capi.so
|
|
|
|
|
Hi All
I have a problem to call BOOL type function.I have declear a function in header file and calling in same header file.Then i am geting error
error C3861: 'str': identifier not found
Plz help me
|
|
|
|
|
Hi,
First check did you declared the variable 'str'.
Could you please show the function.
The price of anything is the amount of life you exchange for it.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
yes
public:
bool str();
and
bool CCall::str()
{
AfxMessageBox("Hello");
}
return false;
And i want to call str(); in .h file.
|
|
|
|
|
What I can see is this is a method of a class, not C-type function. You cannot call a method of a class that way.
Either you should create an instance of the class or you should declare the method as static.
modified 7-Mar-17 16:31pm.
|
|
|
|
|
cpvc++ wrote: return false;
Did this return statement escape?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Here's the problem:
I need to create a class "String" that is implemented as a linked list. This class should include the following string operations:
• String input and output
• A function which returns the string length
• A function which returns the nth character, where the first character is number 1
• Overloaded operators = (assignment), ==, !=, <, >, <= and >= (relational).
I then need to write a class "N" as a subclass of class "String". This class "N" should include an isPostfix Boolean function which determines whether or not a String is a postfix expression, where the operands of the expression are a single lowercase letter, and the operator is +, -, * or /. I will not have to evaluate any postfix expressions.
Does anyone know how do do this or has done this before? Any help would be greatly appreciated. thanks.
|
|
|
|
|
Would you like us to bring you a cup of tea as well?
|
|
|
|
|
shadoweKnight wrote: I then need to write a class...
Which means you, not us.
shadoweKnight wrote: Does anyone know how do do this...
Yes.
shadoweKnight wrote: ...has done this before?
Possibly.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|