mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 15:36:04 +00:00
[MSPAINT] Show out-of-memory message (#5817)
- Improve ImageModel::PushImageForUndo. - Use FormatMessage in newly added ShowOutOfMemory function. - Call ShowOutOfMemory() when out of memory. CORE-19227, CORE-19094
This commit is contained in:
parent
501c2bdd63
commit
ab199cc147
5 changed files with 43 additions and 7 deletions
|
@ -22,6 +22,18 @@ CMainWindow mainWindow;
|
|||
|
||||
/* FUNCTIONS ********************************************************/
|
||||
|
||||
void ShowOutOfMemory(void)
|
||||
{
|
||||
WCHAR szText[256];
|
||||
::FormatMessageW(FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
ERROR_OUTOFMEMORY,
|
||||
0,
|
||||
szText, _countof(szText),
|
||||
NULL);
|
||||
mainWindow.MessageBox(szText, NULL, MB_ICONERROR);
|
||||
}
|
||||
|
||||
// get file name extension from filter string
|
||||
static BOOL
|
||||
FileExtFromFilter(LPTSTR pExt, OPENFILENAME *pOFN)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue