Assuming you want to place that line right after the opening {
, try searching for (with Perl regexes turned on):
^(class\b.*\bC(?:Dialog|Wnd|ListCtrl).*\r?\n\{\r?\n)
and replace with
\1virtual ULONG GetGestureStatus(CPoint ptTouch) { return 0;}\r\n