mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 23:45:42 +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
|
@ -228,7 +228,10 @@ HBITMAP InitializeImage(LPCWSTR name, LPWIN32_FIND_DATAW pFound, BOOL isFile)
|
|||
COLORREF white = RGB(255, 255, 255);
|
||||
HBITMAP hBitmap = CreateColorDIB(registrySettings.BMPWidth, registrySettings.BMPHeight, white);
|
||||
if (hBitmap == NULL)
|
||||
{
|
||||
ShowOutOfMemory();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
HDC hScreenDC = ::GetDC(NULL);
|
||||
g_xDpi = (float)::GetDeviceCaps(hScreenDC, LOGPIXELSX);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue