Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDocument problems with messages ...

Status
Not open for further replies.

daniloa

Programmer
Nov 23, 2001
27
BR
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();

}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top