|
Does the VC++.net package on market contains the compact framework
so I don't need to buy the whole VS studio .net for programming CE
device ? The two packages are different a lot in price.
Thanks
|
|
|
|
|
Hello,
I have an algorithm which fills a BITMAPINFO structure's RGBQUAD with
values. It's supposed to contain a frame of a video. I would now like to
output this to the screen. Currently, I'm only able to display a black
square. Here's what I'm trying to do:
HDC hdc, hdcMem;
HDC pBmp;
BITMAPINFO bmpInfo; // i set this accordingly
HBITMAP defaultObject, currentFrame;
// create a device context
hdc = GetDC(hWnd);
// create a memory device context
hdcMem = CreateCompatibleDC(hdc);
// now i am trying to create the DIB section
currentFrame = CreateDIBSection(hdc,
(BITMAPINFO*) &bmpInfo,
DIB_RGB_COLORS,
&pBmp,
NULL, 0);
// i am selecting the current frame that i got from createdibsection and
placing it in the memory device context
defaultObject = SelectObject(hdcMem, currentFrame);
// here I am attempting to display the frame to the screen
BitBlt(hdc, 30, 60, 176, 144, hdcMem, 0, 0, SRCCOPY);
// now i'm cleaning up ...
SelectObject(hdcMem, defaultObject);
DeleteObject(currentFrame);
DeleteDC(hdcMem);
does anyone see the error in this code? i have no prior experience coding in
windows whatsoever, let alone CE... This has been a crash course for me; i
have scoured most of the web for related material, tutorials, examples, and
i've gotten to this point.
thanks much for your time
Mike
|
|
|
|
|
hammock wrote:
HDC pBmp;
...
// now i am trying to create the DIB section
currentFrame = CreateDIBSection(hdc,
(BITMAPINFO*) &bmpInfo,
DIB_RGB_COLORS,
&pBmp,
NULL, 0);
The only thing I can see is that you use an
uninitialized HDC in place of the pointer that
should receive the location of the bitmap bits.
You should check currentFrame against NULL to see
if your DIBSection was created sucessfully.
From MSDN
ppvBits
[in] Pointer to a variable that receives a pointer to the location of the device-independent bitmap’s bit values.
....
Return Values
A handle to the newly created device-independent bitmap indicates
success, and *ppvBits points to the bitmap’s bit values.
NULL indicates failure, and *ppvBits is NULL.
To get extended error information, call GetLastError.
---
“Our solar system is Jupiter and a bunch of junk” - Charley Lineweaver 2002
|
|
|
|
|
Hi,
this is a real problem that I am seeing. My application (eVC++, SQL CE 2.0) locks up frequently when the wireless radio is on the device. When the radio is off, it doesn't lock up. I am wondering what does radio have to do with the app performance? My application uses Connection manager to get connected to the VPN etc.
Any clues?
|
|
|
|
|
I downloaded the JpegLibTest from here
it is the sample aplication. when I try to build it I recieve this error JpegLibTest\JpegLibTest.rc(171): Could not find the file wceres.rc. . I have looked for this file and can't find it anywhere in the project or the tools for embedded visual c++ 3.0.
can anyone help me,
Thanks,
Rodneyk1
|
|
|
|
|
Mine is in C:\Windows CE Tools\wce300\Pocket PC 2002\mfc\Include . There are also a number of copies on the 2003 SDK.
Regards,
João Paulo
|
|
|
|
|
I am new to the embedded visual c++ world. I have a large chunk of code that is supposed to work!!. But when trying to compile it I recieve Build : warning : could not create output directory 'D:\Visual\PCS\ARMDbg' . I can't see anything in the code that wants to write to the D drive. Is this something in the compiler. I am using Embedded Visual C++ 3.0. Can someone at lease point me in the right direction.
Thank alot,
Rodneyk1
|
|
|
|
|
rodneyk1 wrote:
But when trying to compile it I recieve Build : warning : could not create output directory 'D:\Visual\PCS\ARMDbg'.
I don't have eVC installed here, but you might want to try in Project Settings, and look for the output folder field and change it to something more suitable. If you've downloaded the project from somewhere, you've probably got the original programmers settings.
I might also suggest learning eVC a little so you know where things are - this will save you lots of stress later on
Ian Darling
"One of the few systems...which has had “no deaths” in the reliability requirements." - Michael Platt
|
|
|
|
|
Ian Darling wrote:
you might want to try in Project Settings
That did it Ian!!! Thanks alot for the help. I am down to 2 errors now I just have to get them figured out and I think I will have it.
Again Thank alot,
Rodneyk1
|
|
|
|
|
I'm seeking a good data storage idea for storing data that is of a form similar to the task list. Doing this project in .NET, I, at first, thought about creating a DataSet and then exporting that to an XML doc. Aside from the fact that I can't get that to work perfectly, i don't think it will do what I want it to do.
What I think i would like to do is access the Windows CE Store, if possible, and add a table to the database to store my information in. I have no idea how to go about doing such a thing.
My end goal is to get a data storage solution that stores the data between executions. Furthermore, at some point I might be able to use ActiveSync to sync the data with a desktop version of the software.
Please, i'm open to any and all suggestions because I am merely in the early development and planning stages of this project.
Thanks
-- Adam
"If you can't beat your computer in chess, try kickboxing"
|
|
|
|
|
I have to ensure that my application does not start its job if a certain different application is still running.
So, is there a way to retrieve information about currently running programs programmatically?
I'm using C# and the Compact Framework. If the CF does not provide a solution to this, maybe there is an API call helping me out?
Any suggestion is welcome.
|
|
|
|
|
I dont know anything about C# or the Compact Framework, but if you wanna do this in C/C++ you should use Toolhelp32.
Check out the functions:
CreateToolhelp32Snapshot
Process32First
Process32Next
HTH
Jonas
---
“Our solar system is Jupiter and a bunch of junk” - Charley Lineweaver 2002
|
|
|
|
|
First, thank you for your answer.
Correct me if I'm wrong, but as far as I know the Toolhelp32 API doesn't exist in the Pocket PC platform.
|
|
|
|
|
|
I tried it and it worked well.
Thank you very much!
Thanks to Ian, too!
|
|
|
|
|
hai friends we are developing an application with embeddedvc++ 4.0 to interface with lan systems.LPNETRESOURCE function is not supported by evc++4.0plz suggest some code samples to interface evc++ with network.
|
|
|
|
|
How do I receive a jpeg file from server using winsock?
|
|
|
|
|
When I call (custom form).ShowDialog, the dialog pops up and takes up the entire screen, blocking the data entry area. When using the emulator, I was typing all the information and didn't notice the problem. The first time I loaded onto my PocketPC, the problem became obvious. Other than that, the form works properly.
What am I doing wrong?
thanks
camasmartin
hobby programmer
|
|
|
|
|
I added a menu to the dialog box with no entries. This seems to protect the bottom of the screen so you can use the data entry methods.
camasmartin
hobby programmer
|
|
|
|
|
Hello,
I have derived a new class from a CListCtrl so that I can do some custom background coloring. The problem that I am having now is that every so often, my application freezes dead it its track. I mean my whole PDA stops responding. I have to do a soft reboot of the PDA to recover from the lockup. What can I be doing wrong? I have three support functions: SaveDc, ResortDc and DrawTextEllipse. My class also has overloaded the DrawItem virtual function for the custom drawing. I know for a fact that the problem is in the DrawItem method, but I can't see why. If I use the standard CListCtrl then my app does not lock up. Below is my four functions of the class. Can anyone see why it might be locking my PDA randomly?
void CCustListCtrl::DrawItem(LPDRAWITEMSTRUCT lpDraw)
{
//Local static variables
static CDC *pDc = NULL;
//static COLORREF cRedFont,cGreenFont, cBlackFont,cRow1,cRow2;
static COLORREF cBack;
static SCribItem * pCribItem;
static CRect rClient;
//Standard painting objects.
CPen sGridPen;
CFont fNew;
LOGFONTW NewLogFont;
sGridPen.CreatePen(PS_SOLID,1,RGB(0,128,0));
//Get DC
pDc = GetDC();
if(!pDc) return;
//Used for drawing individual row colors.
SaveDcObjects(pDc);
GetClientRect(&rClient);
rClient.top = lpDraw->rcItem.top;
rClient.bottom = lpDraw->rcItem.bottom;
pDc->SetBkMode(TRANSPARENT);
//Get LogFont now.
gl_pFont->GetLogFont(&NewLogFont);
//Now, determine if we must use a strikeout font.
if(lpDraw->itemState&&ODS_SELECTED)
NewLogFont.lfWeight = FW_BOLD;
pCribItem = (SCribItem*) GetItemData(lpDraw->itemID);
if(pCribItem->bDisc)
NewLogFont.lfStrikeOut = true;
fNew.CreateFontIndirect(&NewLogFont);
pDc->SelectObject(&fNew); //Select new font into DC.
if(pCribItem->Marked) pDc->SetTextColor(RGB(255,0,0)); //Red Text.
else pDc->SetTextColor(RGB(0,0,0)); //Black
//Now, paint the background row color.
if((lpDraw->itemID%2)==0)
cBack = RGB(179,217,255);
else cBack = RGB(193,255,193);
pDc->FillSolidRect(&rClient,cBack);
int nColumns=0;
nColumns = GetHeaderCtrl()->GetItemCount();
CRect rItemRect;
CString s;
//Now, lets begin writing the text.
pDc->SelectObject(&sGridPen); //Select Grid Pen
for(int i=0;i<ncolumns;i++)
{
="" getsubitemrect(lpdraw-="">itemID,i,LVIR_LABEL,rItemRect);
rItemRect.DeflateRect(4,0,0,0);
s = GetItemText(lpDraw->itemID,i);
DrawTextEndEllipsis(*pDc,s,rItemRect,0);
if(i>0)
{
rItemRect.InflateRect(4,0,0,0);
pDc->MoveTo(rItemRect.left-1,lpDraw->rcItem.top);
pDc->LineTo(rItemRect.left-1,lpDraw->rcItem.bottom);
}
}
if(lpDraw->itemState&ODS_SELECTED)
{
CBrush pBrush(RGB(255,0,0));
pDc->SelectObject(&pBrush);
pDc->FrameRect(&lpDraw->rcItem,&pBrush);
}
//Restore dc state.
RestoreDcObjects(pDc);
}
int CCustListCtrl::DrawTextEndEllipsis(CDC &dc, const CString &strText, CRect rc, UINT uFormat)
{
int nWidth = rc.Width();
if(dc.GetTextExtent(strText).cx > nWidth)
{
CString strTemp = strText;
strTemp.TrimRight();
if(strTemp.GetLength()==0) return 0;
for(int i = strText.GetLength(); i>=0;i--)
{
strTemp= strText.Left(i) + _T("...");
if(dc.GetTextExtent(strTemp).cx < nWidth)
break;
}
return dc.DrawText(strTemp,rc,uFormat);
}
return dc.DrawText(strText,rc,uFormat);
}
bool CCustListCtrl::SaveDcObjects(CDC *pDC)
{
gl_pPen = pDC->GetCurrentPen();
gl_pBrush = pDC->GetCurrentBrush();
gl_pFont = pDC->GetCurrentFont();
return true;
}
bool CCustListCtrl::RestoreDcObjects(CDC *pDc)
{
pDc->SelectObject(gl_pPen);
pDc->SelectObject(gl_pBrush);
pDc->SelectObject(gl_pFont);
return true;
}
|
|
|
|
|
Pocket PC 2003. You can have multiple email accounts. ONLY ONE SYNCHRONIZES (the one named ActiveSync). Two questions.
1. Does anyone have an idea how to sync a second account?
2. When using CEMAPI, how do you identify/open the messages by account? Should it be possible to write a program to move messages between accounts?
Thanks in advance. This is a very helpful and supportive group.
camasmartin
hobby programmer
|
|
|
|
|
All I want to do is just display the email thats there on my Pocket pc desvice.
I am using evc++3 and Pocket PC 2002.
Any samples, pointers, welcome.
Annum
|
|
|
|
|
|
Is there a way to display Pocket excel/ Excel from my application without using the Shellexecute, like you can display Pocket Word files from the program on a pocket pc using the richink control, is there something similar for Excel/Pocket Excel as well.
I will be using evc ++ 3.0, Win32, 2002/2003
Annum
|
|
|
|
|
Hi, everyone! Forgive my ignorance if i shouldn't post this here.
I've downloaded speech sdk .net and it works great with asp.net pages, but i don't know if it is possible to make speech-enabled mobile asp.net page???
When i try to add speech control on the MobileWebForm, VS tells me that i have to delete the control or put it inside a template. At the moment, i'm reading a book about templates in asp.net.
Since i'm reading it for only one reason (to speech-enable my asp.net app), please tell am i going the right way?
Thank You!
p.s.: msdn says that we can speech-enable web apps - seems like i am the only one to be in dark
|
|
|
|
|