|
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).
|
|
|
|
|
I have an MFC application that I need to maintain both for Windows and Windows CE (all the various flavors of both Pocket PC and HPCPro). I wrote it for the PC first using VC++ 6.0. I need to port it to CE (I'm using eVC++ 3.0 for that) but I don't want to have to maintain two sets of code.
I've written for CE before so I know I'll have to deal with unicode, function parameter differences, etc. I figure I can just #ifdef the differences that can't be solved generically.
But I'm having problems with the resource files. I don't want to have to rebuild all the dialogs and controlls on the CE side....and also the resource ID numbering would then be out of sync. So, I've heard that the resource file format is compatible between VC++6 and eVC++3 so I copied the resource files(s) to the CE project, but am getting resource compile errors like:
error RC2111 : invalid control type,
error RC2113 : END expected in dialog, and
error RC2135 : file not found: 1002.
What project files and resources are shareable between the two projects? Has anyone done something like this before?
majoob
|
|
|
|
|
OK, I pretty much have it figured out, and am currently sharing code and resource files between a CE eVC++3.0 project and a PC VC++6.0 project. It is slick...everything is in the same project directory. The resource file errors I was getting was from context-sensitive help incompatibility. Post a reply if you are interested in the details of how I did this.
|
|
|
|
|
I want to do the following with my user interface in my application:
1. Split my application into 2 parts. (I use CSplitterWnd::CreateStatic)
2. The Upperpart is a "global" tool bar which is always accessable.
3. The Lowerpart is a property sheet. (I use CPropertyShee::DoModal)
4.When click into one of the icon of the toolbar, it will switch to another property page (of course, the old sheet should not be destroyed).
It is possible for PocketPC 2002?
I try thousand of solutions, however, they fail.
The main problem is:
Is it impossible for PPC 2002 or am I doing wrong idea? (i.e. as beginners' always ask for)
I only can see similar user interface on BlueTooth Manager in iPAQ 5450 or the Backlight Setting on Pocket PC 2002.
Please suggest ideas on how to setup for such user interface. Or how to do the similar task in another way?
|
|
|
|
|