Click here to Skip to main content
15,924,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: user input to var name Pin
jimNLX1-May-02 5:48
jimNLX1-May-02 5:48 
GeneralLooking for sample code to put a minimize to tray button in the caption of a window. Pin
Kurt _B30-Apr-02 3:45
Kurt _B30-Apr-02 3:45 
GeneralRe: Looking for sample code to put a minimize to tray button in the caption of a window. Pin
-Dy30-Apr-02 4:53
-Dy30-Apr-02 4:53 
GeneralRe: Looking for sample code to put a minimize to tray button in the caption of a window. Pin
Thomas Freudenberg30-Apr-02 4:56
Thomas Freudenberg30-Apr-02 4:56 
GeneralRe: Looking for sample code to put a minimize to tray button in the caption of a window. Pin
Kurt _B30-Apr-02 5:09
Kurt _B30-Apr-02 5:09 
GeneralShowing MDI Childwnd maximized Pin
Konrad Rotuski30-Apr-02 3:42
Konrad Rotuski30-Apr-02 3:42 
GeneralRe: Showing MDI Childwnd maximized Pin
Mazdak30-Apr-02 3:48
Mazdak30-Apr-02 3:48 
GeneralWhy the drawed rectangle disappeared Pin
chen30-Apr-02 2:48
chen30-Apr-02 2:48 
In a dialog based application, I draw a rectangle with
CRectTracker. But when i close a sub-window, the part of the drawed rectangle (the part of the covered) also disappeared. Why ?

The following is my code:

BOOL CMYDlg::PreTranslateMessage(MSG* pMsg)
{
switch (pMsg->message)
{
case WM_LBUTTONDOWN:
{
if (pMsg->hwnd == GetSafeHwnd())
{
CPoint pt;
pt.x = GET_X_LPARAM(pMsg->lParam);
pt.y = GET_Y_LPARAM(pMsg->lParam);

if(GetAsyncKeyState(VK_SHIFT) < 0)
{
CRect re(pt, pt);
CRectTracker rt(re, CRectTracker::solidLine | CRectTracker::resizeOutside);
if (rt.TrackRubberBand(this, pt, TRUE))
{
CDC* pDC = GetDC();
rt.Draw(pDC);

CSetRect dlg;
dlg.m_rectleft = rt.m_rect.left;
dlg.m_rectright = rt.m_rect.right;
dlg.m_recttop = rt.m_rect.top;
dlg.m_rectbottom = rt.m_rect.bottom;
if(dlg.DoModal() == IDOK)
{
OnSaveRectInfo(dlg.m_rectleft, dlg.m_rectright, dlg.m_recttop,dlg.m_rectbottom);
}
}
return TRUE;
}
break;
default: break;
}
return CDialog::PreTranslateMessage(pMsg);
}

xyz
GeneralRe: Why the drawed rectangle disappeared Pin
Chris Losinger30-Apr-02 6:12
professionalChris Losinger30-Apr-02 6:12 
Generalprofiling with vc++ Pin
Maximilien30-Apr-02 2:35
Maximilien30-Apr-02 2:35 
GeneralRe: profiling with vc++ Pin
Chen Venkataraman30-Apr-02 11:24
Chen Venkataraman30-Apr-02 11:24 
GeneralToolbar positioning problem Pin
Konrad Rotuski30-Apr-02 2:26
Konrad Rotuski30-Apr-02 2:26 
GeneralRe: Toolbar positioning problem Pin
Thomas Ascher30-Apr-02 2:42
Thomas Ascher30-Apr-02 2:42 
GeneralSplit Table during PowerPoint Automation Pin
vmf30-Apr-02 2:07
vmf30-Apr-02 2:07 
Generalradio button text caption Pin
30-Apr-02 1:21
suss30-Apr-02 1:21 
GeneralRe: radio button text caption Pin
Maxwell Chen30-Apr-02 1:53
Maxwell Chen30-Apr-02 1:53 
GeneralRe: radio button text caption Pin
Niklas L30-Apr-02 1:54
Niklas L30-Apr-02 1:54 
GeneralRe: radio button text caption Pin
30-Apr-02 12:50
suss30-Apr-02 12:50 
GeneralRe: radio button text caption Pin
Søren Madsen30-Apr-02 21:49
Søren Madsen30-Apr-02 21:49 
QuestionIStream ? Pin
Swinefeaster30-Apr-02 0:59
Swinefeaster30-Apr-02 0:59 
GeneralPlease help! -Window creation Pin
DrZOO30-Apr-02 0:48
DrZOO30-Apr-02 0:48 
GeneralLanguageID to String Pin
Søren Madsen30-Apr-02 0:46
Søren Madsen30-Apr-02 0:46 
GeneralRe: LanguageID to String Pin
Niklas L30-Apr-02 2:29
Niklas L30-Apr-02 2:29 
GeneralRe: LanguageID to String Pin
Niklas L30-Apr-02 3:00
Niklas L30-Apr-02 3:00 
GeneralRe: LanguageID to String Pin
Søren Madsen30-Apr-02 21:45
Søren Madsen30-Apr-02 21:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.