You're using the wrong function. FindWindow expects actual text strings that it wishes to compare with the window class name and the window title. The process ID does not contain any such text info - it is just a number! You have to come up with the actual window title instead. E. g. if you're looking for the Snipping Tool window, you should search for
_T("Snipping Tool")
.Of course, the problem is that window titles are volatile: the application may choose to change it any time. If there is a function that retrieves the (current) window title based on the process ID, I'm not aware of it. More likely there may be a function that retrieves window handle(s) for a given process ID. A quick search gives me
this[
^]