根据manual,wxImageList::Add()
应该返回新添加图像的索引位置。
但是在我的应用程序中,我仅获得返回值0
(添加图像正常时)或-1
(失败)。当我调试功能时
int wxImageList::Add(const wxBitmap& bitmap, const wxColour& maskColour)
这对我来说似乎很清楚:在Windows中,返回的值来自对ImageList_AddMasked()
/ IsolationAwareImageList_AddMasked()
/ __IsolationAware_pfn()
的调用,其中后者似乎返回了{{1 }},但不是列表索引值。
所以我的问题是:如何获取最近添加的图像的索引值?
答案 0 :(得分:0)
一个明显的想法是只使用quizData: {
"questions": [{
"q": "Look at the following selector: $(\"div\")<br/> What does it select?",
"a": "All div elements",
"options": [
"All div elements",
"The first div element",
"All elements with the class \"div\""
]
}, {
"q": "Which of the following is correct",
"a": "jQuery is a JavaScript Library",
"options": [
"jQuery is a JSON Library",
"jQuery is a JavaScript Library"
]
}, {
"q": "jQuery uses CSS selectors to select elements?",
"a": "True",
"options": [
"True",
"False"
]
}, {
"q": "Which sign does jQuery use as a shortcut for jQuery?",
"a": "the $ sign",
"options": [
"the % sign",
"the $ sign",
"the ? Sign"
]
}, {
"q": "Is jQuery a library for client scripting or server scripting?",
"a": "Client scripting",
"options": [
"Client scripting",
"Server scripting",
]
}]
}
,这有什么问题吗?