Had the same problem the other day and this helped me. Thanks to ChatGPT.
wxIcon appIcon; appIcon.LoadFile("IDI_APP_ICON", wxBITMAP_TYPE_ICO_RESOURCE); if (appIcon.IsOk()) { SetIcon(appIcon); }