Click here to Skip to main content
15,927,055 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to debug this? (MFC dialog control question.) Pin
@largeinsd28-Aug-07 9:07
@largeinsd28-Aug-07 9:07 
GeneralRe: How to debug this? (MFC dialog control question.) Pin
David Crow28-Aug-07 10:42
David Crow28-Aug-07 10:42 
Questionfile creation failure Pin
act_x28-Aug-07 6:13
act_x28-Aug-07 6:13 
AnswerRe: file creation failure Pin
Chris Losinger28-Aug-07 6:23
professionalChris Losinger28-Aug-07 6:23 
AnswerRe: file creation failure Pin
Chris Meech28-Aug-07 6:47
Chris Meech28-Aug-07 6:47 
AnswerRe: file creation failure Pin
David Crow28-Aug-07 6:54
David Crow28-Aug-07 6:54 
QuestionOnLButtonDown and Up Pin
mcsherry28-Aug-07 6:05
mcsherry28-Aug-07 6:05 
AnswerRe: OnLButtonDown and Up Pin
Mark Salsbery28-Aug-07 6:21
Mark Salsbery28-Aug-07 6:21 
This is an MFC example, but if you're using straight APIs you can do the same.
::MessageBeep() should get called on the left button up message according
to your requirements (unless I need more caffeine)...
void CMyWindow::OnLButtonDown(UINT nFlags, CPoint point)
{
    CWnd::OnLButtonDown(nFlags, point);

    SetCapture();
    fInCapture = true;
}

void CMyWindow::OnLButtonUp(UINT nFlags, CPoint point)
{
    if (fInCapture)
    {
        ReleaseCapture();
        fInCapture = false;

        CRect clirect;
        GetClientRect(&clirect);
        if (PtInRect(&clirect, point))
        {
            //** test
            ::MessageBeep(-1);
            //** end test
        }
    }

    CWnd::OnLButtonUp(nFlags, point);
}
Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: OnLButtonDown and Up Pin
mcsherry28-Aug-07 6:47
mcsherry28-Aug-07 6:47 
QuestionCMenu problem Pin
prithaa28-Aug-07 5:19
prithaa28-Aug-07 5:19 
AnswerRe: CMenu problem Pin
Iain Clarke, Warrior Programmer28-Aug-07 5:26
Iain Clarke, Warrior Programmer28-Aug-07 5:26 
Questionc++ Pin
ellllllllie28-Aug-07 5:06
ellllllllie28-Aug-07 5:06 
AnswerRe: c++ Pin
toxcct28-Aug-07 5:25
toxcct28-Aug-07 5:25 
GeneralRe: c++ Pin
George L. Jackson28-Aug-07 5:43
George L. Jackson28-Aug-07 5:43 
AnswerRe: c++ Pin
Russell'28-Aug-07 7:23
Russell'28-Aug-07 7:23 
Questionone subclass two edit control Pin
Max++28-Aug-07 4:19
Max++28-Aug-07 4:19 
AnswerRe: one subclass two edit control Pin
Iain Clarke, Warrior Programmer28-Aug-07 5:28
Iain Clarke, Warrior Programmer28-Aug-07 5:28 
QuestionA Question about OpenCV in facedetect.c to detect photo Pin
pc135528-Aug-07 4:10
pc135528-Aug-07 4:10 
QuestionSystem menu disabling Pin
mnupadhya28-Aug-07 3:22
mnupadhya28-Aug-07 3:22 
AnswerRe: System menu disabling Pin
Jason Teagle28-Aug-07 4:15
Jason Teagle28-Aug-07 4:15 
GeneralRe: System menu disabling Pin
mnupadhya28-Aug-07 18:59
mnupadhya28-Aug-07 18:59 
GeneralRe: System menu disabling Pin
mnupadhya29-Aug-07 23:16
mnupadhya29-Aug-07 23:16 
QuestionC++ class definitions Pin
baerten28-Aug-07 1:52
baerten28-Aug-07 1:52 
AnswerRe: C++ class definitions Pin
Maxwell Chen28-Aug-07 1:54
Maxwell Chen28-Aug-07 1:54 
GeneralRe: C++ class definitions Pin
baerten28-Aug-07 2:18
baerten28-Aug-07 2:18 

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.