Hi all ...
I have a CDocument in a SDI type program where I was created many windows with the createwindowex() as chield and bitmap, to set this window inside the document as a draw, but now I need to get the WM_LBUTTONDOWN and WM_RBUTTONDOWN messages from this windows, and I don't know how ...
Some one can help me !!!????!!!
The window creation code is bellow:
void CConstrutorDoc::OnCmdBtnTransicao()
{
HWND hTrans;
HBITMAP hBitmap = 0;
BeginWaitCursor();
hTrans = CreateWindowEx(WS_EX_CONTROLPARENT|WS_EX_TOOLWINDOW|WS_EX_ACCEPTFILES, "Static", "", WS_CHILD|WS_VISIBLE|SS_BITMAP, igeX, igeY, 50, 20, this->GetRoutingView()->m_hWnd, NULL, GetModuleHandle(NULL), NULL);
hBitmap = (HBITMAP)LoadImage(NULL, _T("res\\BmpTransicao.bmp"
, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
SendMessage(hTrans, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hBitmap);
igeX += 5 + 40;
EndWaitCursor();
}
I have a CDocument in a SDI type program where I was created many windows with the createwindowex() as chield and bitmap, to set this window inside the document as a draw, but now I need to get the WM_LBUTTONDOWN and WM_RBUTTONDOWN messages from this windows, and I don't know how ...
Some one can help me !!!????!!!
The window creation code is bellow:
void CConstrutorDoc::OnCmdBtnTransicao()
{
HWND hTrans;
HBITMAP hBitmap = 0;
BeginWaitCursor();
hTrans = CreateWindowEx(WS_EX_CONTROLPARENT|WS_EX_TOOLWINDOW|WS_EX_ACCEPTFILES, "Static", "", WS_CHILD|WS_VISIBLE|SS_BITMAP, igeX, igeY, 50, 20, this->GetRoutingView()->m_hWnd, NULL, GetModuleHandle(NULL), NULL);
hBitmap = (HBITMAP)LoadImage(NULL, _T("res\\BmpTransicao.bmp"
SendMessage(hTrans, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hBitmap);
igeX += 5 + 40;
EndWaitCursor();
}