Click here to Skip to main content
15,912,205 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: fatal error C1083 Pin
Maximilien12-Nov-02 2:30
Maximilien12-Nov-02 2:30 
GeneralRe: fatal error C1083 Pin
KarstenK12-Nov-02 3:04
mveKarstenK12-Nov-02 3:04 
GeneralWorkspace idiocy Pin
Anonymous12-Nov-02 0:29
Anonymous12-Nov-02 0:29 
Generalcontrol box and menues Pin
emrosa12-Nov-02 0:26
emrosa12-Nov-02 0:26 
GeneralRe: control box and menues Pin
Maximilien12-Nov-02 2:41
Maximilien12-Nov-02 2:41 
GeneralCP code snippets reusing question Pin
pitch bender12-Nov-02 0:19
susspitch bender12-Nov-02 0:19 
GeneralRe: CP code snippets reusing question Pin
benjymous12-Nov-02 1:02
benjymous12-Nov-02 1:02 
GeneralHelp! about PreTranslateMessage in a COM DLL Pin
Simon.W11-Nov-02 23:52
Simon.W11-Nov-02 23:52 
Hi:

I meet a problem, it has puzzled me for a long time. I create a COM dll which support MFC, several methods was exposured. The implement code of two methods was shown as follow:

STDMETHODIMP CMyComObj::OnConfiguration(long iReserved, BOOL *pbSuccess)<br />
{<br />
	AFX_MANAGE_STATE(AfxGetStaticModuleState())<br />
	<br />
	CMyCfgDlg dlg;<br />
	int rtn = dlg.DoModal();<br />
	*pbSuccess = (rtn == IDOK) ? TRUE : FALSE;<br />
	return S_OK;<br />
}<br />
 <br />
STDMETHODIMP CMyComObj::ShowUIFace(long hParentWnd)<br />
{<br />
	AFX_MANAGE_STATE(AfxGetStaticModuleState())<br />
	<br />
//	declare in header file as CMyUIDlg *pdlg;<br />
	pdlg = new CMyUIDlg();<br />
	if(pdlg != NULL)<br />
	{<br />
		pdlg->Create(ID_MYUIDLG,CWnd::Fromhandle((HWND)hParentWnd));//Create success<br />
	}<br />
	*pbSuccess = (rtn == IDOK) ? TRUE : FALSE;<br />
	return S_OK;<br />
}<br />

The problem is in the first method call, the dialog shown normal and I can use TAB switch focus from one control to another control. When I use the second method call, the dialog shown normal but can't use TAB to switch focus(It does not take effect). The reason is virtual function PreTranslateMessage was not be processed, What's wrong? I want "PreTranslateMessage" be called normally.Please help me!!!

I am seeking...
For what?
Why did you ask me for what? I don't know!
GeneralRe: Help! about PreTranslateMessage in a COM DLL Pin
dabs12-Nov-02 2:20
dabs12-Nov-02 2:20 
GeneralScrollbar looses grip Pin
Daffy d.11-Nov-02 23:48
Daffy d.11-Nov-02 23:48 
GeneralRe: Scrollbar looses grip Pin
Daffy d.11-Nov-02 23:57
Daffy d.11-Nov-02 23:57 
GeneralC#-dialog in a VC-Project Pin
deafpat11-Nov-02 23:47
deafpat11-Nov-02 23:47 
GeneralRandom Numbers Pin
Josus11-Nov-02 23:33
Josus11-Nov-02 23:33 
GeneralRe: Random Numbers Pin
tongc11-Nov-02 23:45
tongc11-Nov-02 23:45 
GeneralRe: Random Numbers Pin
Daffy d.12-Nov-02 0:15
Daffy d.12-Nov-02 0:15 
GeneralRe: Random Numbers Pin
Josus12-Nov-02 0:43
Josus12-Nov-02 0:43 
Questionhow to refresh the contents in a treeview? Pin
jack111-Nov-02 23:27
jack111-Nov-02 23:27 
AnswerRe: how to refresh the contents in a treeview? Pin
Paul Ingles11-Nov-02 23:35
Paul Ingles11-Nov-02 23:35 
Generalcode project search bar! How??/ Pin
tongc11-Nov-02 23:12
tongc11-Nov-02 23:12 
GeneralRe: code project search bar! How??/ Pin
Michael Dunn12-Nov-02 4:52
sitebuilderMichael Dunn12-Nov-02 4:52 
GeneralRe: code project search bar! How??/ Pin
tongc12-Nov-02 22:15
tongc12-Nov-02 22:15 
GeneralPutting a main Menu in a Dialog Box Pin
GurGur11-Nov-02 22:52
GurGur11-Nov-02 22:52 
GeneralRe: Putting a main Menu in a Dialog Box Pin
567890123412-Nov-02 4:13
567890123412-Nov-02 4:13 
GeneralRe: Putting a main Menu in a Dialog Box Pin
Nitron12-Nov-02 4:19
Nitron12-Nov-02 4:19 
GeneralRe: Putting a main Menu in a Dialog Box Pin
GurGur12-Nov-02 4:56
GurGur12-Nov-02 4:56 

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.