How to add Timer in activex ?
-
I code this, but no use? why? How to add Timer in activex ? BEGIN_MSG_MAP(ClistSample) MESSAGE_HANDLER(WM_TIMER, OnTimer) END_MSG_MAP() LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { return 0; } alantop
I believe you will need a Window to get timer messages. It doesn't work in window-less controls. 1- You could use the Multimedia timer. 2- Or you could just create a hidden window that would receive the timer messages. 3- Or create a thread that sleeps for the specified amount of time, and calls a function of your program. (quite inaccurate timing). this is this.
-
I code this, but no use? why? How to add Timer in activex ? BEGIN_MSG_MAP(ClistSample) MESSAGE_HANDLER(WM_TIMER, OnTimer) END_MSG_MAP() LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { return 0; } alantop