SOL9 Sample: SolControlPanel

SOL9 2.0 Samples

1 Screenshot


2 Source code

/*
 * SolControlPanel.cpp 
 * Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


// SOL9
// 2012/11/10

#include <sol\ApplicationView.h>
#include <sol\shell\ShellWindows.h>
#include <sol\ole\OleInitializer.h>


//  Program entry point.
void  Main(int argc, TCHAR** argv)
{
  OleInitializer initializer;

  try {

    SOL::ShellWindows shellWindows;

    PIDLIST_ABSOLUTE pidl;

    SHGetFolderLocation(NULL, 
      //CSIDL_PERSONAL,
      CSIDL_CONTROLS, 
      //CSIDL_ADMINTOOLS,
      //CSIDL_DESKTOP, 
      (HANDLE)-1,
      0,
      &pidl);

    SHOpenFolderAndSelectItems(pidl, 0, NULL, 0);

    _variant_t var;
    _variant_t root;    
    var.vt = VT_BYREF | VT_VARIANT;
    var.pvarVal = (VARIANT *)pidl;

    HWND hwnd = NULL;
    ComIDispatch dispatch =  shellWindows.findWindowSW(&var, &root, 
        SWC_BROWSER, 
        (LONG *)&hwnd, 
        SWFO_NEEDDISPATCH);

  } catch (HRESULT hr) {
    caught(Exception(hr));
  } catch (...) {
    caught(UnknownException());
  }
}


Last modified: 1 Feb 2017

Copyright (c) 2017 Antillia.com ALL RIGHTS RESERVED.