|
I´m working on some directx functions and I need to have full control over the pixeldata pointer to a directdraw surface, It worked in Visual c++ but I get some funny stripe kind of pattern in wince, it´s supposed that the function should fill the surface with red color.
Here is the function:
<code>
<small>
void SetPixelDataPointer(win* p,IDirectDrawSurface* lpddsurf){
DDSURFACEDESC desc;
DWORD x,y;
ZeroMemory(&desc,sizeof(desc));
desc.dwSize=sizeof(desc);
if(!IDirectDrawSurface_Lock(lpddsurf,NULL,&desc,DDLOCK_SURFACEMEMORYPTR|
DDLOCK_WAIT|DDLOCK_WRITEONLY,0)){
// upload data
p->data = (DWORD*)desc.lpSurface;
p->pitch=desc.lPitch;
//detta ger endast en pekare till pixelarrayen du kan sätta
//hela arrayen mha:
desc.dwHeight=desc.dwHeight;
desc.dwWidth=desc.dwWidth;
for(y=0;y<desc.dwHeight;y++){
for(x=0;x<desc.dwWidth;x++)
#if defined(_WIN32_WCE)
p->data[x]=0xffff;
p->data+=desc.lPitch/2;
#else
p->data[x]=0x00ff0000; //fill whole array with red color
p->data+=desc.lPitch/sizeof(DWORD); //sizeof(DWORD) = 4
#endif
}
}
IDirectDrawSurface_Unlock(lpddsurf,desc.lpSurface);
}
</small>
</code>
I dont know why it is not working in wince, any ideas?
I hope someone knows something about this, thanks Dani
|
|
|
|
|
Hi,
I'm sure this should be easy. How do you determine what button the user clicks on in a msgBox.
I have a msgBox with an OK and Cancel button and just want to exit the method if the cancel button is clicked.
|
|
|
|
|
Does anyone know how I can shut down the device?
Not suspend or reset but actual shut down.
I once had a link to a page that had the answer to that, but I never needed it up to now, and now the link is dead bummer...
Thanks for any help you might provide,
Greetz,
Davy
|
|
|
|
|
Is there a place that I can specify files in addition to the project output (usually EXE)? This pertains to EVC3 & EVC4.
This is so that I can have one project copy 3rd-party DLLs to the PDA (especially the emulator) so I don't have to keep copying them on a fresh image of the PDA.
I've looked at every setting I could find to no avail. Hopefully someone who has done this longer than me (not a hard feat, since this is only my second week) will know how/where to put them.
Could it be as simple as making them dependencies for the project and just turning off the compile option for them? I'll go try that now.
Thanks in advance,
Mike
|
|
|
|
|
Oops, I don't think there is a way.
|
|
|
|
|
That would be a real bummer.
Ah well, if that's the way it is, I'll just have to find a work-around.
Thanks,
Mike
|
|
|
|
|
How do I do a right click in the emulator (EVC3 & EVC4)?
I've had the need to rename a couple of files after copying them from my dev computer but to no avail on the emulated PDA. Does anyone know how or can point me to keyboard short-cuts for the emulator?
Thanks,
Mike
|
|
|
|
|
I am not sure this is your want. To right click, Press the left mouse key and don't release. The context menu will be shown. Like you use your tap pen tap on a PDA's screen.
|
|
|
|
|
Okay. I'll try that again, but when I did that I seem to remember that it was the same as clicking with the right mouse key. Hopefully, I'm mis-remembering.
Thanks,
Mike
|
|
|
|
|
I tried it again, and you're right. It's just that in this case with the EVC3 emulator, it was, for some reason, taking WAY too long before it registered. If I click and hold it for 5-10 seconds, it then registers and SLOWLY starts drawing the dotted circle and then gives me the context menu.
Whew! Who knew?
Thanks again for your help!
Mike
|
|
|
|
|
Did XP sp2 change something in the EVC4 arena?
I've just inherited a project that needs to compile in both EVC3 and EVC4. I've not had a problem with EVC3 at all. I'm pretty sure that I was able to get it to compile in EVC4 at one point right after I got the project.
Today, I've installed SP2 and now I get compile errors on SHRGINFO and related things. The PDA that I was given to work with this is PPC2002, so I'm not totally sure that SP2 is the problem.
Anyone else experience problems after SP2?
Thanks,
Mike
|
|
|
|
|
yep, i cant install eVC4 on my XP-Prof.SP2-Machine!
I am sure that SP2 is the problem because i have no problems on my non-SP2 Machines.
There is no further Information (so far i know) on the SP2-Readme and the Microsoft-Support Site.
Greetings,
Thomas
http://www.thbi.de
|
|
|
|
|
hi,all
In my EVC4 project, I need to show a 800*600 bmp picture to a window which
size is 80*50,
I do it in the window's paint function:
Paint(CDC& dc)
{
CDC memDC;
memDC.CreateCompatibleDC(&dc);
HBITMAP oldBmp = (HBITMAP)::SelectObject(memDC.m_hDC, m_hBitmap);//m_hBitmap
is the my bmp picture's handle
StretchBlt(dc.m_hDC,0, 0, 80, 50 ,
memDC.m_hDC, 0, 0, 800 , 600, SRCCOPY);
memDC.SelectObject(oldBmp);
//Copy the content from Memory DC to current DC
dc.BitBlt(0, 0, 80 , 50, &m_MemDC, 0, 0, SRCCOPY);
//here, the picture was showed. But the size is not exactly as 80*50, it is
about 80*40
}
Does anyone happend it before?
And also, in msdn, in stretchBlt(), it says "The only raster operations
Windows CE supports in the dwRop parameter are SRCCOPY and SRCINVERT. Windows
CE does not support mirroring.
" What does mirroring means?
Thanks
|
|
|
|
|
Hi,
Just having a play around with the File control in eVB. Does anyone know how to use it to determine how many lines there are in a text file. I'm trying to send each line of a text file to a portable printer which I have working but need to know how to do the above.
Many thanks in advance.
|
|
|
|
|
Hi,
I'm writing a program and i need to detect when user uses keyboard.
Actually i want to resize some controls in my dialog when user uses keyboard.
and when the user close it(the keyboard panel), the program should change the control sizes to default sizes.
I'm looking for message handler or something ...
Platform: PPC 2003, eVC++ 4.0
Regards,
Hadi
|
|
|
|
|
Have anybody tried to use XMLDomDocument e.t.c. in Pocket PC???
I need some examples - who can share them ?
|
|
|
|
|
hi!
how can i set the path environment variable on a pocket pc 2002 device.
thanks
|
|
|
|
|
hi!
i am writing a program that requires me to change the MAC address of my PDA
through a program. I have a C++ program to do just that - it changes the
value in the registry. To prevent a restart to allow the new MAC to take
effect, it uses functions in the Windows COM Interface that allow you
to change an adapter's MAC address without needing to restart. this needs
netcon.h which i cant find in the pocket pc SDK which leads me to velieve
that the functionality is not there for pocket pc.
so is there any other way to do this?
thanks
cheers
|
|
|
|
|
Hi everyone,
I need help in getting the unique device identifier(device id) of a pocket pc using EVC++ functions.I need this to generate unique registration codes to my products to stop piracy of my products.
Thanks.
Chandru
|
|
|
|
|
|
#include "winioctl.h"
extern "C" __declspec(dllimport)
BOOL KernelIoControl(
DWORD dwIoControlCode, LPVOID lpInBuf, DWORD nInBufSize,
LPVOID lpOutBuf, DWORD nOutBufSize, LPDWORD lpBytesReturned
);
#define IOCTL_HAL_GET_DEVICEID CTL_CODE(FILE_DEVICE_HAL, 21, METHOD_BUFFERED, FILE_ANY_ACCESS)
CString GetSerialNumberFromKernelIoControl()
{
DWORD dwOutBytes;
const int nBuffSize = 256;
byte arrOutBuff[nBuffSize];
BOOL bRes = ::KernelIoControl(IOCTL_HAL_GET_DEVICEID,0, 0, arrOutBuff, nBuffSize, &dwOutBytes);
if (bRes)
{
CString strDeviceInfo;
for (unsigned int i = 0; i<256; i=i+1)
{
CString strNextChar;
strNextChar.Format(TEXT("%02X"), arrOutBuff[i]);
strDeviceInfo += strNextChar;
}
CString strDeviceId =
strDeviceInfo.Mid(40,2) + strDeviceInfo.Mid(45,9) + strDeviceInfo.Mid(70,6);
return strDeviceId;
}
else
{
return _T("");
}
}
hi,let's go ...
|
|
|
|
|
Hi,
I am new in using eMbedded Visual C++ 4.0. I want to create a project which can accept Chinese Resoure file. I am trying to create a project with "Chinese as language for resource", but I don't see an option for Chinese Language. I do see "French, Germany, Italy etc...".
I appreciate if some one can help me in this.
Thanks
V V
|
|
|
|
|
A question and some info...
Is it possible to write multiple bitmaps to a memDC and then 'copy' that memDC to a Device DC in order to avoid image 'flutter' or flicker?
Under Windows CE there is the ::TransparentImage function, for copying a memory DC to a Device DC with a transparent colour.
The function also accepts a bitmap handle in place of a memory DC: so there is no need to Select a bitmap into a memDC beforehand.
The following function demonstrates its use. In my project I make several calls to my function with diffent bitmap IDs to form a 'layered bitmap' image on the device DC (screen in my case).
void CWizzHMIDlg::DrawTransparentBitmapDirect( CDC *pDC, WORD BitmapID, POINT Posn, COLORREF TransparentColor)
{
CBitmap Bitmap;
BITMAP BmpInfo;
Bitmap.LoadBitmap(BitmapID);
Bitmap.GetBitmap(&BmpInfo);
::TransparentImage(
pDC->m_hDC,
Posn.x, Posn.y,
BmpInfo.bmWidth, BmpInfo.bmHeight,
Bitmap.m_hObject,
0,0,
BmpInfo.bmWidth, BmpInfo.bmHeight,
TransparentColor);
}
I have tried various ways to copy several bitmaps on a memDC first, before copying to the device DC, but to no avail. Using a memDC parameter with TransparentImage does not appear to work more than once.
Regards & Thanks, Jack@SIL
|
|
|
|
|
Hi all,
For the treeView Control in .Net CF, the afterCollapse event is missing. But I need to trigger some action when the user click the
minus button on the tree, what should I do ?
Thanks
Patrick
|
|
|
|
|
hi,
does anyone know the difference between class 1 and class 2 in Bluetooth?
i know it's somthing about the range,but i need more details.
regards,
eli
|
|
|
|
|