Thread: Access Windows directory with OPENFILENAME in Windows mobile

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    May 2011
    Posts
    1

    Access Windows directory with OPENFILENAME in Windows mobile

    Hi ALL,

    I need to access Windows and other folders in my Application for Windows Mobile 6.53 through OPENFILENAME. I am able to access \My Documents folder alone.
    But not any other folders under \Windows.

    My Code:
    Code:
    OPENFILENAME ofn;
    	
    	ZeroMemory(&ofn, sizeof(OPENFILENAME));
    	ofn.lStructSize		= sizeof(OPENFILENAME);
    	ofn.hwndOwner		= hwnd;
    	ofn.lpstrFilter		= _T("Application Files (*.exe)\0*.exe\0LNK Files (*.lnk)\0*.lnk\0All Files (*.*)\0*.*\0");
    	ofn.lpstrFile		= filename;
    	ofn.nMaxFile		= MAX_PATH;
    	ofn.nFilterIndex	= 1;
    	ofn.lpstrTitle		= (LPCWSTR)IDS_BROWSEFILE;
    	ofn.lpstrFileTitle	= NULL ;
    	ofn.nMaxFileTitle	= 0 ;
    	ofn.lpstrInitialDir	= _T("\\My Documents\\My Pictures") ;
    	ofn.Flags			= OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST | OFN_EXPLORER;
    	return GetOpenFileName(&ofn)
    Pls help.
    Last edited by Salem; 05-28-2011 at 05:35 AM. Reason: added code tags

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Windows mobile
    By AcerN30 in forum C++ Programming
    Replies: 13
    Last Post: 05-02-2008, 10:28 AM
  2. Own a windows mobile pocket pc?
    By AcerN30 in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 04-30-2008, 02:32 PM
  3. c/c++ Windows Mobile Developer Needed
    By ParaDiddle in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 08-02-2007, 07:24 AM
  4. Windows Mobile 5.0 == Windows Mobile 2005?
    By George2 in forum C Programming
    Replies: 4
    Last Post: 08-02-2006, 10:53 PM
  5. windows mobile programming
    By xddxogm3 in forum Windows Programming
    Replies: 2
    Last Post: 12-07-2004, 12:33 AM

Tags for this Thread