WXforum.net

Miscellaneous Debris => Tech Corner => Topic started by: lthcweb on September 23, 2021, 05:15:35 PM

Title: Generate UI with xrc file, wxChoice control operation has error.
Post by: lthcweb on September 23, 2021, 05:15:35 PM
Generate UI with xrc file:
Code: [Select]
wxXmlResource::Get()->InitAllHandlers();
wxXmlResource::Get()->Load(wxT("res\\Launcher.xrc"));

then....

Code: [Select]
    wxChoice* gameCtrl = XRCCTRL(*this, "ID_CHOICE_GAMEPROCESS", wxChoice);
    if (gameCtrl == nullptr)
        return;
    gameCtrl->Clear();

Error Info: __vfptr==0xffffffff
(https://imgpp.com/images/2021/09/23/-2021-09-23-210958.png)