|
|
Well, I would agree that it should, but its not. The SetWindowText() function is returning success, but the caption remains unchanged. Did I mention that I'm creating this ATL based dialog modally?
"Never play drinking games with coffee"
|
|
|
|
|
Example Code
HRESULT MyFunc([in, optional] VARIANT Param1,
[out, optional] VARIANT Param2)
I'm concerned about the client calling sunctions which have optional arguments....my client in cpp raise an error on number of parameters. Any one with time n clue
Swimming in the fish bowl.
|
|
|
|
|
1. I think [out] and [optional] are not compatible
2. C++ client does not translate COM optional argument to C vararg. Instead, for each optional argument you want to skip you have to pass VARIANT of type VT_ERROR with a value of DISP_E_PARAMNOTFOUND
so in you case it would look like
VARIANT vOptional;
vOptional.vt = VT_ERROR;
vOptional.scode = DISP_E_PARAMNOTFOUND;
pMyObj->MyFunc(vOptional, vOptional);
|
|
|
|
|
Example Code
HRESULT MyFunc([in, optional] VARIANT Param1,
[out, optional] VARIANT Param2)
I'm concerned about the client calling sunctions which have optional arguments....my client in cpp raise an error on number of parameters. Any one with time n clue
Wimming in the fish bowl.
|
|
|
|
|
Example Code
HRESULT MyFunc([in, optional] VARIANT Param1,
[out, optional] VARIANT Param2)
I'm concerned about the client calling sunctions which have optional arguments....my client in cpp raise an error on number of parameters. Any one with time n clue
Wimming in the fish bowl.
|
|
|
|
|
Hi,
I have made a collection component, that inherits the functionallity from ICollectionOnSTLImpl ( but no fancy enumerator implemented).
My question is.. how can I use that in my MFC application ?, I'm using fancy smart pointers
<br />
MNEMOSYNELib::IXMLProjectsPtr pIProjects;<br />
<br />
Hr = pIProjects.CreateInstance(__uuidof (MNEMOSYNELib::XMLProjects));<br />
If I call something like "get_count" it fails... but how can I change to the collection interface without having to make a classic query interface, and for which Interface should I ask ?
Thanks in advance, greetings
Braulio
|
|
|
|
|
In my project,I add a ATL object .The wizard add a ***.rgs file to my project.I open the file ,the text like this :
HKCR
{
NoRemove AppID
{
{2C0CA281-E28B-41CA-838C-C7D1BEA311D2} = s 'NewEn'
'NewEn.EXE'
{
val AppID = s {2C0CA281-E28B-41CA-838C-C7D1BEA311D2}
}
}
}
Who can tell me what these words mean?
|
|
|
|
|
Can I add some information into it?
|
|
|
|
|
This is information that is added into the registry to "register" you COM server with Windows.
HKCR = HKEY_CLASSES_ROOT
The rest of the information is assigning an unique identifier to your COM exe server, so whe you make a CreateInstance call it knows which application to load.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
|
I make a group of control .How can I identify them? Should I add a registry entry to registry? How can I do it?Help me.
|
|
|
|
|
The easiest(if not the only) way is to group them in one TypeLib
|
|
|
|
|
Hello,
I wanted to create a new ATL object (you know, right-click on projects classes, "New ATL-Object", the dialog where you normally can select "Simple Object" etc...), but this dialog doesn't contain any items any more! There are no icons like "Simple Object" any more!
Has anyone experienced the same problem? How do I get these items again?
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
I thinke you should reinstall your VS 6.0.Gool luck!
|
|
|
|
|
Try "regsvr32 \Microsoft Visual Studio\Common\MSDev98\Bin\IDE\ATLOBJ.DLL".
Could be helpful.
rechi
|
|
|
|
|
Now it works normally again!
Thank you very much!!!
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
register atlobj.dll again and try
[ It is possible to represent everything in this universe by using 0 and 1 ]
born to kill TRUE to the code Bad to the bone
Sleep all day. party all night. Never grow old. never die
It's fun to be a Vampire.
|
|
|
|
|
When i add notification handlers like this one here,
NOTIFY_CODE_HANDLER(NM_CLICK,OnClick)
the functions aren't called. I guess i must have done something wrong subclassing this listview but i don't know what.
|
|
|
|
|
Tommy2k wrote:
I guess i must have done something wrong subclassing this listview but i don't know what.
Can you show the code?
|
|
|
|
|
class CContactlist : public CWindowImpl<ccontactlist, clistviewctrl="">
{
private:
CImageList ContactImageList;
TimContact TimContactlist[256];
int NumberOfContactsLoaded;
CStatic tHyperlink;
CAnimateCtrl tAnim;
int colormsg;
CFont hLinkFont,hLinkFont2;
public:
DECLARE_WND_SUPERCLASS(NULL, CListViewCtrl::GetWndClassName())
BOOL PreTranslateMessage(MSG* pMsg);
BEGIN_MSG_MAP(CContactlist)
MESSAGE_HANDLER(WM_CREATE, OnCreate)
MESSAGE_HANDLER(WM_SETCURSOR, OnSetCursor)
MESSAGE_HANDLER(WM_CTLCOLORSTATIC,OnCtrlColorStatic)
MESSAGE_HANDLER(WM_CONTEXTMENU,OnContextMenu)
NOTIFY_CODE_HANDLER(NM_CLICK,OnActivateItem)
END_MSG_MAP()
friend class CTimUser;
CContactlist();
~CContactlist();
void Setup();
void OnParentSize(HWND hWndParent);
BOOL LoadImagelist();
void ShowCancelLogin(bool show);
void AddContactToList(CAtlString * Username, CAtlString * Email, CAtlString * Nickname, int Status, bool Blocked);
protected:
// Handler prototypes (uncomment arguments if needed):
// LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
// LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
// LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)
LRESULT OnSetCursor(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/);
LRESULT OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled);
LRESULT OnCtrlColorStatic(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnContextMenu(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnActivateItem(int idCtrl, LPNMHDR pnmh, BOOL& bHandled)
{
MessageBox("blah");
return 0;
}
};
It's the CLICK one that doesn't work...
Thnx
|
|
|
|
|
Ok, what you want is to reflect notifications. For this you will have to add REFLECT_NOTIFICATIONS() to the bottom of the containing window's message map:
BEGIN_MSG_MAP(thisClass)
...
REFLECT_NOTIFICATIONS()
END_MSG_MAP()
Then, change your NOTIFY_CODE_HANDLER with REFLECTED_NOTIFY_CODE_HANDLER . You may also want to add a DEFAULT_REFLECTION_HANDLER() to the end of your List's message map.
Things should work, now.
|
|
|
|
|
Thanks for explaining me this! However, it still doesn't work....function isn't called...
|
|
|
|
|
What are the template arguments for CWindowImpl?
|
|
|
|
|
class CContactlist : public CWindowImpl<ccontactlist, clistviewctrl="">
|
|
|
|