|
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?
|
|
|
|
|
|
|
You can use CImage with MFC or ATL,this is of the MSDN
CImage provides enhanced bitmap support, including the ability to load and save images in JPEG, GIF, BMP, and Portable Network Graphics (PNG) formats.
|
|
|
|
|
Dear Sir,
I am using CSpreadSheet Class to transfer file to Excel, But I want to open directly this file from my Visual c++ 6.0 Program. How can I open excel file(i.e c:\gestion\Payroll.xls) from my Visual c++ 6.0 program
I learn my self
|
|
|
|
|
Look for a sample at CP. You got to import the COM-libs of excel and instanciate an Excel COM Object and do the stuff.
Greetings from Germany
|
|
|
|
|
Dear Sir,
I learn my self, I am still a beginer.
CAn you show me exactly or give me example so i can understand.
I am waitting your clear example
|
|
|
|
|
On top of the webpage there is the search box. Enter "excel" and Go! and you find a lot.
Thats what I have done and I think this article could fit best for your needs:
http://www.codeproject.com/wtl/WTLExcel.asp[^]
Greetings from Germany
|
|
|
|