Click here to Skip to main content
14,634,677 members
Home » Discussions » ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionCalling base class memeber function in child class member function Pin
Member 121160915-Nov-15 0:50
MemberMember 121160915-Nov-15 0:50 
AnswerRe: Calling base class memeber function in child class member function Pin
Richard MacCutchan6-Nov-15 3:55
mveRichard MacCutchan6-Nov-15 3:55 
QuestionATL ACTIVEX UI design Pin
frankzf25-Sep-15 20:35
Memberfrankzf25-Sep-15 20:35 
Hi all,

I'm trying to use ATL(no mfc support) to develop a activex component used in IE, and I want to design UI like common windows including menu, view window and status bar, but all article I searched from web always use dialog style, no related article for my problem.
Also, I have the code generated by wizard, Within my com component, I have the code block below:
CContainedWindow	m_ctlStatic;
    MESSAGE_HANDLER(WM_CREATE, OnCreate)
    MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocus)
    CHAIN_MSG_MAP(CComControl<CUniDocCtrl>)
ALT_MSG_MAP(1)
END_MSG_MAP()

also, the OnCreate code is below:
LRESULT OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
	{
		RECT rc;
		GetWindowRect(&rc);
		rc.right -= rc.left;
		rc.bottom -= rc.top;
		rc.top = rc.left = 0;
		m_ctlStatic.Create(m_hWnd, rc);
                return 0;
	}

My idea is to replace the
m_ctlStatic.Create(m_hWnd, rc);
with my own windows create function and add menu, code is below:
m_ctlStatic.Create(m_hWnd, rc, _T("hello"), WS_CHILD |  WS_VISIBLE | ES_MULTILINE | ES_AUTOVSCROLL);
HMENU hmenu;
hmenu = LoadMenu(g_hModule,MAKEINTRESOURCE(IDR_MENU1));
m_ctlStatic.SetMenu(hmenu);

It doesn't work at all, and also it jump to base method which display the "ALT 10.0" text.
how to solve this problem, thanks in advance.
Question64 bits application using Visual Basic 6 ActiveX controls Pin
RUSUA19-Aug-15 2:01
MemberRUSUA19-Aug-15 2:01 
AnswerRe: 64 bits application using Visual Basic 6 ActiveX controls Pin
Daniel Pfeffer29-Aug-15 11:55
professionalDaniel Pfeffer29-Aug-15 11:55 
QuestionCString in static library for both MFC and non-MFC projects Pin
peterchen12-Aug-15 11:34
Memberpeterchen12-Aug-15 11:34 
AnswerRe: CString in static library for both MFC and non-MFC projects Pin
Albert Holguin20-Oct-15 10:15
professionalAlbert Holguin20-Oct-15 10:15 
Questionvisual studio 2010 error help needed Pin
VScoder125-Jul-15 23:32
MemberVScoder125-Jul-15 23:32 
SuggestionRe: visual studio 2010 error help needed Pin
Richard MacCutchan6-Jul-15 0:07
mveRichard MacCutchan6-Jul-15 0:07 
GeneralRe: visual studio 2010 error help needed Pin
VScoder126-Jul-15 15:45
MemberVScoder126-Jul-15 15:45 
GeneralRe: visual studio 2010 error help needed Pin
Richard MacCutchan6-Jul-15 21:46
mveRichard MacCutchan6-Jul-15 21:46 
GeneralRe: visual studio 2010 error help needed Pin
VScoder126-Jul-15 23:29
MemberVScoder126-Jul-15 23:29 
GeneralRe: visual studio 2010 error help needed Pin
Richard MacCutchan6-Jul-15 23:35
mveRichard MacCutchan6-Jul-15 23:35 
GeneralRe: visual studio 2010 error help needed Pin
VScoder127-Jul-15 1:34
MemberVScoder127-Jul-15 1:34 
GeneralRe: visual studio 2010 error help needed Pin
Richard MacCutchan7-Jul-15 1:56
mveRichard MacCutchan7-Jul-15 1:56 
GeneralRe: visual studio 2010 error help needed Pin
VScoder127-Jul-15 16:11
MemberVScoder127-Jul-15 16:11 
GeneralRe: visual studio 2010 error help needed Pin
Brisingr Aerowing7-Jul-15 17:29
professionalBrisingr Aerowing7-Jul-15 17:29 
GeneralRe: visual studio 2010 error help needed Pin
Richard MacCutchan7-Jul-15 22:58
mveRichard MacCutchan7-Jul-15 22:58 
GeneralRe: visual studio 2010 error help needed Pin
Brisingr Aerowing8-Jul-15 3:23
professionalBrisingr Aerowing8-Jul-15 3:23 
GeneralRe: visual studio 2010 error help needed Pin
Richard MacCutchan8-Jul-15 3:26
mveRichard MacCutchan8-Jul-15 3:26 
GeneralMessage Closed Pin
29-Sep-15 3:45
MemberHighClassAsianEscort29-Sep-15 3:45 
QuestionMFC multi languages UI question Pin
econy26-Jun-15 3:34
Memberecony26-Jun-15 3:34 
AnswerRe: MFC multi languages UI question Pin
Albert Holguin26-Jun-15 10:55
professionalAlbert Holguin26-Jun-15 10:55 
Questionuser32!IsWindow crash Pin
yu-jian2-Jun-15 0:42
Memberyu-jian2-Jun-15 0:42 
AnswerRe: user32!IsWindow crash Pin
Richard MacCutchan2-Jun-15 5:13
mveRichard MacCutchan2-Jun-15 5:13 

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.