|
please explain more ; so we can understand
|
|
|
|
|
Hi,
I think that he has the same problem of mine. He wants to connect; using ppc with internal/external GSM cell phone like modem (my is internal), to another PC and transfert data in several ways. Like a terminal application, using AT command to connect ATDT ...
I've posted some question aboit TAPI, but if you know anything ... please any suggestion is gold for me.
Thanks in advance.
Montons
|
|
|
|
|
I have an ASP.NET application on a desktop that uses SQL server updates it and vs.
i want to design a mobile app that will be used to reach my main server
by online or ofline.
for exmp a have a pocet pc and a sell some products by my van.when i giive this inpu
to my pocet pc it updates its databse and when connected updates the main server.
my quastion is do i have to write two separete apps or can i convert my desktop api to my pocet pc.is it possible to convert a desktop project to mobile.
i m very new in mobile if you know link about using desktop and mobile devices simultanisly ( together ) please make me know!
resit2@yahoo.com
|
|
|
|
|
Hi,
I was wondering if it is possible to access at runtime the data (e.g. AssemblyTitle) that is entered in the AssermblyInfo file? I know it in possible with the full framework, but I have been unable to find any info regarding the cf.
Any help would be greatly appreciated.
Mark
|
|
|
|
|
I am sure there is a very simple solution to this problem but I am yet to find it, so your help is greatly appreciated.
I am currently writing an application that has a handheld component and a desktop component. I have several classes that I need to use in both places.
The solution that looked best to me was to place the files in a seperate project, compile it as a ClassLibrary than import the dll and use them in each project as I needed to. However when I do this I have one of two problems. If I make the class library to use the compact framework, it creates problems in my desktop application, as it wants to remap referances to match the framework used by my library. If I create the library as a standard .net application, visual studio complains that it cannot use the library because it uses full .net features.
My Eternal thanks,
Andy
|
|
|
|
|
hi,
how to change the background color of tree view and list view in c# .net cf?
thanks
|
|
|
|
|
Hi
I have a very odd problem that made me really crazy !
I've an member variable in my dialog class:
public:<br />
CArray < SomeStruct, SomeStruct > m_MrOdd;
In a function I added some values to m_MrOdd, like this:
void CMyDialog::SomeFunc1()<br />
{<br />
m_MrOdd.Add( SomeStruct( 1, 2 ) );<br />
m_MrOdd.Add( SomeStruct( 10, 2 ) );<br />
m_MrOdd.Add( SomeStruct( 1, 212 ) );<br />
}
And when i want to use of values, the array show me nothing !
void CMyDialog::SomeFunc2()<br />
{<br />
if(m_MrOdd.GetSize() == 0)<br />
MessageBox( _T("What did you do with my array ?!!!!!!") );<br />
.<br />
.<br />
.<br />
}
I don't know what to do ... plz help me.
The intresting part is when i debug the program
In Adding values, it shows that everything is ok and in using data in another function it shows there is not any value
Regards,
Hadi
|
|
|
|
|
Is m_MrOdd the same variable? By the way, you should be declaring it as:
CArray < SomeStruct, SomeStruct& > m_MrOdd;
(the second argument is a reference type).
Regards,
João Paulo Figueira
Embedded MVP
|
|
|
|
|
Hi dear João
And thanks alot for reply, You are the only one who helps me
Well, m_MrOdd is the member variable (public access) of CMyDialog class.
As you said I changed the m_MrOdd declaring to:
CArray < SomeStruct, SomeStruct& > m_MrOdd;
But I've still the problem
Best Regards,
Hadi
|
|
|
|
|
Can you please show the definition of SomeStruct? It may be important...
Regards,
João Paulo Figueira
Embedded MVP
|
|
|
|
|
It's the real structure:
struct OrderItems<br />
{<br />
OrderItems(){}<br />
OrderItems(int code, int count)<br />
{<br />
m_nCode = code; <br />
m_nCount = count;<br />
}<br />
<br />
int m_nCode;<br />
int m_nCount;<br />
};
Best Regards,
Hadi
|
|
|
|
|
This is really strange because it should be working on such a simple structure (no need for complex copy semantics). Let me think a little bit...
Regards,
João Paulo Figueira
Embedded MVP
|
|
|
|
|
What is the value of GetUpperBound ?
Regards,
João Paulo Figueira
Embedded MVP
|
|
|
|
|
In Adding Function (I added 2 items to array):
GetSize() is 2, and GetUpperBound() is 1
In Using Function:
GetSize() is 0, and GetUpperBound() is -1
Best Regards,
Hadi
|
|
|
|
|
Are you absolutely sure that the functions are called in this order? By any chance are you not clearing the array between the calls? (this is weired)
Regards,
João Paulo Figueira
Embedded MVP
|
|
|
|
|
Yes, I'm sure ...
As you can see the code is so simple, and I didn't clear any item ...
Best Regards,
Hadi
|
|
|
|
|
Got it! Most of the times, we have to read MFC's source code to know whais is happening. Look:
AFX_INLINE int CArray<TYPE, ARG_TYPE>::Add(ARG_TYPE newElement)
{ int nIndex = m_nSize;
SetAtGrow(nIndex, newElement);
return nIndex; }
.
.
.
template<class TYPE, class ARG_TYPE>
void CArray<TYPE, ARG_TYPE>::SetAtGrow(int nIndex, ARG_TYPE newElement)
{
ASSERT_VALID(this);
ASSERT(nIndex >= 0);
if (nIndex >= m_nSize)
SetSize(nIndex+1, -1);
m_pData[nIndex] = newElement;
}
The code is using a reference type (ARG_TYPE ) to add the objects, that you are passing as unnamed temporaries (when are these being deleted?). Try something like this:
void CMyDialog::SomeFunc1()
{
SomeStruct a(0,0);
a = SomeStruct( 1, 2 );
m_MrOdd.Add( a );
a = SomeStruct( 10, 2 );
m_MrOdd.Add( a );
a = SomeStruct( 1, 212 );
m_MrOdd.Add( a );
}
I know it looks odd, but try it.
Regards,
João Paulo Figueira
Embedded MVP
|
|
|
|
|
I tried this way:
OrderItems item(0, 0);<br />
item = OrderItems( 10, 96 );<br />
m_OrderItems.Add( item );<br />
item = OrderItems( 5, 13 );<br />
m_OrderItems.Add( item );
But ......
Regards,
Hadi
|
|
|
|
|
Man, this is maddening! What SDK are you using?
Regards,
João Paulo Figueira
Embedded MVP
|
|
|
|
|
Yes I know but what can i say ?
I'm using eVC++ 4.0 SP3, PPC 2003 SDK, WinCE 4.2 SDK is also installed.
PS: I just stop the project, don't know what the hell is this
Anyway thanks alot for your time
Regards,
Hadi
|
|
|
|
|
I forgot to say that i got thease warnings in compiling:
e:\windows ce tools\wce420\pocket pc 2003\mfc\include\afxtempl.h(65) : warning C4291: 'void *__cdecl operator new(unsigned int,void *)' : no matching operator delete found; memory will not be freed if initialization throws an exception<br />
e:\windows ce tools\wce420\pocket pc 2003\mfc\include\wcealt.h(235) : see declaration of 'new'<br />
e:\windows ce tools\wce420\pocket pc 2003\mfc\include\afxtempl.h(334) : see reference to function template instantiation 'void __cdecl ConstructElements(class OrderItems *,int)' being compiled<br />
OrderListDialog.cpp<br />
e:\windows ce tools\wce420\pocket pc 2003\mfc\include\afxtempl.h(65) : warning C4291: 'void *__cdecl operator new(unsigned int,void *)' : no matching operator delete found; memory will not be freed if initialization throws an exception<br />
e:\windows ce tools\wce420\pocket pc 2003\mfc\include\wcealt.h(235) : see declaration of 'new'<br />
e:\windows ce tools\wce420\pocket pc 2003\mfc\include\afxtempl.h(334) : see reference to function template instantiation 'void __cdecl ConstructElements(class OrderItems *,int)' being compiled<br />
ReportPage.cpp<br />
ShamsiDate.cpp<br />
Visitor.cpp<br />
e:\windows ce tools\wce420\pocket pc 2003\mfc\include\afxtempl.h(65) : warning C4291: 'void *__cdecl operator new(unsigned int,void *)' : no matching operator delete found; memory will not be freed if initialization throws an exception<br />
e:\windows ce tools\wce420\pocket pc 2003\mfc\include\wcealt.h(235) : see declaration of 'new'<br />
e:\windows ce tools\wce420\pocket pc 2003\mfc\include\afxtempl.h(334) : see reference to function template instantiation 'void __cdecl ConstructElements(class OrderItems *,int)' being compiled<br />
Generating Code...<br />
Linking...
|
|
|
|
|
This may well be the source of this problem. To diagnose it, I would have to take a look at your entire project.
Regards,
João Paulo Figueira
Embedded MVP
|
|
|
|
|
Here's the story:
class OrderItems<br />
{<br />
public:<br />
OrderItems(){}<br />
OrderItems(int code, int count)<br />
{<br />
m_nCode = code; <br />
m_nCount = count;<br />
}<br />
<br />
int m_nCode;<br />
int m_nCount;<br />
};<br />
<br />
class CMainPage : public CPropertyPage<br />
{<br />
.<br />
.<br />
.<br />
void UseOrders();
<br />
public:<br />
CArray < OrderItems, OrderItems& > m_OrderItems;<br />
}
And somewhere, in one of CMainPage methods I show another dialog and i add the items in that:
void COrderListDialog::OnOK() <br />
{<br />
CMainPage* dlgMain = (CMainPage*) GetParent();<br />
<br />
OrderItems item(0, 0);<br />
item = OrderItems( 10, 96 );<br />
dlgMain->m_OrderItems.Add( item );<br />
item = OrderItems( 5, 13 );<br />
dlgMain->m_OrderItems.Add( item );<br />
<br />
CDialog::OnOK();<br />
}
And then when i back to Main form i call UseOrders() to read the items but the problem occrues
I hope it's clear ...
Regards,
Hadi
|
|
|
|
|
Please make sure that this:
CMainPage* dlgMain = (CMainPage*) GetParent();
does return the pointer you want. If not, all is explained...
Regards,
João Paulo Figueira
Embedded MVP
|
|
|
|
|
Yessss, That's it
You solved the problem ! Thank you very much !
I changed code to this:
CAppSheet *pAppSheet = (CAppSheet *) GetParent();<br />
CMainPage *dlgMain = (CMainPage *) pAppSheet->GetPage(0);
And now it works fine ...
Best Regards,
Hadi
|
|
|
|