Added Save and ColorPick dialogs
This commit is contained in:
parent
d834afc75f
commit
8eea475765
@ -23,16 +23,29 @@ int Dialog_open(wchar_t* path, int pathSize)
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
int Dialog_save(char* path, int pathSize)
|
int Dialog_save(wchar_t* path, int pathSize)
|
||||||
{
|
{
|
||||||
(void)path;
|
OPENFILENAME dialog;
|
||||||
(void)pathSize;
|
(void)pathSize;
|
||||||
return 0;
|
ZeroMemory(&dialog, sizeof(dialog));
|
||||||
|
dialog.lStructSize = sizeof(dialog);
|
||||||
|
dialog.lpstrFilter = L"Rocket (*.rocket)\0*All Files (*.*)\0*.*\0";
|
||||||
|
dialog.lpstrFile = path;
|
||||||
|
dialog.nMaxFile = MAX_PATH;
|
||||||
|
dialog.Flags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
|
||||||
|
dialog.lpstrDefExt = L"rocket";
|
||||||
|
return GetSaveFileName(&dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void Dialog_showColorPicker(unsigned int* color)
|
void Dialog_showColorPicker(unsigned int* color)
|
||||||
{
|
{
|
||||||
(void)color;
|
CHOOSECOLOR cc;
|
||||||
|
ZeroMemory(&cc, sizeof(CHOOSECOLOR));
|
||||||
|
cc.lStructSize = sizeof(CHOOSECOLOR);
|
||||||
|
cc.rgbResult = *color;
|
||||||
|
cc.Flags = CC_FULLOPEN | CC_RGBINIT;
|
||||||
|
if (ChooseColor(&cc))
|
||||||
|
*color = cc.rgbResult;
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user