standard dialog window (#32770)

I'm having problem with standard dialog window of non-delphi
application. I would like to bring to the front dialog window (#32770
class) and enable it for keyboard inputs (for typing some characters)
and mouse clicking.
I'm using following code:

procedure MakeWindowActive(whandle: hWnd);
begin
  if IsIconic(whandle) then
    ShowWindow(whandle, SW_RESTORE)
  else
    BringWindowToTop(whandle);
end;

Sometimes this works, but most of the time not.
Can someone help me?

Sent via Deja.com
http://www.deja.com/