Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


programming problem (again) - Win32 api function failed

ray55ray55 Member Posts: 5
Thanks for answering my questions. I don't program very often, but when I do it can become quite messy. I was able to produce a stand-alone executable with Borland c++ builder, but when executing it on another machine, I receive this Windows error:

ComboBox82->Items.Strings: A Win32 API function failed.

I looked over the program, and can't find any coding errors. Due to my limited programming experience, this Windows error is a complete mystery to me. Please help.


  • bilderbikkelbilderbikkel Member Posts: 754
    Instead of
    : ComboBox82->Items.Strings: A Win32 API function failed.


    assert(ComboBox82!=0); //Just a check

    const int maxIndex = ComboBox82->Items->Count;
    const int index = std::rand()%maxIndex;
    ComboBox82->Items->operator [](index);

    Have fun,

Sign In or Register to comment.