|
R.Rajesh wrote:
port.Send(strInit);
This is too low-level. There are other options!
It is better for you to create a RAS connection and then use whatever protocol you need on top of the IP connection it will provide. If you want to be a bit more sophisticated, you can use the Connection Manager to arbitrate the connections for you (there is an MFC example in your PPC 2002 SDK). This way, you don't need to worry about the gory low-level details of making a connection.
João Paulo
|
|
|
|
|
Hi All,
I want to to have ActiveX on my porpertypages,
and after searching, I found that I CAN'T do that, this is a known bug.
Now I turn to a new way,
I want to have a menubar, and clicking a button will show the corresponding page,
however, I face another problem...
I call the page by DoModal,
but, for example, when I call page1, then page2, then page1 again,
the 3rd call will be a "NEW" page1, not the previous one...
any suggestion on that ??
Thanks in advance.
|
|
|
|
|
This is a nasty problem. Maybe you can do this using CDialog but you have to remember some issues:
1-Each dialog has its own toolbar, so you will not get away with just one toolbar for all dialogs.
2-Before showing the second dialog, you can end the first one. But this might cause screen flicker.
3-Why not use modeless dialogs? They can all coexist and you can show or hide them as needed. I suspect that for this solution, you would have to create a class to manage them all. Each modeless dialog would have a pointer to the manager (can be a non-window class) to have it hide one dialog and show the next.
Hope I made some sense to you.
Good luck!
|
|
|
|
|
Hi all,
How to select distinct rows from a table in eVB.I tried this using
SELECT DISTINCT Query but it shows error. Can any one help me please...
Thanks in Advance
Mahesh
|
|
|
|
|
What DB are you using? Pocket Access does not support SELECT DISTINCT!
|
|
|
|
|
hi Paulo,
I am using MS Access as database. Can you suggest a solution for this problem. My table contains 5000-10,000 rows of data,out of which i have to select a few distinct rows.
regards
Mahesh
|
|
|
|
|
You can try working around this problem by creating a separate table, possibly with the same structure, but with an index on the field(s) of your UNIQUE clause. Then copy all the rows from the first table to the second table, making sure that the UNIQUE field(s) does(do) not exist. The index is there to speed up your search. At the end of the procedure, you will have the UNIQUE records.
You might want to use this without a separate table, but you would have to create an in-memory array where the UNIQUE fields would be stored, and compared against.
If you don't want to do nothing of this, you will have to upgrade to a better database engine, like SQL Server CE 2.0.
Good luck!
João Paulo
|
|
|
|
|
Anybody knows about DDI Hooking?
Vikrams
|
|
|
|
|
PocketPC MFC application:
when I create a child dialog, my Commandbar is not shown anymore.
See example code.
Thanks in advance for any help on this. I realy need a solution for this.
<br />
BOOL CHAS_PocketClientDlg::OnInitDialog()<br />
{<br />
CDialog::OnInitDialog();<br />
<br />
SetIcon(m_hIcon, TRUE);
SetIcon(m_hIcon, FALSE);
<br />
CenterWindow(GetDesktopWindow());
<br />
CCeCommandBar *pCommandBar = (CCeCommandBar*)m_pWndEmptyCB;<br />
pCommandBar->LoadToolBar(IDR_TOOLBAR);<br />
pCommandBar->SetSizes(CSize(23,21), CSize(16,15));<br />
<br />
ASSERT(m_Dlg.Create(IDD_DLG));
m_Dlg.ShowWindow(SW_SHOW);
<br />
return TRUE;
}<br />
|
|
|
|
|
Your child dialog is a CDialog -derived class? If it is, it should have its onw empty m_pWndEmptyCB that overlaps the one you want to show (created in CHAS_PocketClientDlg::OnInitDialog ). So, if you want to show it, you must create it (using the same procedure) in the child as well.
|
|
|
|
|
hi,
how can i capture a CFormView to memory and display it in the same CFormView (for example in the upper left corner)
And then i want to save it to a bmp file. How does this work's?
can anyone help me??
|
|
|
|
|
|
Does anybody know how to programatically set the desktop wallpaper in PocketPC 2002? Besides using the registry and soft-resetting the device, I don't know of a cleaner way...
|
|
|
|
|
Sorry for replying to my own post, but I found an answer for this. Here is the code:
PROCESS_INFORMATION pi;
CString strCmdLine(_T("/safe /noui /nouninstall /delete 0 ")),
strFile;
HKEY hKey;
LONG lRet;
m_edtFile.GetWindowText(strFile);
strCmdLine += strFile;
if(::CreateProcess(_T("\\Windows\\wceload.exe"),
strCmdLine, NULL, NULL, FALSE, 0, NULL, NULL, NULL, &pi))
{
::WaitForSingleObject(pi.hProcess, INFINITE);
lRet = RegOpenKeyEx(HKEY_CURRENT_USER, _T("\\Software\\Microsoft\\Today"), 0, 0,
&hKey);
if(ERROR_SUCCESS == lRet)
{
RegSetValueEx(hKey, _T("Skin"), 0, REG_SZ, (BYTE*)(LPCTSTR)strFile,
sizeof(TCHAR) * (strFile.GetLength() + 1));
RegCloseKey(hKey);
::SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);
}
}
Note: strFile contains the full path name of the .tsk file. No reset is needed.
|
|
|
|
|
Oh, I always reply to my own posts. 7/8 of the time, I find out my own answer. But I know that others want to know the answer too, and replying to myself is a good way to let them in on the solution, too.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
How did you find this way ?
Did you show how values / keys are changed in the registry during changing the wallpaper / today screen?
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
It was a long process of looking into partial clues. I found one clue in the registry key HKEY_CLASSES_ROOT\tdyskin\Shell\Open\Command . Then I found an answer to a similar question in a newsgroup saying that you need to broadcast a message after setting the skin (by Vassili Phillipov). Suddenly, something flashed in my mind and voilá!
This approach has a problem, though. If you have an installed CF card with an actionable Autorun.exe, your wallpaper will not be correctly set. I'm looking into this issue.
|
|
|
|
|
Wow ... Another great detective work ...
YOu should work for the police .
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Daniel S. wrote:
YOu should work for the police
Nah... They have to work with all sorts of nasty issues and terrible people. I'd rather investigate these harmless issues and share them with all of you bright CPians.
Thanks for your compliment!
João Paulo
|
|
|
|
|
New post. Check it out! The bug is corrected.
|
|
|
|
|
I found a bug in the code I posted before. When you change from the Bliss theme to any other one, you will get a painting error on the Today screen. This is because the code I posted did not delete the UseStartImage value. You have to delete it before sending the broadcast message to the desktop. Here is the revised code:
PROCESS_INFORMATION pi;
CString strCmdLine(_T("/safe /noui /nouninstall /delete 0 ")),
strFile;
HKEY hKey;
LONG lRet;
m_edtFile.GetWindowText(strFile);
strCmdLine += strFile;
lRet = RegOpenKeyEx(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Today"), 0, 0,
&hKey);
if(ERROR_SUCCESS == lRet)
{
RegDeleteValue(hKey, _T("UseStartImage"));
if(::CreateProcess(_T("\\Windows\\wceload.exe"),
strCmdLine, NULL, NULL, FALSE, 0, NULL, NULL, NULL, &pi))
{
::WaitForSingleObject(pi.hProcess, INFINITE);
RegSetValueEx(hKey, _T("Skin"), 0, REG_SZ, (BYTE*)(LPCTSTR)strFile,
sizeof(TCHAR) * (strFile.GetLength() + 1));
RegCloseKey(hKey);
::SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);
}
}
As before, strFile contains the full path skin file name.
|
|
|
|
|
Thanks!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Hi!
I`m relative new to Embedded Visual C++ and Basic. I have good experience with Visual Studio C++.
What i want to do is to make an Automation Server in C++ so i can expose methods to Visual Basic by
using Createobject() from the Visual Basic side.
I have made an Automation Server in Visual C++ by using MFC and a ODL file, it was pretty easy because
much of the code was generated with the AppWizard. With Embedded Visual C++ its not that easy if you
are making an exe file, but with DLL it works fine because there the odl is generated.
Anyway, i made an Automation Server, compiled just fine, but when testing it with Visual Basic it doesn`t find the activeX object. So i guess my Automation Server didn`t get registered in the windows register on the PocketPC, the type ID should be correct.
I hope someone knows how to make an Automation Server in Embedded Visual C++ :=)
Hope someone will answer.
|
|
|
|
|
I am currently working with MS embedded Visual c++ 3.0 and using its Pocket pc 2002 emulator for debugging. The matter is that I have to download many files to the emulator (one by one) for running my application (not only the program and dll files that are automatically downloaded). After shuting down the emulator or rebooting my desktop computer, the emulator's memory is lost, so I have to repeat the process.
I was wondering if there's any option or tool that make possible to backup the emulator's memory state and reload it when neccesary.
Thank you!
|
|
|
|
|
Jose M Castellanos wrote:
I was wondering if there's any option or tool that make possible to backup the emulator's memory state and reload it when neccesary.
The easiest approach is when you shut down the emulator, tell it to keep its state (there's a combo for that purpose).
|
|
|
|
|