The problem is, as the code is currently written, MODE is a member variable of type _MODE. You are trying to use this member variable (MODE) instead of the type (_MODE) for parameters and other variables. Either change the functions to use _MODE instead of MODE or use a typedef like: typedef _MODE MODE;
Gil Clark
Posts
-
Problem with enum -
Crash IE in one line of htmlYou don't even need the "crash" part since that's not what causes ie to crash. Just doing this:
will crash ie too. Looks like ie doesn't like type to not be assigned a value, even if empty, since adding type="" won't crash ie.
-
Q: how to obtain interface pointer for ATL ActiveX control in an MFC appOK, now that this is buried deep it probably won't be seen, but a co-worker of mine has helped me figure this out. CWnd* pControl = GetDlgItem(IDC_THECONTROLID); if (pControl) { pControl->EnableAutomation(); IUnknown* pUnk = pControl->GetControlUnknown(); CComQIPtr pIFace(pUnk); if(pIFace) { pIFace->AControlMethod(value); } }
-
Stella AwardsAnd that statement is 100% correct. "The Pentagon was NOT hit by an AA jet" is indeed fiction. The truth is it was hit by an AA jet.
-
Q: how to obtain interface pointer for ATL ActiveX control in an MFC appOK, I'm relatively new to ATL/ActiveX/COM. We have an MFC application (CView and CDialog usage) built with VC++6 SP5. I am in the process of creating an ActiveX control (via ATL) that will be used by this application, but I'm having a problem. I can insert the control onto the template in the resource editor and it shows up. I run the application and the control functions properly. But I need to have access to the interface of that control. I used: CAxWindow m_axTheControlWindow; CComPtr m_ctlTheControl; CWnd* pControl = GetDlgItem(IDC_THECONTROLID); if (pControl) { m_axTheControlWindow.Attach(pControl->GetSafeHwnd()); hr = m_axTheControlWindow.QueryControl(&m_ctlTheControl); if (FAILED(hr) || !m_ctlTheControl) { ATLASSERT(false); } } but QueryControl returns E_FAIL and m_ctlTheControl is NULL. I guess it has something to do with how MFC keeps track of OLE controls (COleControlContainer) ??? Perhaps the only way I could communicate with this control would be via IDispatch? The control was create via the VC++ Insert | New ATL Object... wizard. It's a Full Control (Single Threaded, Dual interface, No aggregation, Support ISupportErrorInfo, support connection points, not based on another control, normalize dc, insertable, opaque, solid background, no stock properties). Now, this is just the bare-bones wizard code. Nothing has been implemented as far as IDispatch or ISupportErrorInfo or connection points beyond what the wizard gives, but I didn't want to go too far before finding out it wasn't going to work. Thanks for any help. Gil
-
Q: how to obtain message box font display property settingToo cool. Thanks. The name of that item is mis-leading. NONCLIENT. I thought it would be the font used for the maximize, minimize, close buttons.
-
Q: how to obtain message box font display property settingI'd prefer a non-mfc approach (sdk). The only 2 fonts I find in that AUX_DATA structure are StatusFont and ToolTipsFont (at least in the version I have).
-
Q: how to obtain message box font display property settingI've looked at that already, but didn't find anything. Which action value?
-
Q: how to obtain message box font display property settingHey everybody. You know how in Windows Display Properties Appearance you can change the colors and fonts for many system items like menus, 3DObjects, etc. You can obtain the color settings using GetSysColor(), but I was just wondering if anybody out there knew how to obtain the font settings for the items? Particularly the Message Box. I've searched through Code Project and MS Knowledge Base but didn't find anything (probably not using the right keywords or something). Anyone? Thanks
-
Superbowl Adshttp://www.ifilm.com/superbowl They're gonna have all of them soon.