 |
|
 |
Hello I want to run ppt or run .exe file on my smartdevice application. I am using .net2003--smartdevice application--WindowsCE
Please help me
Thanks in advance
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
THe only thing missing is an ability to browse/open/copy files from a PC on a lan....etc....
Very cooool though so far!
Many Thanks
Jim
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
This kind of deals with file open dialog... indirectly... well ok it doesn't really, but maybe you have run into this...
I have a Windows mobile application that I have handling the user clicking on a file and the application starting and then opening the file ( shell opendoc command ) - this works !
However, the shell open command which should be sent when the user clicks on a file and the application is already running does not work.
Any ideas?
|
| Sign In·View Thread·PermaLink | 1.83/5 (3 votes) |
|
|
|
 |
|
 |
Hi,
I have ported this code to WM5 under VS2005 and I think it may be interesting to share it with you. For now I have implemented it quickly without taking in account portability with PPC2002. I am rewriting it cleaner and I will post the code today on tomorrow.
UPDATE : I won't have time to keep compatibility with PPC2002 so I am posting the source code. You can find it at CeFileOpenDlg_VS2005_UPDATED.zip Juste note that it works ONLY with MFC in static. To get it to work with MFC as dll you need to rebuild a VS2005 project from scratch because I think that conversion from eVC project is not perfect.
For people interested, main difference was related to command bar. With PPC2003 and WM5 CCeCommandBar has been replaced by CCommandBar and you need to handle toolbar creation. I have replaced
BOOL CFileOpenDlg::OnInitDialog() { ...
m_pCmdBar = (CCommandBar*)m_pWndEmptyCB; m_pCmdBar->LoadToolBar(IDR_FILEOPEN);
by if(!m_wndCommandBar.Create(this) || !m_wndCommandBar.InsertMenuBar(IDR_MAINFRAME) || !m_wndCommandBar.AddAdornments() || !m_wndCommandBar.LoadToolBar(IDR_FILEOPEN)) { TRACE0("Failed to create CommandBar\n"); return -1; } ...
REMOVE from MainFrm.h #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif
REPLACE #if defined(_WIN32_WCE_PSPC) && (_WIN32_WCE >= 212) By #if _WIN32_WCE >= 212
remove DS_MODALFRAME from windows style
In linker settings you also need to replace wWinMainCRTStartup by WinMainCRTStartup(without w before).
|
| Sign In·View Thread·PermaLink | 1.67/5 (2 votes) |
|
|
|
 |
|
 |
Dear Vincent,
It's so great that you successfully ported this file open dialog under VS2005.
I am a developer who tried to port this project to eVC++ 4.0 before. However, when I opened the project and compiled it, there are some errors.
Could you give me some hints to fix these errors I faced? Thank you very much. My target platform is WinCE4.2 device using eVC++ 4.0.
The errors are like this:
D:\kst\share\pocket pc\CeFileOpenDlg_demo\FileOpen\MainFrm.h(73) : error C2065: 'NUM_TOOL_TIPS' : undeclared identifier D:\kst\share\pocket pc\CeFileOpenDlg_demo\FileOpen\MainFrm.h(73) : error C2057: expected constant expression D:\kst\share\pocket pc\CeFileOpenDlg_demo\FileOpen\FileOpenDlg.cpp(494) : error C2065: 'm_pWndEmptyCB' : undeclared identifier D:\kst\share\pocket pc\CeFileOpenDlg_demo\FileOpen\FileOpenDlg.cpp(515) : error C2065: 'WS_NONAVDONEBUTTON' : undeclared identifier D:\kst\share\pocket pc\CeFileOpenDlg_demo\FileOpen\FileOpenDlg.cpp(516) : error C2065: 'SHDoneButton' : undeclared identifier D:\kst\share\pocket pc\CeFileOpenDlg_demo\FileOpen\FileOpenDlg.cpp(516) : error C2065: 'SHDB_HIDE' : undeclared identifier MainFrm.cpp D:\kst\share\pocket pc\CeFileOpenDlg_demo\FileOpen\MainFrm.cpp(57) : error C2039: 'm_bShowSharedNewButton' : is not a member of 'CCeCommandBar' C:\Program Files\Windows CE Tools\wce400\STANDARDSDK\mfc\include\wcebar.h(27) : see declaration of 'CCeCommandBar' Generating Code... Error executing cl.exe.
Jason
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
 |
Hi, I made some additions to João Paulo Figueira File Open Dialog.
The best would be, if I could upload the whole project with the source code here
Here is the description:
FileOpen2.exe =============
A File Open Dialog for the PocketPC 2002 - 2005 The Original of this software was written by João Paulo Figueira, first published at www.codeproject.com
With contributions from Dmitry Yakimov and tim2342
With additions for command line use, selection of an initial directory and a 'File Input Window'. The whole OLE stuff wa removed  by NaviGer (Hans-Gerhard Flohr)
License: MIT / X11
New: ====
You can call the FileOpen2.exe with a command line parameter. The command line parameter is a name of file, which contains the open / save definitions. The selected path (and the filename) are returned in the command file. The previous contents of the command file is destroyed. If the result begins with a '=' character, the user has pressed the ok button. If the result begins with a '!' character, the user has pressed the cancel button.
Note: This Version runs only on Windows Mobile from WM2003 -2005 due to the use of the aygshell.dll
The following keys are decoded in the Command file: ===================================================
Title= :The title of the file open window InitialDir= :The initial directory (may also contain the file name) OpenText= :The text, which shall be shown in the dialog
Now the keys from the Microsoft CFileDialog Class definition: CFileDialog dlg(TRUE, NULL, NULL, OFN_PROJECT); CFileDialog( BOOL bOpenFileDialog, LPCTSTR lpszDefExt = NULL, LPCTSTR lpszFileName = NULL, DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, LPCTSTR lpszFilter = NULL, ...);
OpenMode=0 :1= Open, 0 Save DefExt= :Default extension (currently not supported) FileName= :The filename, to open or to which to save Flags= :Flags according to the MS specification, only: OFN_HIDEREADONLY and OFN_OVERWRITEPROMPT Filter= :File filter, according to the MS specification.GPS. Must contain '|' as delimiters
Example of the contents of a command file: ==========================================
Title=Test Open InitialDir=\Storage Card\POIObserver OpenText=Open OpenMode=1 DefExt= FileName= Flags= Filter=GPS File (*.txt,*.gps)|*.txt;*.gps|All Files (*.*)|*.*||");
Example of the contents of the command file after returning: ============================================================
=\Storage Card\POIObserver\ZO_FS.TXT when the user had pressed the cancel button or !\Storage Card\POIObserver\ZO_FS.TXT when the user had pressed the cancel button.
Remarks: ========
Non existing command file ------------------------- You may also specify a name of a non existing file, the result of the selection is written back to that file (if possible).
Why not a DLL? -------------- Many software developers have problems with user written DLLs and .NET. So it is easier, to write to a file, close it, and call FileOpen2.exe as a child process. When the child process terminates, the result can be read from the same file.
MS specific: ------------ I noted, that MS is not able to interpret the '|' delimiters in the file filter, although noted in the description. So, if the calling FileOpen2 fails, you have to convert the filter string for the CFileDialog:
CString csFilter = _T("GPS Log File (*.txt)"); csFilter += _T('|'); csFilter += _T("*.txt"); csFilter += _T('|'); csFilter += _T("GPS Log File (*.gps)"); csFilter += _T('|'); csFilter += _T("*.gps"); csFilter += _T("||");
int Position; while((Position = csFilter.ReverseFind(_T('|'))) >= 0) csFilter.SetAt(Position, _T('\0'));
or --
TCHAR *tcFilter = _T("GPS ASC File (*.ASC)|*.ASC|All Files (*.*)|*.*||");
TCHAR *ptcPosition; while((ptcPosition = _tcsrchr(tcFilter, _T('|'))) != NULL) *ptcPosition = _T('\0');
-- modified at 13:28 Sunday 4th June, 2006
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi! Has anyone perhaps ported this project to Visual Studio 2005? Or is there perhaps a dll-file available to use this? I have many problems porting this (I think the most problem is the use of the STL wich (in this case) is developed for embedded VC++)
greetings Maik
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
 |
I'm using C# on an O2 to create a graphical application. Normally on a desktop machine a Bitmap class provides a Save method- what is the equivalent in WinCE?
Ta, Justin Clayden
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
what terms of use/distribuition must I know? can I make my own changes? Can I redistribute those changes as DLL (including a mention about the original author)?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
 |
Hi,It is a excellent Project.
However, I can not find deque.h when I compile.
What is my wrong?
Thanks
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Sorry, a correction: #include deque. The forum software removes the less and greater characters
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
You are right, these are the standard names for the header file. When i wrote this code, I was using another version of STL that actually used .h in the header file names.
Regards, João Paulo Figueira Embedded MVP
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
+ added ability to predetermine either a directory has got subdirs or not ! fixed leak of FindFirstFile handle
bool HasSubDirs(LPCTSTR pszPath) { WIN32_FIND_DATA fd; CString strSearch(pszPath); bool bRet;
strSearch.TrimRight( strSearch += strSearch += _T("*"); HANDLE hFind = FindFirstFile(strSearch, &fd); if((fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && !(fd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) && (hFind != INVALID_HANDLE_VALUE)) bRet = true; else bRet = false; if( hFind != INVALID_HANDLE_VALUE ) FindClose(hFind); return bRet; }
// CFileOpenDlg::EnumDirs // // Enumerates all subdirectories. Recurses depth-first // int EnumDirs(LPCTSTR pszPath, LPCTSTR pszFilter, HTREEITEM hItemParent) { WIN32_FIND_DATA fd; HANDLE hFind; BOOL bFind; HTREEITEM hItem = TVI_LAST; CString strSearch(pszPath), strBase(pszPath); int nCount = 0;
strSearch.TrimRight( strSearch += strBase.TrimRight( strBase += strSearch += pszFilter;
hFind = FindFirstFile(strSearch, &fd); bFind = (hFind != INVALID_HANDLE_VALUE);
while(bFind) { if((fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && !(fd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)) { TVINSERTSTRUCT tvi; CString strSub(strBase); int iIcon;
strSub += fd.cFileName; iIcon = GetIconIndex(strSub);
tvi.hParent = hItemParent; tvi.hInsertAfter = TVI_LAST; tvi.item.mask = TVIF_CHILDREN | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_TEXT | TVIF_PARAM; tvi.item.pszText = fd.cFileName; tvi.item.iImage = iIcon; tvi.item.iSelectedImage = iIcon; tvi.item.cChildren = I_CHILDRENCALLBACK; if( HasSubDirs(strSub) ) tvi.item.lParam = iHasSubDirs; else tvi.item.lParam = iWithoutSubDirs;
hItem = m_treeFolder.InsertItem(&tvi);
++nCount; /* strSub += _T("\\"); if(hItem) { m_treeFolder.SetItemData(hItem, 1); EnumDirs(strSub, pszFilter, hItem); }*/ }
bFind = FindNextFile(hFind, &fd); } if( hFind != INVALID_HANDLE_VALUE ) FindClose(hFind); return nCount; }
Dmitry Yakimov
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |