 |
|
 |
I need to receive images from a wireless source, then display them.
With the use of Visual Studio 2005 and the Windows Mobile SDK packages 5 and 6, all we can display are images stored in the resources directory, before compilation!
I would greatly appreciate any help with regards to displaying images NOT in
the Resources Directory!
|
|
|
|
 |
|
 |
can anyone tell me the way
|
|
|
|
 |
|
 |
Hi,
I just wonder whether I can use this to load JPEG image from stream?
I'm stuck with imgdecmp
Thanks!
|
|
|
|
 |
|
 |
This method can't make the gif animate.
|
|
|
|
 |
|
 |
Hi,If I want show jpg image from jpeg stream(buffer) not file
how can I draw the image
thanks
|
|
|
|
 |
|
 |
Thanks very much!
redwood jiang
|
|
|
|
 |
|
 |
thanks tanzim, i tried your code to display png images on pocket pc 2003, and it works well . just when i thought i'll have to do it the hard way (dealing with it as a binary resource or something)
[Kang Jodhi]
[Mobile Developer]
[Indonesia]
|
|
|
|
 |
|
 |
EVC 4.0
Appwizard new dialog,
add handler for paint message
bingo
void CProfileDlg::OnPaint()
{
CPaintDC dc(this); // device context for painting
CBitmap bitmap;
// Attach the bitmap object to the HBITMAP returned by SHLoadImageFile
bitmap.Attach(SHLoadImageFile(_T("/My Documents/demo.jpg")));
BITMAP bmpInfo;
bitmap.GetBitmap(&bmpInfo);
CDC bitmapDC;
bitmapDC.CreateCompatibleDC(&dc);
CBitmap* pOldBitmap = bitmapDC.SelectObject(&bitmap);
dc.BitBlt(0, 0, bmpInfo.bmWidth, bmpInfo.bmHeight, &bitmapDC,
0, 0, SRCCOPY);
bitmapDC.SelectObject(pOldBitmap);
bitmap.DeleteObject();
// Do not call CDialog::OnPaint() for painting messages
}
|
|
|
|
 |
|
 |
how about how to display jpeg in eVB?
|
|
|
|
 |
|
 |
Hello Tanzim.
I wan to use ur code to load an image on a dialog-based application and set it in a static field using setBitmap. This is my code:
BOOL CTestBitmapDlg::OnInitDialog()
{
CDialog::OnInitDialog();
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
CenterWindow(GetDesktopWindow
CBitmap bitmap;
bitmap.Attach(SHLoadImageFile(_T("/VIC.BMP")));
m_bmp.SetBitmap(bitmap);
m_bitmap.SetBitmap(bitmap);
return TRUE;
}
I'm new to evc++ . I'm not sure this is correct o not. But the image doesn't appear. What can i do? Can u show me the way?
Thanks.
|
|
|
|
 |
|
 |
Hello Tanzim!!!
I try to use your article...
But I cann`t find this function. VC++ 3.0 said that "error C2065: 'SHLoadImageFile' : undeclared identifier". I try to find it in file "aygshell.h". But it does not get result... May be I do something wrong?
With Best Regards Alexander A. Lopatkin.
|
|
|
|
 |
|
 |
Hi,
The most probable reason is that you are using an SDK that does not contain that function.
I used PocketPC 2002 SDK. Btw, if you just want to load a bitmap, SHLoadDIBitmap will do. Its included in Shellapi.h and you'll need to link to Shmisc.lib.
Hope this helps.
T
|
|
|
|
 |
|
 |
You need 2 headers not included with the release of EVC++ 3.0. They are :
-imgdecmp.h
-imgrendr.h
This can be found in the nice little package released by VOImage.
In EVC++ 4.0 Microcrap did not include the imgdecmp.dll in the standard release of CE.Net. Not sure if a compatible version was released or not for .Net
|
|
|
|
 |
|
 |
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/guide_ppc/htm/_mdref_shloadimagefile.asp
Also doc'd on many other sites.
|
|
|
|
 |
|
 |
It wasen't documented when I wrote the article!! And in MSDN, its documented for PPC 2003, NOT 2002
Requirements
Pocket PC Platforms: Pocket PC 2003 and later
OS Versions: Windows CE .NET 4.0 and later
Header: Declared in aygshell.h
Library: Use aygshell.lib
|
|
|
|
 |
|
 |
when I try the sample code there, I don't know why no image will display immediately, only a page for inputting text.
Also , when click on the file "Failed to open document"will appear while that file exists.
Thanks for any help again!!
|
|
|
|
 |
|
 |
I dont have the header file
How to compile it...? or where we can find it...
from a learner...
With luv,
Ramees...
|
|
|
|
 |
|
 |
Hi,
Specifying the platform would help very much
As for me, I used PocketPC 2002, with eVC++.
Tanzim Husain
|
|
|
|
 |
|
 |
I need to compile it in win2000,NT and XP
|
|
|
|
 |
 | eVB  |  | Chetan Kapadia | 2:58 17 Jan '03 |
|
 |
Can you please help me, How do i use your precious code in eVB to display .WMF files?
|
|
|
|
 |
|
 |
Hello Guys!
Since the SHLoadImageFile method is in imgdecmp.dll, and if it ships with ce 4.1, then you might wanna try this:
// in .H, assuming class foo
class foo
{
....
private:
typedef HBITMAP (WINAPI* lpfnSHLoadImageFile)(LPCTSTR pszFileName);
private:
HMODULE m_hDll;
}
// in .CPP
// in ctor load the dll, assuming class foo
foo::foo():m_hDll(NULL)
{
m_hDll = ::LoadLibrary(_T("imgdecmp.dll"));
}
// in the method where you'd need to load an image, assuming method bar
void foo::bar()
{
lpfnSHLoadImageFile pFn = NULL;
pFn = (lpfnSHLoadImageFile)GetProcAddress(m_hDll, _T("SHLoadImageFile"));
if (pFn)
{
// do your stuff here , for example
HBITMAP hbitmap = pFn(_T("/My Documents/Baloon.gif"));
}
}
// And finally, don't forget to unload the dll, in the dtor
foo::~foo()
{
if (m_hDll)
::FreeLibrary(m_hDll);
m_hDll = NULL;
}
TH
|
|
|
|
 |
|
 |
I inserted the codes above into my EVC project,but failed to compile ! I develop with <i>Evc4.0</i> on platform <i>WinCE4.1</i> .
|
|
|
|
 |
|
 |
I've not tested the code under eVC 4.0.
Make sure that is included in your project.
If you need further assisatnce, please contact me .
Thanks.
TH
|
|
|
|
 |
|
 |
I have searched all the possible header file,but I couldn't find the declaration of the function SHLoadImageFile.I think that whether it has been removed from CE4.1 by MS. Can I test it using the header file of PPC2002 in my 4.1 project?
Thx to tanzim
|
|
|
|
 |
|
 |
You can not use the header files from the Pocket PC 2002 SDK. The function SHLoadImageFile must also be exported by a dll module. There must be another function for loading images under Windows CE 4.0 (.NET).
|
|
|
|
 |