------------------------------------------------------------------------------- Let the user choose a color in a windows standard color dialog -------------------------------------------------------------------------------
| 442 | // Let the user choose a color in a windows standard color dialog |
| 443 | //------------------------------------------------------------------------------- |
| 444 | void 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 |
no outgoing calls
no test coverage detected