From the immortal words of the movie Mr. Mom, "You're doing it wrong."
No, you can't set the hwnd from Jacob. I would be interesting how you are calling CWnd::SetTimer(). It should always be from a window that has been created and has an m_hWnd associated with it. So assuming you have a valid window, you'd call:
// assume pWnd is a CWnd* or derived object that has been created.
pWnd->SetTimer(nIDEvent, nElapse, NULL);
The CWnd (or derived) has to already have been created. So, you have some options...
Say you already have an HWND hwnd....
You should have some class and from that class you'd call SubclassWindow...
CSomeWindow someWindow; // declaring these on stack probably bad idea
someWindow.SubclassWindow(hwnd);
someWindow.SetTimer(nIDEvent, nElapse, NULL);
The other option is that you create the window...
CSomeWindow someWindow; // declaring these on stack probably bad idea
someWindow.Create(.... create params);
someWindow.SetTimer(nIDEvent, nElapse, NULL);
or
CSomeWindow* pSomeWindow = new CSomeWindow();
pSomeWindow->Create(.... create params);
pSomeWindow->SetTimer(nIDEvent, nElapse, NULL);
In the above example, no func is provided--just NULL. In that case, it will route to your ON_WM_TIMER() handler.
OTOH, maybe you have a window (your OCX control?), that you want to set the timer for. Well, you just want to make sure you call it after the window (HWND) has been created. Sometime after it's OnCreate() method has been created. That could be your problem, but you have little info and I'm just stabbing in the dark.
pYourOcx->SetTimer(nIDEvent, nElapse, NULL);
However, technically, you don't even need a window. You could call the Windows API version of SetTimer()...
::SetTimer(NULL, nIDEvent, nElapse, MyTimerFunc); // MyTimerFunc is your user defined timer function