i need a modern style for my program. The default style is similar to Windows Vista and i want a modern style like Windows 10!!! Please Help :(( In python i can solve this easly with tkinter, only need "from tkinter.ttk import * " for a modern style of the widgets, but in C i can not solve this, i missing a solution for this problem in long time but my english level don't help me jajaja... and i really need help with this. image of i want
Here my example code:
#include <windows.h>
#define ID_BTNHI 0
LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
WNDCLASSEX class_;
int WINAPI WinMain(HINSTANCE hInstanciaAct, HINSTANCE hInstanciaPrev, LPSTR IpCmdLine, int iCmdShow){
ShowWindow(GetConsoleWindow(), SW_HIDE);
HWND hWnd;
MSG msg;
class_.cbSize = sizeof(WNDCLASSEX);
class_.cbWndExtra = 0;
class_.cbClsExtra = 0;
class_.style = CS_HREDRAW|CS_VREDRAW;
class_.lpfnWndProc = WndProc;
class_.hInstance = hInstanciaAct;
class_.hIcon = LoadImage(NULL, "icoff.ico", IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_LOADFROMFILE);
class_.hIconSm = LoadImage(NULL, "icoff.ico", IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_LOADFROMFILE);
class_.hCursor = LoadCursor(NULL, IDC_ARROW);
class_.lpszClassName = "MYCLASS";
class_.lpszMenuName = NULL;
class_.hbrBackground = GetSysColorBrush(COLOR_WINDOW);
if(!RegisterClassEx(&class_)){
MessageBox(NULL, "NON", "ERROR", MB_ICONERROR);
return EXIT_FAILURE;
}
hWnd = CreateWindowEx(0, "MYCLASS", "Folder Open", WS_OVERLAPPED | WS_MINIMIZEBOX | WS_SYSMENU, CW_USEDEFAULT, CW_USEDEFAULT, 340, 140, HWND_DESKTOP, NULL, hInstanciaAct, NULL);
if(hWnd == NULL){
MessageBox(NULL, "NON2", "ERROR", MB_ICONERROR);
return EXIT_FAILURE;
}
ShowWindow(hWnd, iCmdShow);
UpdateWindow(hWnd);
while(GetMessage(&msg, NULL, 0, 0) > 0){
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
HWND hBtn;
LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam){
switch(msg){
case WM_CREATE:{
hBtn = CreateWindow("BUTTON", "Open Folder", WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, 82.5, 48, 175, 22.5, hWnd, (HMENU)ID_BTNHI, GetModuleHandle(NULL), NULL);
break;
}
case WM_COMMAND:{
switch(LOWORD(wParam)){
case ID_BTNHI:{
system("start .");
break;
}
}
break;
}
case WM_DESTROY:{
PostQuitMessage(0);
break;
}
default:{
return DefWindowProc(hWnd, msg, wParam, lParam);
}
}
return 0;
}