Does hWnd
(in ::SetDlgItemText(hWnd,IDC_SELL,"Hello");
) is the handle of the CTab1Dlg
window?
The call of SetDlgItemText(IDC_SELL,"Hello");
inside CTab1Dlg
, calls the global ::SetDlgItemText
function with the handle of the CTab1Dlg
window and, the same parameters as provided to the SetDlgItemText
function.
Try to find the window of CTab1Dlg
and use its handle.