This works fine; [code] BOOL m_Cntrl = FALSE; BOOL CtestView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) { if (m_Cntrl) { ::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_CROSS)); return true; } else { return CScrollView::OnSetCursor(pWnd, nHitTest, message); } } void CtestView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) { if(nChar == VK_CONTROL){ m_Cntrl = TRUE; } CScrollView::OnKeyDown(nChar, nRepCnt, nFlags); } void CtestView::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) { if(nChar == VK_CONTROL){ m_Cntrl = FALSE; } CScrollView::OnKeyUp(nChar, nRepCnt, nFlags); } [/code]
Burz
Posts
-
OnSetCursor and the keyboard -
How to create a sizeable dialog (under MFC)?GetWindowRect or GetClientRect And MoveWindow Or SetWindowPos
-
Printing with GUI+Here is answer if somebody whant in: void CtestView::OnPrint(CDC* pDC, CPrintInfo* pInfo) { int cxPage = pDC->GetDeviceCaps(HORZRES); int cyPage = pDC->GetDeviceCaps(VERTRES); Graphics g(pDC->m_hDC); g.SetPageUnit(UnitInch); g.DrawImage(m_pBitmap, 0, 0, cxPage/g.GetDpiX() , cyPage/g.GetDpiX() ); }
-
How to create a sizeable dialog (under MFC)?How about somthing like this? [code] // Resize the list control contained in the view to // fill the entire view when the view's window is // resized. CMyView is a CView derived class. void CMyDlg::OnSize(UINT nType, int cx, int cy) { CView::OnSize(nType, cx, cy); // Resize list to fill the whole view. if(nType == SIZE_MAXIMIZED) m_List.MoveWindow (0, 0, cx, cy); } [/code]
-
Printing with GUI+I use GUI+, object Graphics and Bitmap. No BitBlt or StretchDIBBits!
-
Printing with GUI+I read that article, but it dont contain answer: What and how i need to transform to see preview and printing page in the same style, using GUI+ ...
-
Printing with GUI+I want to print bitmap on full page, so i wright: [code] void CtestView::OnPrint(CDC* pDC, CPrintInfo* pInfo) { int cxPage = pDC->GetDeviceCaps(HORZRES); int cyPage = pDC->GetDeviceCaps(VERTRES); Graphics g(pDC->m_hDC); g.DrawImage(m_pBitmap, 0, 0, cxPage , cyPage ); } [/code] Thats ok in preview but not in printer. What transformations i need to do?