|
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
|
|
|
|
|
|
mikobi wrote: How can I open excel file(i.e c:\gestion\Payroll.xls) from my Visual c++ 6.0 program
Are you referring to ShellExecute() ?
"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
|
|
|
|
|
See What I write without success;
ShellExecute(this->m_hWnd,"open","c:\gestion\payroll.xls","","", SW_SHOW );
|
|
|
|
|
mikobi wrote: ShellExecute(this->m_hWnd,"open","c:\gestion\payroll.xls","","", SW_SHOW );
While you failed to explain what "without success" means, I can only assume it should be:
ShellExecute(this->m_hWnd, "open", "c:\\gestion\\payroll.xls", "", NULL, SW_SHOW);
"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
|
|
|
|
|
Hi everybody. Good morning.
I´d like to know what is the precompiled header for, why is ti useful, and what are the differences between Selecting "Not using precompiled headers" or using stdafx.h
I´m getting an error message when building on Release version, something like this :
Fatal error C1083: Cannot open precompiled header file: 'Release/TMB.pch': No such file or directory
I can fix that by selecting Not using precompiled headers, but I want to know why it happens.
Thanks!
Time to come clean...
Vive y deja vivir / Live and let live
Javier
|
|
|
|
|
PCHs do pretty much what they say on the tin. Ususally in the MSVC context your PCH is built from stdafx.h . This means the compiler takes stdafx.h and everything it #include s and compiles it first into a special 'pre-compiled' bunch of stuff it puts in the .pch file. Then when it sees #include "stdafx.h" in some other .cpp file later on it doesn't have to go through stdafx.h and all its included headers again it just links in the pre-compiled stuff from the .pch file it created before. Essentially it's a way of speeding up your builds.
I don't know exactly why you're seeing this error but what it means is the .pch file has not been built for your Release build. If your settings are consistent. i.e. each .cpp is set correctly to use or not use a .pch and all the ones that use it generate it from the same header, then a full Rebuild should fix this. Sometimes the incremental linker gets confused and thinks the .pch has been built when it hasn't after something is changed that requires it to be rebuilt.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Please refer here[^].
Regards,
Paresh.
|
|
|
|
|
Hi all,
I m trying to make an application in which i have to list out all the machines in the LAN that has oracle server running. and list of all the databases on a perticular machine.
I did same kind of thing with SQL Server using "sqldmo.dll".
If anyone can help me out in doing this or suggest me some dll using which i can do the same.
Thank You
Regards,
Pankaj Sachdeva
|
|
|
|
|
Can't you just query for Oracle-related services on those machines?
"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
|
|
|
|