MCPcopy Create free account
hub / github.com/assimp/assimp / PopulateExportMenu

Function PopulateExportMenu

tools/assimp_view/MessageProc.cpp:916–930  ·  view source on GitHub ↗

------------------------------------------------------------------------------- Fill the 'export' top level menu with a list of all supported export formats -------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

914// Fill the 'export' top level menu with a list of all supported export formats
915//-------------------------------------------------------------------------------
916void PopulateExportMenu() {
917 // add sub items for all recent files
918 Exporter exp;
919 HMENU hm = ::CreateMenu();
920 for(size_t i = 0; i < exp.GetExportFormatCount(); ++i) {
921 const aiExportFormatDesc* const e = exp.GetExportFormatDescription(i);
922 char tmp[256];
923 sprintf(tmp,"%s (%s)",e->description,e->id);
924
925 AppendMenu(hm,MF_STRING,AI_VIEW_EXPORT_FMT_ID(i),tmp);
926 }
927
928 ModifyMenu(GetMenu(g_hDlg),ID_EXPORT,MF_BYCOMMAND | MF_POPUP,
929 (UINT_PTR)hm,"Export");
930}
931
932//-------------------------------------------------------------------------------
933// Export function

Callers 1

InitUIFunction · 0.85

Calls 2

GetExportFormatCountMethod · 0.80

Tested by

no test coverage detected