English 中文(简体)
wxChoice:SetString() 指数
原标题:wxChoice::SetString() Index Error

我最后要紧紧跟我申请中的轮椅控制。

....srcmswchoice.cpp(348): assert "IsValid(n)" failed in wxChoice::SetString(): invalid item index in wxChoice::SetString

错误本身非常明显,项目指数无效,但基于我的代码和(不是描述性的),我只需要确定栏号,然后允许我将案文贴在某一指数上。

这里,我的项目摘要:

int phones = Phones->size();
choiceDevice->SetColumns(phones); // Value greater than 0
choiceDevice->SetString(phones - 1, pInstance->ProfileName); // Should assign the last index the value of the ProfileName.
最佳回答

正如Alex所说,我用 t子 t:视窗上的SetColumns,因为它没有影响。 我发现,我不得不使用轮椅:Append,而不是确定栏号,然后确定个人体。

问题回答

如果<代码>Phones是空的,从而phones = 0?

wxChoice::SetColumns

评注:

This is implemented for GTK and Motif only and doesn’t do anything under other platforms.

It looks like SetColumns is used for multi-column choice control, I have never seen it. Anyway, it doesn t add new items to the control. In Windows it does nothing in any case.





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签