On my WIN32 dialog box I draw a circle (Bitmap resource) and I want to have an image located near it. I am not able to force the cursor to be on top of the circle image:
I draw both circle and cursor as static windows:
Circle:
HWND hRingImage= CreateStatics(m_hDlg, hInst, SS_BITMAP | WS_BORDER, rc, m_ID, L"");
HANDLE hRingImage1 = LoadImage(hInst, MAKEINTRESOURCE(IDB_RING50), IMAGE_BITMAP,m_Radius*2, m_Radius*2, LR_LOADTRANSPARENT | LR_LOADMAP3DCOLORS );
SendMessage(hRingImage,STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hRingImage1);
m_hRingImage = hRingImage;
if (!Enabled)
ShowWindow(hRingImage, SW_HIDE);
Red Cursor:
m_hIndicator= CreateStatics(m_hDlg, GetModuleHandle(NULL), SS_ICON , rc, m_ID+10, L"");
HANDLE hRingImage1 = LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_INDICATOR), IMAGE_CURSOR,8, 8, LR_DEFAULTSIZE|LR_SHARED );
SendMessage(m_hIndicator,STM_SETIMAGE, IMAGE_CURSOR, (LPARAM)hRingImage1);
SetWindowPos(m_hIndicator, HWND_TOPMOST, 0,0,0,0, SWP_NOMOVE|SWP_NOSIZE);
ShowWindow(m_hIndicator, SW_SHOW);
I can't see what makes the circle topmost while the cursors are always at the bottom (strange, they also under the dialog box frame lines.