|
Hi All,
I am developing a toolbar for Outlook. I have placed an edit box on the tool bar. Now I want that when I change the text in the edit box, I should be able to handle the EN_CHANGE notification. Can somebody tell how this can be done?
Currently when I press the enter key I am able to get the value from the edit box, this is also achievable when I press tab and click with the mouse anywhere else on the screen.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Try by using overiding of Invoke method.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hi,
I need to customize the CEdit control to use character masks. I thought of subclassing but the CEdit controls I need to customize are on a view that is created from scratch, so there is no CEdit resource to attach to with a GetDlgItem. The existing CEdit controls are created with a call to Create().
How can I subclass without a resource?
Thanks,
Merlinos
|
|
|
|
|
merlinos wrote: How can I subclass without a resource?
Use CWnd::SubclassWindow .
BTW, this question is appropriate for VC++ forum.
|
|
|
|
|
He's probably using WTL, otherwise he wouldn't have bothered asking the question in this forum, nor would he even ask this very question, as subclassing is automatic in MFC. Hence, his question is very much appropriate for this forum.
--
Verletzen zerfetzen zersetzen zerstören
Doch es darf nicht mir gehören
Ich muss zerstören
|
|
|
|
|
Joergen Sigvardsson wrote: He's probably using WTL
Probably !
Seeing mention of CEdit leads my assumption.
|
|
|
|
|
See: CWindow::SubclassWindow()
--
Verletzen zerfetzen zersetzen zerstören
Doch es darf nicht mir gehören
Ich muss zerstören
|
|
|
|
|
Hi All,
The following is giving me fits in VB.NET. Any ideas how to make it work?
*************
VB.NET
Dim rng as PseudoRNG
rng = new PseudoRNG()
dim a(10) as Long
rng.GenerateBlock( a )
...
*************
What I've tried (and how it does not work is listed below). Following that are KB article references... KB314708 does not resolve (even though it is supposed to). It is also broken on VS2005/.NET 2.0.
Does anyone know how to pass an array? Obvioulsy, I do not.
Jeff
****
HRESULT GenerateBlock([in, out] SAFEARRAY(VARIANT) * Block);
System.Runtime.InteropServices.SafeArrayTypeMismatchException
HRESULT GenerateBlock([in, out] SAFEARRAY(VARIANT*) * Block);
System.Runtime.InteropServices.SafeArrayTypeMismatchException
HRESULT GenerateBlock([in, out] SAFEARRAY(VT_DISPATCH) * Block);
Compile Problem
HRESULT GenerateBlock([in, out] SAFEARRAY(IDispatch) * Block);
SAFEARRAY(interface pointer) doesn't work using midl generated proxy
System.Runtime.InteropServices.SafeArrayTypeMismatchException
HRESULT GenerateBlock([in, out] SAFEARRAY(IDispatch*) * Block);
SAFEARRAY(interface pointer) doesn't work using midl generated proxy
System.Runtime.InteropServices.SafeArrayTypeMismatchException
HRESULT GenerateBlock([in, out] SAFEARRAY(long) * Block);
System.Runtime.InteropServices.SafeArrayTypeMismatchException
****
SafeArrayTypeMismatchException Error Message When You Invoke a COM Method[^]
Using OLE Automation Marshaler for 16/16 & 16/32 COM Interface[^] (should not even apply)
|
|
|
|
|
When in MFC ,we can change the wndclass structure before a window is created . for example :
BOOL CDlgFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CMDIChildWnd::PreCreateWindow(cs) )
return FALSE;
cs.style &= ~FWS_ADDTOTITLE ;
return TRUE;
}
Is there a counterpart in ATL/WTL ? or how could i implement the same effect ?
|
|
|
|
|
As far as I can see FWS_ADDTOTITLE is MFC specific. As to setting window styles the CWindow::Create methods allow these to be specified when creating the window. CWindowImpl also allows default styles to be specified through the TWinTraits template argument.
Steve
|
|
|
|
|
Hi All,
I want to implement an Interface only (no class backing it) in an ATL Dll. It will be similar to ISupportErrorInfo, but without an implementation. In pure C++, this would be a pure virtual base class. This is sometimes loosely called 'the contract'. In my library, I would then like my objects to derive from it:
class ATL_NO_VTABLE CWidget :
public CComObjectRootEx<CComSingleThreadModel>,
...
public IMyPureVirtualBase,
public IDispatchImpl<IWidget, &IID_IWidget, &LIBID_WidgetLibrary>
{
...
BEGIN_COM_MAP(CWidget)
...
COM_INTERFACE_ENTRY(IMyPureVirtualBase)
COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()
};
How do I add this through Visual Studio? I can add a simple object, but it seems to get an implementation.
Jeff
|
|
|
|
|
I assume you mean a COM interface. A COM interface -- from a C++ perspective -- is just an abstract class with certain restrictions (for example, only virtual methods, no destructor, etc). Obviously other languages can not consume a C++ class however. Normally you describe the interface in an IDL file and use MIDL to create a type library from it. Languages that support COM can consume type libraries and MIDL will create an abstract class that can be consumed by C++ (or you can use #import to use the type library).
Steve
|
|
|
|
|
Add a class with the wizard and delete whatever method implementations you don't want.
|
|
|
|
|
How to create toolbars on ie and how to add tooltips for buttons using ATL
RAMU
|
|
|
|
|
|
I find that in ATL, the macro BEGIN_MSG_MAP(theClass) is defined this way:
#define BEGIN_MSG_MAP(theClass) \<br />
public: \<br />
BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lResult, DWORD dwMsgMapID = 0) \<br />
{ \<br />
BOOL bHandled = TRUE; \<br />
hWnd; \<br />
uMsg; \<br />
wParam; \<br />
lParam; \<br />
lResult; \<br />
bHandled; \<br />
switch(dwMsgMapID) \<br />
{ \<br />
case 0:
Interestingly, theClass is not used anywhere, then what's the use of theClass here?
Thanks.
|
|
|
|
|
|
Probably either a) consistency with MFC map macros, or b) in case it's needed in the future?
|
|
|
|
|
It's probably for compatibility with MFC
Steve S
Developer for hire
|
|
|
|
|
Wrong forum. Please try VC++ forum to get quicker answer to this.
S o h a i l K a d i w a l a
To Err Is Human; to Debug, Divine
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hey All,
A very happy new year to you all. I am working on GoF design patterns. I want to know if it is feasible or possible to make a library like STL for design patterns using .net Generics? If there are some existing projects like this can someone please send me links to it?
thanks
RB
|
|
|
|
|
I'm not clear what you are asking. What have GoF design patterns got to do with generics? Or are you asking whether there is something similar to STL (i.e., algorithms and containers) but for .NET generics?
Kevin
|
|
|
|
|
Hi All,
I need to learn about ATL from the basic.Anyone can tell me the good tutorial for ATL.
Thankx in advance..
|
|
|
|
|
This[^] yielded a lot of hits...
|
|
|
|
|
ab_wahab wrote: ttp://rapidshare.de/files/14816390/Wordware_.Developers.Workshop.to.COM.and.ATL.3.0._2000_.LiB.rar.html
you can be in deep trouble dude!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|