|
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
|
|
|
|
|
I want to try to write something for mobiles.
Please - give me a tutor or doc for first steps.
thanks !
|
|
|
|
|
What language did you want to use?
|
|
|
|
|
First of all u should descide and tell,
>> what mobile platform u want to use (Symbian....)
>> What platform u work in (Windows / Linux / other)
>> What language u want to code in (C++ / Java / other)
Then it will be better for us to give u suggestions!
I was born intelligent Education ruined me!.
|
|
|
|
|
Hi,
My application takes and writes data on to the sd card often. I am experiencing a lot of SD Card corruption cases. I have fixed every possible loophole as such, but have no idea as to what causes this SD card to be corrupt
Any ideas?
What all scenarios cause sd card to be corrupt?
|
|
|
|
|
Eventually SD card's cannot retain new writes. But this is after a very large number of writes. If you were reading and writing to the SD card continuosly I suppose you could have reached that point. Have to tried reading and writing to the device's memory instead of the SD card to confirm that it is indeed a problem with the SD card. Do you have another SD card you could try? Or another device you could test the card on?
|
|
|
|
|
Thanks,
I did not know that eventually SD cards would crash. Any document or more info about that.
My application writes to a log file in SD Card as long as it runs.It logs every event and method of the app being called by the user. Infact everything that my app needs like the database, the text files to read data from and write data into, log files etc all of them are in SD Card. This application runs around 1 or 2 days or so then somehow somewhere SD Card gets corrupt.The corruption is very sporadic.So not able to replicate..
Is there some max number after which the SD Card cannot write and just crashes. I have tried with a couple of SD Cards, and all of them exhibit the same kind of behaviour. But not due a specific operation in the application but just random operation.
Thanks in advance...
|
|
|
|
|
Visual Studio 2003
PocketPC 2003 SDK
When I try to debug, emulator starts, everything loads into it, and the program is downloaded. I can go to the emulator and run the program. But Visual Studio does not go into debug mode so I can set breakpoints, look at things, etc.
Any suggestions?
Thank you
camasmartin
hobby programmer
|
|
|
|
|
Ignore. Cockpit error (the loose nut was the pilot). When I reinstalled visual studio, it was the old version that didnt support the pocket PC SDK. A lesson for all. Try reading.
camasmartin
hobby programmer
|
|
|
|
|
I developed a app for my PDA with EVC++3.0 and ADOCE 3.1. I need a DataGrid or similar componnent for browse too large datasets ?
Thanks for your time.
|
|
|
|
|
If you're using MFC, you can use the MFC Grid control [^] developped by Chris Maunder. It's realy complete...
Hope this helps
|
|
|
|
|
I'm doing a dll on my pocketpc and it fails when I try to get a function pointer from it.
I have this in the dll code:
__declspec (dllexport) void InitFunc (void);
void InitFunc (void)
{
...
}
And this is how I load the dll in the main program:
HINSTANCE hDll;
FARPROC dllInitFunc;
void LoadLib (void)
{
DWORD err;
hDll=LoadLibrary(L"mylib.dll");
if (hDll==NULL){
MessageBox(hWnd,L"Failed to load dll",L"Error",MB_OK);
return;
}
dllInitFunc=GetProcAddress(hVibradll,L"InitFunc");
if (dllInitFunc==NULL){
err=GetLastError();
MessageBox(hWnd,L"Failed to get proc address",L"Error",MB_OK);
}
}
dllInitFunc becomes NULL and err is 87, ERROR_INVALID_PARAMETER.
What am I doing wrong?
|
|
|
|
|
dllInitFunc=GetProcAddress(hDll,L"InitFunc");
“Our solar system is Jupiter and a bunch of junk” - Charley Lineweaver 2002
|
|
|
|
|
I mean getting data from different connection settings for example Blue Tuth or Thrue the flash card???
|
|
|
|
|
The problem is this:
I wish to create a folder inside the 'My Documents' folder.
I am fairly sure that it must be done via MAPI but all the documentation I have found relates to using messages such as email, SMS, etc.
I have initialized COM and MAPI and have opened a session with MAPILogonEx() but from here I'm stumped.
How do I access the IMAPIFolder interface from my session pointer?
Help...
|
|
|
|
|
Hello !
I have a SDI app (view derived from CFormView) in wich I repainted the background in grey (instead of white). I have a static text on it and of course the background color is white...
I want to color it in grey. Who can I do it? Can I send a message to the control or do I need to subclass the control ?
Thanks
|
|
|
|