Skip to content

Instantly share code, notes, and snippets.

@twist84
Created January 13, 2024 00:08
Show Gist options
  • Save twist84/ee9eb0855c44f5acdf4a72fe2e41b63e to your computer and use it in GitHub Desktop.
Save twist84/ee9eb0855c44f5acdf4a72fe2e41b63e to your computer and use it in GitHub Desktop.
#define IDD_CHOOSE_RASTERIZER_DIALOG 101
#define ID_CHOOSE_RASTERIZER_BUTTON_OK IDOK
#define ID_CHOOSE_RASTERIZER_BUTTON_CANCEL IDCANCEL
#define ID_CHOOSE_RASTERIZER_LISTBOX_RENDERER 1001
#define ID_CHOOSE_RASTERIZER_LISTBOX_SELECTED_DEVICE_CHARACTERISTICS 1002
#define ID_CHOOSE_RASTERIZER_LISTBOX_SELECTED_DEVICE_DISPLAY_MODES 1003
#define ID_CHOOSE_RASTERIZER_LISTBOX_DEVICE 1004
#define ID_CHOOSE_RASTERIZER_BUTTON_RUN_WINDOWED 1005
#define ID_CHOOSE_RASTERIZER_BUTTON_DO_NOT_SHOW_THIS_AGAIN 1007
#define ID_CHOOSE_RASTERIZER_BUTTON_DISABLE_MULTITEXTURING_D3D_ONLY 1008
#define ID_CHOOSE_RASTERIZER_BUTTON_TEXTURE_QUALITY 1013
#define ID_CHOOSE_RASTERIZER_BUTTON_HIGH_RES_32BIT 1014
#define ID_CHOOSE_RASTERIZER_BUTTON_LOW_RES_32BIT 1015
#define ID_CHOOSE_RASTERIZER_BUTTON_HIGH_RES_16BIT 1016
#define ID_CHOOSE_RASTERIZER_BUTTON_LOW_RES_16BIT 1017
INT_PTR CALLBACK ChooseRasterizerDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_INITDIALOG:
// Initialization code if needed
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hwndDlg, LOWORD(wParam));
return TRUE;
}
break;
}
return FALSE;
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
DialogBox(hInstance, MAKEINTRESOURCE(IDD_CHOOSE_RASTERIZER_DIALOG), NULL, ChooseRasterizerDialogProc);
// rest of main
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment