|
Use ExtractIconEx[^]
its pretty straight forward to use, let me know if you have any problem?
-prakash
|
|
|
|
|
Thank you first.
yes, i have tried this way. but there is always a black shadow behind the icon.
I used ExtractIconEx to get the small icon handle,and then add it into a image list.
I don't know that why there is always black shadow.
Could you please give me a help?
Thank you.
|
|
|
|
|
I think you are working on windows XP, the icon's showdow quality is lost.
Try includeing a manifest to your project.
If you are not aware on how to do that, search in CP, there are articles to manually include the manifest file in VC6
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<description>tool description</description>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
-prakash
-- modified at 22:37 Tuesday 1st November, 2005
|
|
|
|
|
Hi!
I want to use the root finding routine "gsl_root_fdfsolver_newton" that comes with the Gnu Scientific Library (short: GSL; see e.g. http://gnuwin32.sourceforge.net/packages/gsl.htm).
First of all: I am using GSL-1.6. under Windows XP plus Microsoft Visual Studio. Net 2003 (Version 7.1.3088).
When I take a standard example from the reference document "gsl-ref.pdf", then add
"libgslcblas.a libgsl.a"
under
"Configuration Properties->Linker->Input->Additional Dependencies"
(following the suggestions made on http://sources.redhat.com/ml/gsl-discuss/2004-q2/msg00000.html)
and finally compile the project under VC++, I obtain the following error message:
------ Build started: Project: Test 0, Configuration: Debug Win32 ------
Linking...
libgsl.a(roots_secant.o) : error LNK2019: unresolved external symbol _finite referenced in function _newton_iterate
H:\Test Project 0\Test 0\Debug\Test 0.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at " file://h:\Test Project 0\Test 0\Debug\BuildLog.htm"
Test 0 - 2 error(s), 0 warning(s)
---------------------- Done ----------------------
Build: 0 succeeded, 1 failed, 0 skipped
Does anyone know what the problem might be???
At
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt__finite.asp
I read that the function _finite() is declared in float.h and should become available via the automatically linked library "msvcrt.lib".
What could be the reason that the program still doesn't know _finite???
Already in advance: THANK YOU VERY MUCH FOR YOUR HELP!
Cheers
Lebesgue
|
|
|
|
|
Only thing that i can think of is that there could be a problem of function decoration,
Are you sure that the 3rd party lib can be used with C++?
-prakash
|
|
|
|
|
Thanks for your reply!
How could I track down the problem of function declaration?
Do you mean by "3rd party lib" the GSL Package?
If so: yes, this should work with C++.
Strangely enough, the whole thing actually works when I
compile with DEV-C++.
Cheers Lebesgue
|
|
|
|
|
Although this is a very old question it may still be of interest. I have just been running GSL (1.8) in Visual Studio 2005, and had much the same problem with unrecognised symbols, even though I could see they were in the Libs, libgsl_dll_d.lib, libgslcblas_dll_d.lib. In my case I was using the Hybrid and Newton root finding algorithms. The symbol that was missing was gsl_multiroot_fdfsolver_gnewton.
Eventually I found that I had to add GSL_DLL to the Property Page: Configuration Properties: C/C++: Preprocessor, Preprocessor Definitions.
That surprised me, but clearly it is the way to link up with the GSL code.
Raymond Mercier
|
|
|
|
|
Can someone tell me why I can't get my output lined up.
#include <iostream><br />
#include <cmath><br />
#include <iomanip><br />
using namespace std;<br />
<br />
int main(void)<br />
{<br />
double l;<br />
double arate;<br />
int n;<br />
<br />
cout << " Enter the loan amount: ";<br />
cin >> l;<br />
cout << " Enter annual interest rate: ";<br />
cin >> arate;<br />
cout << "Enter total number of payments:";<br />
cin >> n;<br />
cout<< endl<< endl;<br />
double mrate = (arate /12 ) / 100 ;<br />
<br />
double numerator= pow(1 + mrate , n)* mrate;<br />
double denominator= pow(1 + mrate , n) - 1;<br />
double mpayment = (numerator / denominator) * l;<br />
double apb=mpayment * 36;<br />
double ip=apb-l;<br />
int mi= arate/12;<br />
<br />
cout << setiosflags (ios_base::internal)<<"Loan amount:"<< setw(30)<< setprecision(2)<< fixed<< "$" << l << endl;<br />
cout << "Monthly interest rate:"<< setw(30)<< mi << "%" << endl;<br />
cout << "Number of payments:"<< setw(30)<< n << endl;<br />
cout << "Monthly payment:"<< setw(30)<< "$"<< mpayment << endl;<br />
cout << "Amount paid back:" << setw(30)<< "$"<< apb << endl;<br />
cout << "Interest paid:"<< setw(30)<<"$"<< ip << endl; <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
return 0;<br />
}
BINARY
|
|
|
|
|
Binary0110 wrote: Can someone tell me why I can't get my output lined up.
what do you mean by "lined up" output?
-prakash
|
|
|
|
|
As Mr.Prakash says, what do you mean by "can't get my output lined up"? Include a sample of the output of your program, showing the problem (AND MAYBE AN EXAMPLE OF WHAT YOU WANT.)
My approach would be to use sprintf() function, to generate a string with the right formatting before using cout() , but that is just because I am happier with C-style printf() and its parameters than the weird new-wave C++ approach (using cout() and setw() etc.)
|
|
|
|
|
What do I have to do if I want to use some var with the type LPCWSTR in my program. The only time I made it work is when I included windows.h 2 time by error.
|
|
|
|
|
I am not sure about anyone else, but your question does not make any sense to me. It might help if you tried to explain what you are trying to do.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
-- modified at 16:15 Tuesday 1st November, 2005
|
|
|
|
|
I'll explain it better:
I want to declare a variable of type LPCWSTR like this:
LPCWSTR lpInfo;
but I always get an error when I do this
The error: error C2065: 'LPCWSTR' : undeclared identifier
Now the question is : What do I have to do to make this error go away. Do I have to include something or ... ?
|
|
|
|
|
Ah... now that makes a bit more sense. Have you tried changing your project to UNICODE? The 'W' means wide character.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
|
|
|
|
|
and how do I change my program to unicode?
|
|
|
|
|
If you are using Visual Studio .NET 2003 then go to Project->Properties. Under the Configuration Properties->General heading, change the Character set option to use UNICODE.
If you are not using VS .NET 2003, I don't know that I can answer your question.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
|
|
|
|
|
It(LPCWSTR) declared in WINNT.h File ?
d
|
|
|
|
|
Wes Aday wrote: Have you tried changing your project to UNICODE? The 'W' means wide character.
Are you sure? I thought defining UNICODE is to convert LPCTSTR to LPCWSTR, but otherwise you can always use LPCWSTR. I have used it like this, may be I included wchar.h?
thanks!
|
|
|
|
|
|
I already read this article, but it doesn't help me with this problem, it only helped me understand how unicode and multibyte works.
And for the previous answer:
It didn't change anything, but I wanted my program to be in Unicode so that helped.
And I found something weird, windows.h was included in the main .cpp of my application, and if I erase it and put it in the stdafx.h, the lpcwstr is working. But I get error with my messageboxes and the getobject function(wich was generated automatically).
Do you understand something about this?
BTW i'm using a .net project. That seems to cause all the errors because if i make a classic win32 application, it's working.
-- modified at 17:16 Tuesday 1st November, 2005
|
|
|
|
|
It seems that there is a bug that occur when you include windows.h (I don't know why this include was put in the .cpp by default, but it wasn't including it correctly)
All I had to do is add
#pragma push_macro("GetObject")
#undef GetObject
#pragma push_macro("MessageBox")
#undef MessageBox
at the start of my code and
#pragma pop_macro("GetObject")
#pragma pop_macro("MessagBox")
at the end to make it work.
|
|
|
|
|
Yahoo installs a start menu item to open “yahoo mail”, the shortcut points to:
C:\WINDOWS\system32\RUNDLL32.EXE C:\PROGRA~1\Yahoo!\Common\ymmapi.dll,OpenURL http://mail.yahoo.com/?.redir=ymmapi11
This seems to run iexplore.exe under svchost.exe under system. Does anyone know how this works? what exactly does rundll32.exe do here? Does the DLL have anything to do with the iexplore.exe opening under svchost.exe?
And, why does yahoo do it this way - any benefits?
thanks!
|
|
|
|
|
rundll32.exe is used to "execute" a dll.
Since dll can not live by itself in the memory,it needs a host so windows provides svchost.exe as host for an "executable" dll which is most likely to be ymmapi.dll
-prakash
|
|
|
|
|
Thank you. Do you know how to implement a DLL of my own that will work this way?
thanks!
|
|
|
|
|