Support Board
Date/Time: Fri, 31 Jan 2025 23:03:22 +0000
Post From: StudyRegionRightCoordinate Problem when
[2019-05-01 17:44:30] |
BlakJak - Posts: 108 |
I have found a workaround to using sc.StudyRegionXXXXCoordinate to get my code to work. Instead I use GetClientRect() to fill "rc". Here is the full code: // Set up the memory device context we will draw to so we can apply transparency. Copy the current image so there is no strange
// issue with the blending. HDC hMemDC = CreateCompatibleDC(DeviceContext); RECT rc; GetClientRect(WindowHandle, &rc); //rc.left = sc.StudyRegionLeftCoordinate; //rc.right = sc.StudyRegionRightCoordinate; //rc.top = sc.StudyRegionTopCoordinate; //rc.bottom = sc.StudyRegionBottomCoordinate; HBITMAP hBitMap = CreateCompatibleBitmap(DeviceContext, rc.right - rc.left, rc.bottom - rc.top); SelectObject(hMemDC, hBitMap); BitBlt(hMemDC, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, DeviceContext, rc.left, rc.top, SRCCOPY); However, I would still like to understand why my original idea to use the StudyRegion coordinates does not work when there is a Trade Window attached on the left of the chart. |