ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

int main ( void  )

Definition at line 78 of file shelltests.cpp.

{
     // initialize COM
    ComInit usingCOM;


    HWND hwnd = 0;


    try {

         // example for retrieval of special folder paths

        SpecialFolderFSPath programs(CSIDL_PROGRAM_FILES, hwnd);
        SpecialFolderFSPath autostart(CSIDL_STARTUP, hwnd);

        cout << "program files path = " << (LPCTSTR)programs << endl;
        cout << "autostart folder path = " << (LPCTSTR)autostart << endl;

        cout << endl;


         // example for enumerating shell namespace objects

        cout << "Desktop:\n";
        dump_shell_namespace(GetDesktopFolder());
        cout << endl;

        cout << "C:\\\n";
        dump_shell_namespace(ShellPath("C:\\").get_folder());
        cout << endl;


         // example for calling a browser dialog for the whole desktop

        FolderBrowser desktop_browser(hwnd,
                                      BIF_RETURNONLYFSDIRS|BIF_EDITBOX|BIF_NEWDIALOGSTYLE,
                                      TEXT("Please select the path:"));

        if (desktop_browser.IsOK())
            MessageBox(hwnd, desktop_browser, TEXT("Your selected path"), MB_OK);


         // example for calling a rooted browser dialog

        ShellPath browseRoot("C:\\");
        FolderBrowser rooted_browser(hwnd,
                                     BIF_RETURNONLYFSDIRS|BIF_EDITBOX|BIF_VALIDATE,
                                     TEXT("Please select the path:"),
                                     browseRoot);

        if (rooted_browser.IsOK())
            MessageBox(hwnd, rooted_browser, TEXT("Your selected path"), MB_OK);

    } catch(COMException& e) {

        //HandleException(e, hwnd);
        cerr << e.ErrorMessage() << endl;

    }

    return 0;
}

Generated on Wed May 23 2012 04:44:28 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.