mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 09:22:58 +00:00
[ATL][MSPAINT] Add ATLTRACE and fix assertion failures (#4299)
- Implement ATLTRACE and AtlTrace in atlbase.h. - Fix assertion failures in mspaint. CORE-17969, CORE-18012
This commit is contained in:
parent
085f135f1a
commit
7014cf04b1
12 changed files with 380 additions and 56 deletions
|
@ -14,12 +14,14 @@
|
|||
|
||||
void ImageModel::NotifyDimensionsChanged()
|
||||
{
|
||||
imageArea.SendMessage(WM_IMAGEMODELDIMENSIONSCHANGED);
|
||||
if (imageArea.IsWindow())
|
||||
imageArea.SendMessage(WM_IMAGEMODELDIMENSIONSCHANGED);
|
||||
}
|
||||
|
||||
void ImageModel::NotifyImageChanged()
|
||||
{
|
||||
imageArea.SendMessage(WM_IMAGEMODELIMAGECHANGED);
|
||||
if (imageArea.IsWindow())
|
||||
imageArea.SendMessage(WM_IMAGEMODELIMAGECHANGED);
|
||||
}
|
||||
|
||||
ImageModel::ImageModel()
|
||||
|
@ -44,7 +46,7 @@ ImageModel::ImageModel()
|
|||
|
||||
void ImageModel::CopyPrevious()
|
||||
{
|
||||
DPRINT("%s: %d\n", __FUNCTION__, currInd);
|
||||
ATLTRACE("%s: %d\n", __FUNCTION__, currInd);
|
||||
DeleteObject(hBms[(currInd + 1) % HISTORYSIZE]);
|
||||
hBms[(currInd + 1) % HISTORYSIZE] = CopyDIBImage(hBms[currInd]);
|
||||
currInd = (currInd + 1) % HISTORYSIZE;
|
||||
|
@ -57,7 +59,7 @@ void ImageModel::CopyPrevious()
|
|||
|
||||
void ImageModel::Undo()
|
||||
{
|
||||
DPRINT("%s: %d\n", __FUNCTION__, undoSteps);
|
||||
ATLTRACE("%s: %d\n", __FUNCTION__, undoSteps);
|
||||
if (undoSteps > 0)
|
||||
{
|
||||
int oldWidth = GetWidth();
|
||||
|
@ -76,7 +78,7 @@ void ImageModel::Undo()
|
|||
|
||||
void ImageModel::Redo()
|
||||
{
|
||||
DPRINT("%s: %d\n", __FUNCTION__, redoSteps);
|
||||
ATLTRACE("%s: %d\n", __FUNCTION__, redoSteps);
|
||||
if (redoSteps > 0)
|
||||
{
|
||||
int oldWidth = GetWidth();
|
||||
|
@ -95,7 +97,7 @@ void ImageModel::Redo()
|
|||
|
||||
void ImageModel::ResetToPrevious()
|
||||
{
|
||||
DPRINT("%s: %d\n", __FUNCTION__, currInd);
|
||||
ATLTRACE("%s: %d\n", __FUNCTION__, currInd);
|
||||
DeleteObject(hBms[currInd]);
|
||||
hBms[currInd] = CopyDIBImage(hBms[(currInd + HISTORYSIZE - 1) % HISTORYSIZE]);
|
||||
SelectObject(hDrawingDC, hBms[currInd]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue