send keys method
===

pls look at the below issue

A dialog box is generated in wpf application. Need to click OK button in the dialog box. but qtp is not identifying the OK button in dialog box and not clicking it

Syntax is 

WpfWindow("title").Dialog("title").WinButton("title").Click

error message is:
Can't find the Winbutton's object's parent Dialog of class Dialog


I tried sendkeys, device replay, DP but not working. pls suggest the solution
using sendkeys as:
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{ENTER}" 

do i need to first launch application or activate application using Wshshell object. OK button is by default active