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

Function DisplayColorDialog

tools/assimp_view/MessageProc.cpp:444–461  ·  view source on GitHub ↗

------------------------------------------------------------------------------- Let the user choose a color in a windows standard color dialog -------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

442// Let the user choose a color in a windows standard color dialog
443//-------------------------------------------------------------------------------
444void DisplayColorDialog(D3DCOLOR* pclrResult) {
445 CHOOSECOLOR clr;
446 clr.lStructSize = sizeof(CHOOSECOLOR);
447 clr.hwndOwner = g_hDlg;
448 clr.Flags = CC_RGBINIT | CC_FULLOPEN;
449 clr.rgbResult = RGB((*pclrResult >> 16) & 0xff,(*pclrResult >> 8) & 0xff,*pclrResult & 0xff);
450 clr.lpCustColors = g_aclCustomColors;
451 clr.lpfnHook = nullptr;
452 clr.lpTemplateName = nullptr;
453 clr.lCustData = 0;
454
455 ChooseColor(&clr);
456
457 *pclrResult = D3DCOLOR_ARGB(0xFF,
458 GetRValue(clr.rgbResult),
459 GetGValue(clr.rgbResult),
460 GetBValue(clr.rgbResult));
461}
462
463//-------------------------------------------------------------------------------
464// Let the user choose a color in a windows standard color dialog

Callers 2

ChooseBGColorFunction · 0.85
MessageProcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected