|
Hi all,
First of all I'm sorry about asking this type of question here but, after searching for 2 hours without no success and asking people on Tek Tips and DevX, I'm frustrated as hell.
How do you link to a dll (odbc32.dll) in Borland C++, I know how to do it in VS2005, but borland is another story.
Can anyone please help me??
Many Thanks
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
I don't know right now if there is any option dialog for this (currently working with VC++ Builder 6.0) but you can also include the #pragma preprocessor directive, assuming you have set the additional library (something like: "<installpath>\lib\psdk") path in a way, that odbc32.lib can be found:
#pragma comment ( lib, "odbc32.lib" )
|
|
|
|
|
|
I just tried a project which links with other libs that are shipped with the source code:
It seems that you can simply add the *.lib file to your project. However I don't know if this will work with Platform SDK libraries.
Yes, this is a way that worked in my project when linking against shell32.lib. I just placed it in the source code where I needed the API call.
|
|
|
|
|
Thanks you for the help.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: How do you link to a dll (odbc32.dll) in Borland C++...
What version? Are you compiling/linking from within an IDE, or a command prompt?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
i want to get homedirectory of current user like(C:\Documents and Settings\current username).
is there any API to get it.
Thanks in advance
RYK
|
|
|
|
|
SHGetFolderPath, just pass in the CSIDL for the desired folder.
|
|
|
|
|
You can call SHGetFolderPath(CSIDL_PROFILE) or read the %USERPROFILE% variable
|
|
|
|
|
|
Hi
I am not experienced at MFC.I want to ask that how can I display a jpeg format picture simply.I need that for a project in Windows CE and OleLoadPicture and IPicture methods are unsupported by Windows CE.So is there any other way without using these methods?
Thanks for any help
|
|
|
|
|
Try LoadImage function [^], setting hInst=NULL , lpszName equal to the path of your file, and fuLoad=LR_LOADFROMFILE . Please note that I don't know if it works with jpeg files on Windows CE (maybe asking to the Mobile Development[^] forum guys will help...).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
It does work with jpeg files on Windows CE
Taylor, MCP,MSc
|
|
|
|
|
Thx
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I tried the method you said in Visual C++ 6 but that did not show jpeg format picture(that works for bmp format).Can you say where can be my mistake.I wrote like that;
HBITMAP bmpHandle = (HBITMAP)LoadImage(NULL,
strPictureName,
IMAGE_BITMAP,
0,
0,
LR_LOADFROMFILE);
|
|
|
|
|
Try
HBITMAP bmpHandle = (HBITMAP)LoadImage(NULL,
strPictureName,
IMAGE_BITMAP,
0,
0,
LR_DEFAULTSIZE | LR_LOADFROMFILE);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Use CImage class, it supports loading, drawing various image formats like JPEG, GIF, BMP, PNG.
Best Regards
Raj
|
|
|
|
|
Do you need to like this code?
CImage m_Image;
m_Image.Load("C:\\1.hpg");
m_Static.SetBitmap(m_Image.Detach());
|
|
|
|
|
I am sorry but I don't know what is CImage, I think it is not a MFC class.
|
|
|
|
|
You can use CImage from either MFC or ATL.
Need to include "atlimage.h"
|
|
|
|
|
I added the header file to the file where I used CImage ;
#include "atlimage.h"
But it gave an error as "fatal error C1083: Cannot open include file: 'atlimage.h': No such file or directory"
What I missed?
|
|
|
|
|
Sorry, May be WINCE don't support CImage. Search your VC headers for atlimage.
If you can use CImage it is easy to use. Lets wait for other's response
|
|
|
|
|
I did not try that in WinCE. I tried it in Visual C++ 6 so I think I have a mistake.Can you say that how can I add the header file to the project?is it enough to add the header file("atlimage.h") to Stdafx.h?
|
|
|
|
|
|