Code which you can use to load images from folder into Imgui::Image
Includes you need
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <d3d9.h>
#include <d3dx9.h>
#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
#include "imgui/imgui.h"
#include "imgui/examples/imgui_impl_win32.h"
#include "imgui/examples/imgui_impl_dx9.h"
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
After that just implement
for (int i = 0; i < images.size(); i++) {
ImGui::PushID(i);
ImVec2 uv0 = ImVec2(0, 0);
ImVec2 uv1 = ImVec2(1, 1);
ImGui::Image(images
.texture, ImVec2(size, size), uv0, uv1);
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("%s", images.name.c_str()); }
ImGui::PopID();
}
And load images from folder function should go into your main() when you start your app