|
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="">
|
|
|
|
|
Shouldn't this be:
class CContactlist : public CWindowImpl<CContactList, CListViewCtrl>
?
|
|
|
|
|
Yeah that's what i have, i forgot to put it in a code tag... it's exactly what i have.
|
|
|
|
|
Where is the list contained?
|
|
|
|
|
It's contained the View...
|
|
|
|
|
Please show the code for the container's message map and class declaration. I'm on MSN: joao.fig@mail.telepac.pt
|
|
|
|
|
If I write an application that uses an ActiveX Control to embed a component from another application, does that application have to be installed on the computer that will be running my application for it to work. For instance if I embed an excel spreadsheet or chart into my application and then I install my application on a friends computer must he have Excel installed?
Sincerely,
Mardigin
|
|
|
|
|
Mardigin wrote:
For instance if I embed an excel spreadsheet or chart into my application and then I install my application on a friends computer must he have Excel installed
Yes, Excel must be installed on the computer if you are embedding Excel spreadsheet.
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
|
|
|
|
|
Thank you for your reply.
I actually setup a windows 98 box without anything installed on it and wrote a quick little utility that had excel embeded into it. You are absolutely correct, when I try to execute it on the windows 98 box absolutely nothing happens.
Thanks again for the feedback.
Mardigin
|
|
|
|
|
Is it possible to release the memory allocated for an item in a deque when you remove an item from a deque using either pop_back() or erase(). I'm trying to avoid the large delay when deleting the deque object.
typedef struct
{
BYTE b;
WORD w;
DWORD d;
}S;
void func(void)
{
deque<S> *pDeque=new deque<S>;
S s={1,2,3};
for (int i=0;i < 100000;i++)
{
s.d=i;
pDeque->push_back(s)
}
while (pDeque->size())
pDeque->pop_back();
delete pDeque;
}
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
Steve Thresher wrote:
I'm trying to avoid the large delay when deleting the deque object
simple. don't delete the deque.
Prefer storing STL containers on the stack rather than on the heap, after all that's one of the huge benefits of using STL containers. In this case prefer passing it in as a parameter and recycling it. If you've profiled the method this should give some kind of performance boost.
Passing the container also has the benefit of not allocating space for an element every time you push_back. The push_back is what's making the destructor so slow, because the allocator has to destroy all the elements you've just created, as well as the (comparatively small) empty deque.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
As far as I know using the stack makes no difference as the deque will still be deleted when it goes out of scope and I will still be left with a pause.
How are you supposed to add elements if you don't use push_back()?
Systems AXIS Ltd - Software for Business ...
|
|
|
|