|
near2world wrote: well this leads to C:\WINDOWS\TEMP when i want something C:\Documents and Settings\User\Local Settings\Temp.
any idea??
Then you probably need to set the environment variables properly.
Mine look like this on XP:
TEMP = %USERPROFILE%\Local Settings\Temp
TMP = %USERPROFILE%\Local Settings\Temp
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
|
near2world wrote: i want to find the temp folder path of the user and not the windows.
Another option is to use environment variable %temp% .
|
|
|
|
|
well this leads to C:\WINDOWS\TEMP when i want something C:\Documents and Settings\User\Local Settings\Temp.
any idea??
|
|
|
|
|
near2world wrote: well this leads to C:\WINDOWS\TEMP
Well thats because you typed in TEMP just type in %temp% in the run dialog and see where it takes.
Sorry for replying late.
|
|
|
|
|
|
well this leads to C:\WINDOWS\TEMP when i want something C:\Documents and Settings\User\Local Settings\Temp.
any idea??
|
|
|
|
|
GetTempPath() returns a temp directory that is writable by the account your code is running under. If you get C:\windows\temp then that's what you should use. If you need the path for a different account, you'll need to log in as that user, get an access token, and pass that token to SHGetFolderPath() .
|
|
|
|
|
yes it worked.
i got it.
thnx for the help.
|
|
|
|
|
Dear all,
I am facing problem with jpeg image loading.I want to set jpeg image as my dialog's background image, so controls added on that dialog will be on top of that jpeg image.. is there anyway to load jpeg image ad dialog's background , I have view to add bmp image as backgound but dont know about jpeg, so please help me in this..
thanking you,
gunjan
|
|
|
|
|
Once you get the jpeg in memory, it's all the same, so just load the file an display it.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
JPEG is compressed file format. Please refer this[^] for more information.
Regards,
Paresh.
|
|
|
|
|
Using VS2005
I'm trying to use FreeImage as a library. I've compiled the code into a lib file, and the project that uses the lib can find the appropriate header file (as well as the lib file), yet I still get unresolved externals (it looks like every function in the freeimage.lib). This is driving me insane. What step have I missed?
-- modified at 8:49 Thursday 3rd May, 2007
I had to compile some additional libs and then link them to my project. The docs say nothing about having to do this. Of course, the docs don't mention being able to even compile a static version.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: the project that uses the lib can find the appropriate header file (as well as the lib file)
I'm pretty sure you did this, but just in case: Did you add the lib file to the project?
You've probably seen this as well, but just in case it helps:
1. Compile the FreeImage library in debug and release modes and close your projects. You won't
need to use the FreeImage source code anymore.
Note: Do not compile the FreeImage DLL (project named FreeImage) but the project named
FreeImageLib. This should produce a huge file named FreeImage.lib (in release mode) or
FreeImaged.lib (in debug mode) in the Dist\ directory.
2. Copy FreeImage.lib/FreeImaged.lib into your lib\ directory or in a directory where the linker
can find them (e.g. your project directory). You can use "Menu->Tools->Options->Directories-
>Library files" for this.
3. Create a new project and add your code in it.
Add a call to FreeImage_Initialise() at the beginning of you main function and a call to
FreeImage_DeInitialise() at the end of this function.
4. Edit the compiler options (Menu -> Project -> Settings)
1. tab C/C++ : Category "Preprocessor"
* Add FREEIMAGE_LIB to the preprocessor definitions
2. tab C/C++ : Category "Code Generation"
* Use the Multithreaded run-time library (in release mode)
* Use the Debug Multithreaded run-time library (in debug mode)
5. Edit linker options (Menu -> Project -> Settings)
1. tab Link : Category Input
* Add FreeImage.lib to the list of object/library modules (release mode)
* Add FreeImaged.lib to the list of object/library modules (debug mode)
2. tab Link : Category Input
* Add LIBCMT to the Ignore library list (it helps to avoid a warning)
6. Compile and link your program.
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Yeah, I did all that, and even un-did it and re-did it a couple of times just to make sure I didn't miss something.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Maybe a very stupid question: didn't you forget to link to this library inside your project settings ?
John Simmons / outlaw programmer wrote: yet I still get unresolved externals (it looks like every function in the freeimage.lib).
So, your other project gives linking errors even for functions that it doesn't use from the dll ? Or only those that you are using ? Ca nyou show some of the link errors ?
|
|
|
|
|
The library compiled just fine, and my project that uses this library can find both the header file and the lib file (if I change the additional directories settings, I get errors saying it can't find these files). I made double sure that it's not compiling the lib as if it were in a DLL project, and I've made sure that both the lib and the exe that uses it are both compiled with the same multi-threaded settings.
I'm at a loss.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I've been looking for a way to get free of GDI+ so I was game to try this out.
I downloaded the library, compiled the lib project using VC++ 6.0 in a debug configuration, created a new SDI project in VC++ 6.0, put the .lib, .dll, and .h file for the debug library that I compiled into the new projects directory to speed this up, and made the following changes to the project...
// stdafx.h
#include "FreeImage.h"
#pragma comment(lib, "FreeImaged")
// FreeTest.cpp
BOOL CFreeTestApp::InitInstance()
{
FreeImage_Initialise();
//...
}
int CFreeTestApp::ExitInstance()
{
// TODO: Add your specialized code here and/or call the base class
FreeImage_DeInitialise();
//...
}
/*
This appears to compile but I haven't tried performing anyhting with it. What should I do to mirror your environment?
*/
|
|
|
|
|
0) Use VS2005 (I tried the pragma thing too). And then I did this:
1) Compiled the freeimagelib project for both release and debug
2) Moved the .lib files into a sub-folder under MyProject
3) Added the new lib folder to the "Linker | Additional Library Directories" setting for MyProject
4) Added the freeimage.lib (or freeimaged.lib) file to the "Linker | Additional Dependancies" setting for MyProject
4) Added the freeimage source folder (that contains the freeimage.h file) to the "C/C++ | Additional Include Directories" setting for MyProject
5) Added the FreeImagePlus include folder to the "C/C++ | Additional Include Directories" setting for MyProject
6) Added the necessary source files to MyProject
7) Added the necessary #includes (for FreeIMagePlus) to MyProject
The project compiles with no errors or warnings about not being able to find any files, but I get unresolved externals for the FreeImage stuff. Curiously, they all deal with the TIFF, MNG, PNG, and JPEG stuff.
I might just start from scratch on the project and see if I can't figure out where I went wrong.
As far as freeimage is concerned, it's a very nice library. When I get done with this project, I'm gonna post an article.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Could it be a mix up between the 'Runtime Library' settings (Project Properties|C/C++|Code Generation). For example, if one project is using 'Multi threaded' and the other 'Multi threaded DLL' then you'll get tons of linker errors.
|
|
|
|
|
I checked that, and they're the same. :/
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Long shot, but are both projects using wchar_t as a built-in type? I had some issues with this and the BCG UI library when first moving to VS2005.
|
|
|
|
|
Yeb, both have identical settings.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi,
Anyone have any idea to control the brightness of avi file at animation control?
thanks in advance.
|
|
|
|
|
Some times ago I saw an article on the codeproject about change brightness,hue,... of a file I think it used of mcis see C++ multimedia section on the codeproject
|
|
|
|