|
Okay, I finally found enough time to try coding for these pocket pc devices. But I'm a "lazy" coder and I want to do things the easy way. Meaning that I use all the ready standard components found. So of course I want to user vectors to hold data, but what - I can't find them .
So there are no vectors in CE, or am I wrong here (I hope so). So the question is, what is the thing to use, when you would normally use vectors?
|
|
|
|
|
|
There are also some container classes inside the MFC (also in the CE version).
Just take a look at the following classes: CArray , CList , CTypedPtrArray , ...
I hope this will help you!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Thank you. These classes are just what I was looking for... Well they aren't vectors, but they're close enough .
STLPort also looked interesting, so thanks for the links concerning that too...
|
|
|
|
|
Hi All,
How can i unload a form from memory in eVB. "Unload Me" is giving me error.
Mahesh
|
|
|
|
|
I have a relation called Correspondence of the following format:
corrId int identity(1, 1) primary key
type varchar(50)
cwith varchar(50)
isInternal smallint(2)
rowguid uniqueidentifier
the rowguid attribute was added by sql server when setting
up merge replication.
On the CE application I am trying to insert a row into the table and then pull the corrId back out using @@IDENTITY. Strangely when I try and insert I get the following error:
HR: 800040E2F
Native: 25016
Message: A duplicate value cannot be inserted into a
unique index [,,,,,]
Source: Microsoft SQL Server 2000 Windows CE Edition
Parameter 1: 0
Parameter 2: 0
Parameter 3: 0
Parameter 4:
Parameter 5:
Parameter 6:
I could understand the error if the corrId wasn't being incremented by 1 each time (& it didn't have the uniqueidentifier attribute). The question is what am I missing that's causing the problem?
Thanks in advance.
|
|
|
|
|
Docs say:
"Ensure that a replication publication is configured to manage identity columns for a table(s) in the publication."
Is your publication correctly configured? By the way, what layer are you using to access the DB: ADO oe OLE DB?
Regards,
João Paulo
|
|
|
|
|
If you mean did i let it use "Mark identity columns with the NOT FOR Replication" thing, i let enterprised manager sort it out. I have no problem inserting into other tables that have identity attributes, which is why i am finding this very odd behaviour.
I am using OLE DB. I haven't use Sql CE before and based my code on an example from the MSDN site, which used OLE DB. ACctually in the connection string for the SqlCeConnection object when i stated a 'Provider' initially it gave errors saying invalid token or something along those lines, so i removed it and specified the 'Data Source' only, and it works. I'm not entirely sure what it uses in that case. However def OLE DB for the replication.
|
|
|
|
|
Coudln't work out what was causing it, so I changed the format of the table to remove the identity attreibute, all working now. thanks.
|
|
|
|
|
Hello!
I have a program(it's write for me),it can work in the Pocket PC 2002,but when I change OS to Pocket PC 2003,the program is not work,I try to use eVC 4.0 and I install eVC SP2,Pocket PC 2003 SDK.But when I create a new project in eVC 4.0,I found I can not select cpu type to ARM,please help me,what can i do?
Thank's a lot.
(sorry,my english is not well,I wish you can understand my problem.)
|
|
|
|
|
It is difficult to answer such a generic question. Can you please provide more information on the application you wrote?
Regards,
João Paulo
|
|
|
|
|
Dear Paulo:
sorry,I can't show the code to you,because it's our company's property.I have a question.How can I select cpu type for ARM in the eVC 4.0?
Thank's.
Best Regards.
David
|
|
|
|
|
Build->Configurations, Add 2 new for wcearmv4 from the default relase/debug templates.
“Our solar system is Jupiter and a bunch of junk” - Charley Lineweaver 2002
|
|
|
|
|
Hi, is it possible to create an app for use on pocketpc with the compact framework that can execute c#-code just like an scriptinghost.
would be nice to learn c# on the pda.
Carsten Bath
|
|
|
|
|
i have no real time device for database connection .i want to develop a database application which can made insertion daeletion updation of records in my database.plz help me for this prob.thanks
|
|
|
|
|
Hi all!
I would like to make my PPC application able to make and receive phone calls. But unfortunately im new to TAPI, and dont know where to start.
I read the MSDN about it, and i checked out the CEDialer example, but it doesnt work... I'm using eVC++, Siemens SX45 (Pocket PC 2000).
Can anybody tell me, how to start, or the location of a tutorial, or a working sample code (that would be the best)!
It is fit, if i could send datas (phone number and command) to Pocket Dialer, and it would do the rest (make calls, receive calls) if it is possible.
Thanks in advance!
Best regards:
Shane99
|
|
|
|
|
Hi again!
I got CeDialer to work, but now i can do only data calls, with no voice. It only beeps when i pick up the called party's receiver.
I suppose its becouse the line 1122.:
lpCallParams->dwMediaMode = LINEMEDIAMODE_DATAMODEM;
what should be
lpCallParams->dwMediaMode = LINEMEDIAMODE_INTERACTIVEVOICE;
But if i set to interactivevoice, than the lineMakeCall gives an error.
What is wrong?
Thanks in advance:
Shane99
|
|
|
|
|
using ppc2k2 with just wince api, i'm trying to determine the size required by a button control based on it's text. my understanding is that by default 8pt tahoma bold font is used for the button text.
in order to determine the minimum button size, my plan is to use DrawText() to return the RECT structure of the text based upon the 8pt tahoma bold font in the DC.
however, when i use the following code, i have to add padding to the RECT in order for the button to not be too small.
what am i not understanding about correctly measuring the size of text in the DC used by the button control?
thanks...
<br />
HWND hChildWnd;
RECT cliRect, txtRect;
HDC hdc;
HFONT hBtnFnt, hOldFnt;
LOGFONT lf;
<br />
GetClientRect(hWnd, &cliRect);<br />
<br />
memset(&txtRect, 0, sizeof(RECT));<br />
memset(&lf, 0, sizeof(LOGFONT));<br />
<br />
hdc = GetDC(hWnd);<br />
<br />
lf.lfHeight = -8 * GetDeviceCaps(hdc, LOGPIXELSY)/72;<br />
lf.lfWeight = FW_BOLD;<br />
lf.lfPitchAndFamily = VARIABLE_PITCH | FF_SWISS;<br />
_tcscpy(lf.lfFaceName, _T("Tahoma"));<br />
<br />
hBtnFnt = CreateFontIndirect(&lf);<br />
<br />
hOldFnt = (HFONT)SelectObject(hdc, hBtnFnt);<br />
DrawText(hdc, szBtnTxt, -1, &txtRect, DT_CALCRECT);<br />
<br />
SelectObject(hdc, hOldFnt);<br />
DeleteObject(hBtnFnt);<br />
ReleaseDC(hWnd, hdc);<br />
<br />
txtRect.bottom += 6;<br />
txtRect.right += 30;<br />
<br />
hChildWnd = CreateWindowEx(NULL, _T("BUTTON"), szBtnTxt,<br />
WS_VISIBLE | WS_CHILD | BS_CENTER | BS_VCENTER | BS_PUSHBUTTON,<br />
(cliRect.right/2 - txtRect.right/2) , cliRect.bottom - 25,<br />
txtRect.right, txtRect.bottom,<br />
hWnd, (HMENU)IDC_PROPBTN, g_hInst, NULL);
|
|
|
|
|
I can't read your code, but I would say that you have a wrong assumption:
rodent¹ wrote:
my understanding is that by default 8pt tahoma bold font is used for the button text.
It is not, unless you tell it to. By default you get the system font that is larger than Tahoma 8.
Regards,
João Paulo
|
|
|
|
|
thanks...my assumption was based on the sdk doc's concerning the ui services which show tahoma bold 8pt used as the button text...i'll play with my code to see if using the system font gives better results as you suggest.
|
|
|
|
|
thanks for the info joão paulo...after the liberal use of the following code snippet, i discovered a few interesting points re: wince fonts..
1) the SYSTEM_FONT on my ppc2k2 sdk emulator and on my dell axim x5 is tahoma. the system font's LOGFONT lfHeight member was -12 while tmHeight, tmInternalLeading, tmDescent, and tmExternalLeading (from the system font's TEXTMETRIC struct) were 14, 2, 2, and 0 respectively.
2) to properly calculate the RECT size of the text used in my button control using the system font, i had to set lfHeight to 9 (??) in my first post's code snippet
<br />
hTmpFnt = (HFONT)GetStockObject(SYSTEM_FONT);<br />
GetObject(hTmpFnt, sizeof(LOGFONT), &lf);<br />
GetTextMetrics(hdc, &tm);<br />
<br />
wsprintf(szOut, _T("LOGFONT:\nFace: %s, h: %li\n\nTEXTMETRIC:\nh: %li, il: %li, d: %li, el: %li"),<br />
lf.lfFaceName, lf.lfHeight, tm.tmHeight, tm.tmInternalLeading, tm.tmDescent, tm.tmExternalLeading);<br />
MessageBox(hWnd, szOut, _T("Sys Font Info"), MB_OK);
|
|
|
|
|
rodent¹ wrote:
the SYSTEM_FONT on my ppc2k2 sdk emulator and on my dell axim x5 is tahoma
You are luckier than me. My iPAQ 3850 gives me something other than Tahoma 8. But I believe that you can change this using a registry setting. Maybe Dell did that for you...
Regards,
João Paulo
|
|
|
|
|
interesting. as you suggested in an earlier post, it makes sense to use SYSTEM_FONT rather than assuming Tahoma...more cross platform.
fyi, i discovered the reason why i had to use -9 for lfHeight (rather than -12) was that i was inconsistently muliplying by GetDeviceCaps(hdc, LOGPIXELSY)/72...everything works as expected when i use it consistently.
thanks for the feedback
|
|
|
|
|
using ppc2k2 sdk and getting "cannot convert from 'unsigned short [7]' to 'unsigned short [32]" compiler error on the following snippet...sdk doc's say lfFaceName member should be a null terminated string specifying typeface name of desired font
<br />
LOGFONT* lplf;<br />
memset(lplf, 0, sizeof(LOGFONT));<br />
lplf->lfFaceName = _T("Tahoma");<br />
any ideas?.....thanks
|
|
|
|
|
Try the following:
<br />
_tcscpy(lplf->lfFaceName, _T("Tahoma"));<br />
Daniel
---------------------------
Never change a running system!
|
|
|
|
|