VIZ++ Class: OpenGLFileOpenDialog

 VIZ++ Class Library  VIZ++ Samples  VIZ++ ClassTree 

Source code

/*
 * OpenGLFileOpenDialog.h 
 * Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


#pragma once

#include <viz++/opengl/OpenGLFileDialog.h>

namespace VIZ {

class OpenGLFileOpenDialog :public OpenGLFileDialog {

public:
  OpenGLFileOpenDialog(OpenGLMainView* view,           
          const char* initialDir = NULL, 
          const char* filter="All Files (*.*)\0*.*\0", 
          const char* ext ="*")
  :OpenGLFileDialog(view, initialDir, filter, ext)
  {
    //ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
  }

  virtual bool popup()
  { 
    bool result = false;
    OPENFILENAME& ofn = getOpenFileName();
    int rc = GetOpenFileName(&ofn);
    if (rc == IDOK) {
      result = true;
    } 
    return result;
  }
};

}

Last modified: 10 Feb 2017

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