Click here to Skip to main content
15,909,440 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problems with drop down box Pin
Dave Bryant23-Jun-03 16:31
Dave Bryant23-Jun-03 16:31 
GeneralMAPI Pin
act_x23-Jun-03 10:07
act_x23-Jun-03 10:07 
GeneralRe: MAPI Pin
David Crow23-Jun-03 10:24
David Crow23-Jun-03 10:24 
GeneralMFC & ATL + Netware problem Pin
Brian Shifrin23-Jun-03 9:56
Brian Shifrin23-Jun-03 9:56 
GeneralDo you know HLP95EN.DLL Pin
algruber23-Jun-03 9:51
algruber23-Jun-03 9:51 
GeneralModeless MFC dialog problem in Winamp plugin dll Pin
Member 34159623-Jun-03 9:23
Member 34159623-Jun-03 9:23 
GeneralModifying WM_COMMAND to another app Pin
Fahr23-Jun-03 8:08
Fahr23-Jun-03 8:08 
GeneralFocus notification Pin
Atlence23-Jun-03 8:06
Atlence23-Jun-03 8:06 
I'm using the CHtmlEditCtrl class which encapsulates HTML editing function. I would like to be notified when the control gains the focus, so that I could enable some commands.
I've created a devired class, but my new class doesn't get the focus notification!

Here is the declaration of my class:
<br />
#pragma once<br />
#include "afxhtml.h"<br />
<br />
<br />
class CMyHtmlEditCtrl :	public CHtmlEditCtrl<br />
{<br />
	DECLARE_DYNCREATE(CMyHtmlEditCtrl)<br />
	DECLARE_MESSAGE_MAP()<br />
public:<br />
	CMyHtmlEditCtrl(void);<br />
	virtual ~CMyHtmlEditCtrl(void);<br />
	afx_msg void OnSetFocus(CWnd* pOldWnd);<br />
};<br />

and the implemantation file (.CPP):
<br />
#include "StdAfx.h"<br />
#include ".\myhtmleditctrl.h"<br />
<br />
IMPLEMENT_DYNCREATE(CMyHtmlEditCtrl, CHtmlEditCtrl)<br />
<br />
CMyHtmlEditCtrl::CMyHtmlEditCtrl(void)<br />
{<br />
}<br />
<br />
CMyHtmlEditCtrl::~CMyHtmlEditCtrl(void)<br />
{<br />
}<br />
BEGIN_MESSAGE_MAP(CMyHtmlEditCtrl, CHtmlEditCtrl)<br />
	ON_WM_SETFOCUS()<br />
END_MESSAGE_MAP()<br />
<br />
void CMyHtmlEditCtrl::OnSetFocus(CWnd* pOldWnd)<br />
{<br />
	AfxMessageBox ("Got Focus!");<br />
	CHtmlEditCtrl::OnSetFocus(pOldWnd);<br />
}<br />

What is going wrong?


Thks in advance!
Appstmd
http://www.appstmd.com
GeneralRe: Focus notification Pin
Neville Franks23-Jun-03 11:35
Neville Franks23-Jun-03 11:35 
GeneralRe: Focus notification Pin
Atlence23-Jun-03 21:07
Atlence23-Jun-03 21:07 
GeneralRe: Focus notification Pin
Neville Franks23-Jun-03 23:26
Neville Franks23-Jun-03 23:26 
GeneralRe: Focus notification Pin
Atlence24-Jun-03 0:45
Atlence24-Jun-03 0:45 
GeneralRe: Focus notification Pin
Neville Franks24-Jun-03 12:07
Neville Franks24-Jun-03 12:07 
GeneralRe: Focus notification Pin
Atlence26-Jun-03 3:55
Atlence26-Jun-03 3:55 
GeneralRe: Focus notification Pin
Neville Franks26-Jun-03 21:32
Neville Franks26-Jun-03 21:32 
QuestionCFileDialog change directory? Pin
electronicman_x23-Jun-03 7:26
electronicman_x23-Jun-03 7:26 
AnswerRe: CFileDialog change directory? Pin
basementman23-Jun-03 7:39
basementman23-Jun-03 7:39 
GeneralRe: CFileDialog change directory? Pin
electronicman_x23-Jun-03 7:52
electronicman_x23-Jun-03 7:52 
GeneralAOL Messenger Pin
Saquib Razak23-Jun-03 6:50
Saquib Razak23-Jun-03 6:50 
GeneralRe: AOL Messenger Pin
Atlence23-Jun-03 8:14
Atlence23-Jun-03 8:14 
GeneralRe: AOL Messenger Pin
Saquib Razak23-Jun-03 10:10
Saquib Razak23-Jun-03 10:10 
GeneralRe: AOL Messenger Pin
Ryan Binns23-Jun-03 14:06
Ryan Binns23-Jun-03 14:06 
GeneralRe: AOL Messenger Pin
Saquib Razak24-Jun-03 4:10
Saquib Razak24-Jun-03 4:10 
GeneralHelp for IPC (Interprocess communication) Pin
Hashim Saleem23-Jun-03 6:45
Hashim Saleem23-Jun-03 6:45 
GeneralRe: Help for IPC (Interprocess communication) Pin
Saquib Razak23-Jun-03 6:54
Saquib Razak23-Jun-03 6:54 

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.