// Windows Header Files:
#include "exception.h"
#include "base_window.h"
+#include "dpi.h"
#define XBYAK64
#include "xbyak.h"
// DLLのリンク
~device_context() {}
operator HDC(){return holder_->get();}
private:
- boost::scoped_ptr<Holder> holder_;
+ std::unique_ptr<Holder> holder_;
};
//struct handle_holder : boost::noncopyable
typedef boost::signals2::signal<LRESULT (HWND,uint32_t,WPARAM, LPARAM) > on_message_type;
on_message_type on_message;
- operator HWND() {return hwnd_;};
+ operator HWND() const {return hwnd_;};
- virtual void * raw_handle(){return hwnd_;};
- virtual void show(uint32_t show_flag);
+ virtual void * raw_handle() const {return hwnd_;};
+// virtual void show(uint32_t show_flag);
+
+ virtual void show() {
+ ::ShowWindow(hwnd_,SW_SHOW);
+ ::GetWindowPlacement(hwnd_,&wp_);
+ }
+
+ // Window を画面から隠す
+ virtual bool is_show() {
+ return ( wp_.showCmd == SW_SHOWMAXIMIZED
+ || wp_.showCmd == SW_SHOWMINIMIZED
+ || wp_.showCmd == SW_SHOWNORMAL );
+ };
+
+ //
+ virtual void hide()
+ {
+ ::ShowWindow(hwnd_,SW_HIDE);
+ ::GetWindowPlacement(hwnd_,&wp_);
+ };
+
virtual void text(std::wstring& text)
{
::SetWindowTextW(*this,text.c_str());
std::wstring name_;
float width_,height_;
bool fit_to_display_;
- boost::shared_ptr<sf::window_class_ex> wnd_class_;
+ std::shared_ptr<sf::window_class_ex> wnd_class_;
WNDPROC thunk_proc_;
- };
+ dpi dpi_;
+ WINDOWPLACEMENT wp_;
+ };
struct av_mm_thread_characteristics
{
std::wstring name_;
float width_,height_;
bool fit_to_display_;
-
+ WINDOWPLACEMENT wp_;//
};
struct widget