嗨我培训开发一个应用程序,但我想添加一个具有特定外观的树我成功做到这一点,但我所拥有的外观不是我的客户想要的应用程序是使用MFC和C++开发的.
我的应用程序如下所示:
我希望它看起来像这样:
我正在使用的代码:
CRect rectDummy(0,0,200,600);
//rectDummy.SetRectEmpty();
CTreeCtrl m_wndClassView;
const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS | WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
if (!m_wndClassView.Create(dwViewStyle, rectDummy, &m_wndView, 2))
{
TRACE0("Failed to create Class View\n");
return -1; // fail to create
}
HTREEITEM hRoot = m_wndClassView.InsertItem(_T("System Summary"), 0, 0);
m_wndClassView.SetItemState(hRoot, TVIS_BOLD, TVIS_BOLD);
HTREEITEM hClass = m_wndClassView.InsertItem(_T("Hardwre Resources"), 1, 1, hRoot);
hClass = m_wndClassView.InsertItem(_T("Components"), 1, 1, hRoot);
hClass = m_wndClassView.InsertItem(_T("Software Enviroment"), 1, 1, hRoot);
Run Code Online (Sandbox Code Playgroud)
如果可能的话,我更喜欢使用MFC/C++的解决方案,而不是使用第三方库.
当我运行以下代码时:
data := response {
response := http.send({
"method" : "GET",
"url": "https://httpbin.org/status/200"
})
}
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
发生 1 个错误:policy.rego:4: rego_type_error: 表达式中的不安全内置函数调用:http.send
我使用 rego play 来运行该策略。https://play.openpolicyagent.org/p/iqK8Zt5L62