How to retrieve the string from dialog box

Hi All,

Does anyone know how to retrieve a string in IDC_STATIC on a dialog box?
I have to print out a report with an application version at the bottom line 
for users to be aware of it in my application.

I don't know how to retrieve the string in IDC_STATIC control on a dialog box.
It would be very nice that someone let me know how to do that without 
calling the dialog box.

TIA

Hwasoo Lee


0
Utf
10/27/2004 9:25:08 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
1407 Views

Similar Articles

[PageSpeed] 52

Back 9 wrote:
> Hi All,
> 
> Does anyone know how to retrieve a string in IDC_STATIC on a dialog box?
> I have to print out a report with an application version at the bottom line 
> for users to be aware of it in my application.
> 
> I don't know how to retrieve the string in IDC_STATIC control on a dialog box.
> It would be very nice that someone let me know how to do that without 
> calling the dialog box.
> 
> TIA
> 
> Hwasoo Lee
> 
> 

First you have to change the ID from IDC_STATIC to some unique name with 
unique ID value for that dialog.  Then you can read the control's text 
all the ways you can read an edit control, such as GetWindowText and 
GetDlgItemText.

It is not clear what you mean by "without calling the dialog box."

-- 
Scott McPhillips [VC++ MVP]

0
Scott
10/27/2004 11:34:10 PM
He probably means without invoking the dialog.

Perhaps he should ensure the application's version is stored in a version
resource and then read the resouce for the paper report and for the dialog
box too.

I can't find the right calls at the moment, but I know they exist.


"Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp> wrote in message
news:OvsXyVHvEHA.3228@TK2MSFTNGP12.phx.gbl...
> Back 9 wrote:
> > Hi All,
> >
> > Does anyone know how to retrieve a string in IDC_STATIC on a dialog box?
> > I have to print out a report with an application version at the bottom
line
> > for users to be aware of it in my application.
> >
> > I don't know how to retrieve the string in IDC_STATIC control on a
dialog box.
> > It would be very nice that someone let me know how to do that without
> > calling the dialog box.
> >
> > TIA
> >
> > Hwasoo Lee
> >
> >
>
> First you have to change the ID from IDC_STATIC to some unique name with
> unique ID value for that dialog.  Then you can read the control's text
> all the ways you can read an edit control, such as GetWindowText and
> GetDlgItemText.
>
> It is not clear what you mean by "without calling the dialog box."
>
> --
> Scott McPhillips [VC++ MVP]
>


0
10/28/2004 2:15:12 AM
Reply:

Similar Artilces: