|
|
Hi guys,
I am using strtod() function to convert a string "123.4" to float 123.4
It works fine in VC++. But when I enter the same code in evc++, its giving me the following error-
error C2664: 'strtod' : cannot convert parameter 1 from 'class CString' to 'const char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
My code:
char *stop;
UpdateData (TRUE);
input=strtod(m_display, &stop);
x=input;
m_display is the CString variable, input is double.
I type casted the m_display -
input=strtod((LPCTSTR)m_display, &stop);
I got this error -
error C2664: 'strtod' : cannot convert parameter 1 from 'const unsigned short *' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
I am having major problems since yesterday night. totally frustrating! The float to string gives me error too.
-hithesh
|
|
|
|
|
You've defined UNICODE . This means that CString manages an array of WCHAR s, not of char s.
To handle this behaviour-switching between UNICODE being defined and not defined, use the macros in tchar.h . The documentation for each wrapped function shows the equivalent tchar.h name under "Generic-Text Routine Mappings". For strtod , the equivalent API that operates on TCHAR s is _tcstod .
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Mike,
Thanks. So instead of strtod, I use _tcstod?
I am a VC++ newbie. an example would be great.
thanx.
-hithesh
|
|
|
|
|
Hi!!!
I have a pda application that uses a dll that I made.
That dll has some images that i load as an embedded resource, when i run the application, it takes some time t load all images and i can see in the emulator the images loading... What can I do to make the images load at the same time??
Thanks in advance
|
|
|
|
|
The best solution I found, when loading a lot of images when the program starts, was to display a splash screen with a progressbar.
That way, the few seconds it taks to load seem to go faster.
|
|
|
|
|
I Have two problem to manage Pocket PC 2002 Network Connection :
1st. I have create Bluetooth application and it's work fine when bluetooth is active. But when inactive my application is always error. How can i detect Bluetooth is active or not by software, and also how can i activate bluetooth manually by my software ?
2nd. I try to send data by GPRS, it always succeed when GPRS is active. But when GPRS is inactive it's always error. So how to create software to configure the GPRS connection and connect the GPRS manually without using Net.WebRequest and CMHELPER ?
Thank's for support.
|
|
|
|
|
I am a novice to Windows CE so sorry in advance if this is a stupid question.
We just got an Itronix Q200 with WindowsCE 4.2 and I would like to be able to set up a folder on this device as being shared on the network so that a desktop pc can access this folder (via \\IPaddr\sharename) so that an app that runs on the desktop pc can do file transfers with the device. I can ping the device from the desktop pc and can ping the desktop pc from the device so the device is communicating on the network, but I don't know how to set up a share on the device. My app needs this share to do the file transfers.
Is this possible?
Thanks, gary
|
|
|
|
|
I'm having problems receiving and making phone calls whilst a GPRS session is active. I'm using third part components to programatically make the RAS connection (in C#), but when a phone call is made or received the connection utility is locked out and cannot make another successful connection until the device is reset. Even manual connections cannot be done until the device is reset. I have tried connecting manually, and when a phone call is made or received the GPRS session is simply suspended, and reactivates when the phone call is over. I have tested several third party components and they all have the same problem. One of them said there was nothing they could do about it as it was a problem with the RAS DLL. Is this true? Is it not possible to programatically create a GPRS connection via the RAS DLL whilst also being compatible with phone usage? Does anyone know a way around this problem?
Sean
|
|
|
|
|
I have downed load a USB drive for my experiment. I use PE Explorer to disAsemmbler the .sys file into .asm file. Can anyone tell me how can I compile it back to .sys file after the modification? I apprecite it.
|
|
|
|
|
Hello
I created a Windows CE application with C#.NET
I'm using System.Data.SqlClient
When I try to connect to PC SQL server from pocket pc, It throws; PlatformNotSupportedException
I opened Guest account from PC WinXP, gave full rights to SQL server and database.. I'm using static IP.
All I need to do is: store and get data from SQL 2000.
Actually I'm using MSDE on PC
Any help,
thanks...
|
|
|
|
|
ok try to do a Middle Tier (Web Service) between the Client Application(ur Widnows CE) and the Data Tier (SQL Server), send the query to ur mid tier(web service) and let it update the database or retrieve the data from the SQL server and send it back to u as an XML Doc.
|
|
|
|
|
You should change the SQL collation to SQL_Latin1_General_CP1254_CI_AS.
|
|
|
|
|
I use vs.net2003 to write a SmartDevice application on desktopo PC.
But, the vs.net2003 only support IrDa/TCP methods to transfer code from desktop PC to PocketPC. Since the PC didn't has one Irda dongle and I don't want to buy a ethernet card for PPC, how to use USB to transfer code to PocketPC?
Thanks.
Tsung-Yu
|
|
|
|
|
There's no need to buy an ethernet card for ppc. The TCP transfer mode connects to the PPC using ActiveSync. You just need to cradle the PPC, and VS.NET2003 will use ActiveSync to transfer your program to PocketPC.
|
|
|
|
|
Hello
I am very new to mobile devices. I am attempting to write my first MFC app for a Pocket PC. I have a dialog app created with the wizard and I have added a number of edit controls to the dialog template.
When I use Class Wizard to add variables for the edit controls it says 'There are no data types for this type of control'
Is CEdit not available in MFC on CE?
|
|
|
|
|
Josh Gray wrote:
Is CEdit not available in MFC on CE?
Yes, it is. You can bind an edit control to either a CEdit or to CString, int, long...
Regards,
João Paulo Figueira
Embedded MVP
|
|
|
|
|
Thanks. I can add the variables manually but not with the class wizard which is weird but not a huge problem
|
|
|
|
|
I use explicit link a class DLL, but I got an 'Unersolved external symbol "public ... CMyClass..."
Here are the parts of code
-------------------------------------
hDLL = LoadLibrary("MyDLL");
if (hDLL != NULL)
{
CMyClass my ;
--------------------------------------
Where I missing?
Thinks.
|
|
|
|
|
My development environment is win2k/EVC4.
How the careate a dll which includes a dialog class, so that I can call this dialog class in my wince application?
Thanks.
|
|
|
|
|
Hi,
I am doing a project on 'Mobile Computing'. The project demands the recognition of the type of the client machine i.e. whether it is a PDA or a mobile or a simple desktop machine from the request sent to the server from the client. But, I don't know how to do it. Plzzz ........... help me in this respect.
Looking forward to your help.
Regards,
Barun Biswas,
M. Tech(IT), Bengal Engineering & Science University, Shibpur, India.
|
|
|
|
|
Hi all, i'm trying to create a new database in CE but it doesnt seem to work for some reason........can someone help? thanks!!
Imports System.Data.SqlServerCe
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'create DB
Dim engine As New SqlServerCe.SqlCeEngine("Data Source = \My Documents\test.sdf")
engine.CreateDatabase() 'error here
'connect to DB
Dim ssceconn As New SqlServerCe.SqlCeConnection("Data Source = \My Documents\test.sdf")
ssceconn.Open()
'ceate table
Dim sqlCreateTable As SqlServerCe.SqlCeCommand = ssceconn.CreateCommand()
sqlCreateTable.CommandText = _
"CREATE TABLE People(people_id int IDENTITY(0,1) PRIMARY KEY, f_name ntext, l_name ntext)"
sqlCreateTable.ExecuteNonQuery()
'inserting rows
Dim sqlInsertRow As SqlServerCe.SqlCeCommand = ssceconn.CreateCommand()
sqlInsertRow.CommandText = "INSERT INTO People(f_name, l_name) VALUES('John', 'Doe')"
sqlInsertRow.ExecuteNonQuery()
'close connection
ssceconn.Close()
End Sub
An unhandled exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll
Additional information: SqlCeException
SQL Server CE encountered problems in creating the SQL Server CE database [,,,Connection String,,]
|
|
|
|
|
hi.
i have a program with access mdb database and i want to connect my database from pocket pc but when i change a record from each side it will show on each computer(pocket pc and desktop comp) . it could be very nice if someone have an example about it..
or i can chance my desktop database to sql server and pocket pc database to sql server ce but i still need to see changed records online..
thank you
|
|
|
|
|
i have an application which does many things , aprt of which is : transforming XML files using xsl & xpath of the system.xml namespaces but the problem is that i want to use this application on a pocket pc emulator [smart device app.] and both namespaces are not allowed! so what shud i do!
is there similar namespaces for the Compact Framework??!
|
|
|
|
|
in evc i do:
CODrawMenu menu;
CODrawMenu menu2;
menu.CreatePopupMenu();
menu2.CreatePopupMenu();
menu.AppendMenu(MF_STRING,1,_T("1"));
menu.AppendMenu(MF_STRING,2,_T("2"));
menu.AppendMenu(MF_STRING,3,_T("3"));
menu2.AppendMenu(MF_POPUP|MF_STRING,(UINT)menu.m_hMenu,_T("1"));
menu2.AppendMenu(MF_STRING,4,_T("2"));
menu2.TrackPopupMenu(TPM_LEFTALIGN | TPM_NONOTIFY, point.x, point.y,this);
menu.DestroyMenu();
menu2.DestroyMenu();
where CODrawMenu - my class derived from Cmenu
it use MF_OWNERDRAW style to append
but in void CODrawMenu::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
i use
CRect rectFull(lpDrawItemStruct->rcItem); to get rectangle to draw item. And get zero Height for this item
menu2.AppendMenu(MF_POPUP|MF_STRING,(UINT)menu.m_hMenu,_T("1"));
what i do wrong?
sorry for Bad english
|
|
|
|