You need to call GetDlgCtrlID from outside the activex control as the
function available within the control returns an arbitrary value of zero.
Take a look at this article
http://xendra.ens.uabc.mx/~sinfante/loo/libro/ch17_4.htm
particularly the paragraph preceeding the title "MFC and Ambient
Properties". This really begs the question why you want the ID in the first
place as activex controls have to be fully self containing to operate - with
a few exceptions where sibling controls need to be able to locate each
other.
- Tim
"ytv" <anonymous@discussions.microsoft.com> wrote in message
news:0CDC7D10-EACC-4C77-B6C0-4787BD7F790E@microsoft.com...
> GetWindowLong return 0.