sahana
sahana
Branch Unspecified
12 Mar 2007

problem in visualc++

hi to all.
i want to get the caption of my button control during runtime i.e when i execute.can anyone help me with it.
uday.bidkar

uday.bidkar

Branch Unspecified
12 years ago
sahana
hi to all.
i want to get the caption of my button control during runtime i.e when i execute.can anyone help me with it.
Use CWnd::GetDlgItem( /*Identifier of the Button control*/) to get CWnd* of the Button window. Call GetWindowText using this pointer to get Captin of the Button.
sahana

sahana

Branch Unspecified
12 years ago
thanks a ton uday,
i now hav a new problem.now what do i do if i want to set the caption name during run time i.e during execution if i click a button i want its caption name to be changed
uday.bidkar

uday.bidkar

Branch Unspecified
12 years ago
sahana
thanks a ton uday,
i now hav a new problem.now what do i do if i want to set the caption name during run time i.e during execution if i click a button i want its caption name to be changed
Follow the same procedure but call SetWindowText instead of GetWindowText

Share this content on your social channels -

Only logged in users can reply.