I wrote a class CCamCtrl. I use a Custom message WM_CAPTURE_IMAGE and used message mapping. A dll is to post message. I think dll does not post messsage, sothat OnCaptureData(WPARAM wParam, LPARAM lParam ) event can't be called. Are there any problem in my code or in dll. here i mention that dll works well for dialog based application. Can anyone help me? Thanks in Advance Mazhar header file class CCamCtrl : public COleControl { //some code /// /// // Message maps //{{AFX_MSG(CCamCtrl) afx_msg void OnCaptureData(WPARAM wParam, LPARAM lParam ); afx_msg void OnShowWindow(BOOL bShow, UINT nStatus); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); afx_msg void OnTimer(UINT nIDEvent); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; in cpp i wrote BEGIN_MESSAGE_MAP(CCamCtrl, COleControl) //{{AFX_MSG_MAP(CCamCtrl) ON_MESSAGE(WM_CAPTURE_IMAGE,OnCaptureData) ON_WM_SHOWWINDOW() ON_WM_LBUTTONDOWN() ON_WM_TIMER() //}}AFX_MSG_MAP ON_MESSAGE(OCM_COMMAND, OnOcmCommand) ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties) END_MESSAGE_MAP()
Md Mazharul Islam Khan
Posts
-
Message Mapping Problem -
Print ProblemI want to Print An Image Buffer(640*480) in MFC dialog application. I can print but, size of Printed Image is not (640*480). How can I solve the problem? Probably in mapping Problem. I used : void PMCToolDlg::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo) { if (pDC->IsPrinting()) { pDC->SetMapMode(MM_ISOTROPIC); pDC->SetViewportExt(7, 7); pDC->SetWindowExt(1, 1); pDC->SetViewportOrg(0,0); } } Thannks in Adance, Mazhar
-
Create uninstall programPlz help me
-
Create uninstall programI have to create uninstall software which can uninstall any software installed in my pc. Can anyone help me? Mazhar
-
Create Bitmap From bufferI got pbuffer from a camera device. Now i have to make bitmap and show in thumnail view. LPBYTE pBuffer=new BYTE[height*width*3]; memcpy(pBuffer,(LPBYTE)lParam,height*width*3); what i did: DrawThumbnails(){ CBitmap* pImage = NULL; HBITMAP hBitmap = NULL; HDC hMemDC = NULL; HGDIOBJ hOldObj = NULL; POINT pt; int x, i; // = m_ImageListThumb.GetImageCount(); CString str; str.Format("%d",pBuffer); AfxMessageBox(str); // no images // set the length of the space between thumbnails // you can also calculate and set it based on the length of your list control int nGap = 6; // hold the window update to avoid flicking m_ListThumbnail.SetRedraw(FALSE); // reset our image list // for( i=0; im_hWnd; // create thumbnail bitmap section bih.biWidth = THUMBNAIL_WIDTH; bih.biHeight = THUMBNAIL_HEIGHT; // hBitmap = CreateBitmapIndirect(&bitmap); hBitmap = ::CreateDIBSection(NULL,&bmi, DIB_RGB_COLORS, NULL, NULL, 0); //hBitmap = ::CreateDIBitmap(hDC,&bih,CBM_INIT,pBuffer,(BITMAPINFO*)&bih,DIB_RGB_COLORS); //hBitmap = CreateBitmap(m_nWidth,m_nHeight,1,24,) // restore dib header //dib.m_pBMI->bmiHeader.biWidth = nWidth; //dib.m_pBMI->bmiHeader.biHeight = nHeight; bih.biWidth= m_nWidth; bih.biHeight = m_nHeight; // select thumbnail bitmap into screen dc
-
Help about New DocumentI developed a paint software. I load bitmap image and can edit it. But when I want to remove image, I can't. So what can i write in OnNewDocument() ? Can any one help me? Regards Mazhar
-
Transparent BrushThe main problem i face that i donot find who call this "int SetBkMode( int nBkMode )" function?? it returns integer value, but i dont know who use it. Plz, help me.
-
Transparent BrushOk, i know about this function. but how i can apply??
-
Transparent BrushI apply brush over my bitmap image. but i want that brush background will be transparent so that bitmap image can be shown also. How can i do that?
-
VC++ EBooks -
How can I edit bitmap Image?I need to spray in picture. and need to apply cross pattern in image. How can i do that?
-
Load, display and paint Bitmap ImageHow can I load bitmap image? From open dialog i have to load bitmap image. then display it. then use pattern. they spay colors int the image. How can i do this?? Help me