【发布时间】:2017-05-01 22:58:57
【问题描述】:
如何去除这个白色区域?它破坏了我的 GUI 设计。
我想制作一个由windows生成的阴影和一条蓝线。
所以我找到了一个选项,使蓝线(wxRESIZE_BORDER),但它使一个像图像一样的白色区域。
//MainFrame.h
#pragma once
#define _CRT_SECURE_NO_WARNINGS
#include <wx/frame.h>
class MainFrame : public wxFrame
{
public:
MainFrame(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(310, 390), long style = wxSUNKEN_BORDER|wxRESIZE_BORDER);
};
//MainFrame.cpp
#include "MainFrame.h"
MainFrame::MainFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxFrame(parent, id, title, pos, size, style)
{
this->Centre(wxBOTH);
}
//Main.h
#pragma once
#include <wx/wx.h>
class App : public wxApp
{
public:
virtual bool OnInit();
};
//Main.cpp
#include "Main.h"
#include "MainFrame.h"
IMPLEMENT_APP(App)
bool App::OnInit()
{
MainFrame *frame = new MainFrame(NULL);
frame->Show(true);
return true;
}
【问题讨论】:
-
你想要它周围的蓝线吗?
-
提供MCVE并指定库的版本。
-
@SangWanJeon,你能发布你的代码吗?另外,您要在哪个版本的 Windows 上试用此功能?
-
@A.Hue 是的。我想要蓝线和蓝线生成时产生的阴影。
-
@Igor 我会尽快发布代码。我正在使用 Windows 10、Redstone 更新、msvc 14.0(vs 2015) 和 wxWidgets Library 3.1.0
标签: c++ user-interface wxwidgets