Click here to Skip to main content
15,916,030 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: STL error handling Pin
Alexandru Savescu27-Jul-02 20:39
Alexandru Savescu27-Jul-02 20:39 
GeneralRe: STL error handling Pin
peterchen27-Jul-02 21:35
peterchen27-Jul-02 21:35 
GeneralRe: STL error handling Pin
Mike Nordell28-Jul-02 22:28
Mike Nordell28-Jul-02 22:28 
QuestionCan a CEdit control do this?..... Pin
nss27-Jul-02 10:01
nss27-Jul-02 10:01 
AnswerRe: Can a CEdit control do this?..... Pin
peterchen27-Jul-02 10:40
peterchen27-Jul-02 10:40 
GeneralTask Bar Funtionality Replication Pin
gekoscan27-Jul-02 9:57
gekoscan27-Jul-02 9:57 
GeneralRe: Task Bar Funtionality Replication Pin
Michael P Butler27-Jul-02 10:16
Michael P Butler27-Jul-02 10:16 
Generalmessage encapsulation Pin
detect27-Jul-02 8:16
detect27-Jul-02 8:16 
i , all guys here.

I confront a handicap in my VC study , and expect your help.
Now , I am writting a class inheriting CWnd . and I want my class have the function to respond the UI message such as mousedown or keydown etc.
Have some master-hands can solve this problem . If you have some sample classes that can show to me ,please email to me :polosheng@yeah.net. thanks.

Another , I have made a sample class . it can pass the complier,but when linked ,the exe file didn't respond the lbuttondown message.And here is the code. Conld you give me some suggestions?
------------------------------------------------------------------------

#if !defined(AFX_MYMSG_H__F9CB9441_F91B_11D1_8610_0040055C08D9__INCLUDED_)
#define AFX_MYMSG_H__F9CB9441_F91B_11D1_8610_0040055C08D9__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// MyMsg.h : header file
//
#include <afxwin.h>
/////////////////////////////////////////////////////////////////////////////
// CMyMsg CWnd

class CMyMsg : public CWnd
{
DECLARE_DYNAMIC(CMyMsg)

public:
static WNDPROC m_wndProc;

public:
CMyMsg();

private:
//{{AFX_MSG(CFolderDialog)
// NOTE - the ClassWizard will add and remove member functions here.
afx_msg void OnLButtonDown( UINT nFlags, CPoint point );
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};


//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MYMSG_H__F9CB9441_F91B_11D1_8610_0040055C08D9__INCLUDED_)

------------------------------------------------------------------------------------------------------------
//implement file
#include "MyMsg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMyMsg

IMPLEMENT_DYNAMIC(CMyMsg,CWnd)

WNDPROC CMyMsg::m_wndProc = NULL;

BEGIN_MESSAGE_MAP(CMyMsg , CWnd)
//{{AFX_MSG_MAP(CFolderDialog)
// NOTE - the ClassWizard will add and remove mapping macros here.
ON_WM_LBUTTONDOWN()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

LRESULT CALLBACK WindowProcNew(HWND hwnd,UINT message, WPARAM wParam, LPARAM lParam)
{
return CallWindowProc(CMyMsg::m_wndProc, hwnd, message, wParam, lParam);
}
CMyMsg::CMyMsg()
{
}
void CMyMsg::OnLButtonDown( UINT nFlags, CPoint point )
{
::Beep(1000,1000);
}


ignorance
GeneralRe: message encapsulation Pin
detect29-Jul-02 4:35
detect29-Jul-02 4:35 
QuestionHow To Write Code To Change The Printer Resolution Pin
ooosawaddee327-Jul-02 7:43
ooosawaddee327-Jul-02 7:43 
AnswerRe: How To Write Code To Change The Printer Resolution Pin
l a u r e n28-Jul-02 0:35
l a u r e n28-Jul-02 0:35 
GeneralRe: How To Write Code To Change The Printer Resolution Pin
Branislav28-Jul-02 4:38
Branislav28-Jul-02 4:38 
Generalindex not within bounds? Help !! Pin
nss27-Jul-02 7:18
nss27-Jul-02 7:18 
GeneralRe: index not within bounds? Help !! Pin
nss27-Jul-02 8:01
nss27-Jul-02 8:01 
GeneralRe: index not within bounds? Help !! Pin
Ravi Bhavnani27-Jul-02 8:02
professionalRavi Bhavnani27-Jul-02 8:02 
GeneralRe: index not within bounds? Help !! Pin
nss27-Jul-02 8:40
nss27-Jul-02 8:40 
Generalyikes! It did it again!! Pin
nss27-Jul-02 8:42
nss27-Jul-02 8:42 
GeneralRe: yikes! It did it again!! Pin
nss27-Jul-02 8:43
nss27-Jul-02 8:43 
GeneralRe: yikes! It did it again!! Pin
Ravi Bhavnani27-Jul-02 8:45
professionalRavi Bhavnani27-Jul-02 8:45 
GeneralRe: yikes! It did it again!! Pin
Ravi Bhavnani27-Jul-02 8:44
professionalRavi Bhavnani27-Jul-02 8:44 
General\n in TRACE() Pin
Ravi Bhavnani27-Jul-02 8:58
professionalRavi Bhavnani27-Jul-02 8:58 
GeneralRe: index not within bounds? Help !! Pin
Bill S27-Jul-02 8:47
professionalBill S27-Jul-02 8:47 
GeneralRe: index not within bounds? Help !! Pin
nss28-Jul-02 6:54
nss28-Jul-02 6:54 
Generaltrying out your idea Pin
nss28-Jul-02 7:34
nss28-Jul-02 7:34 
GeneralRe: index not within bounds? Help !! Pin
Anonymous28-Jul-02 4:49
Anonymous28-Jul-02 4:49 

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.