IT Community - Software Programming, Web Development and Technical Support

How to set value text to a control in Win32 using VC++?

This is a discussion on How to set value text to a control in Win32 using VC++? within the Mobile Software Development forums, part of the Software Development category; How to set value text to a control in Win32 using VC++?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Mobile Software Development

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-25-2007, 11:34 PM
itbarota itbarota is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 547
itbarota is on a distinguished road
Question How to set value text to a control in Win32 using VC++?

How to set value text to a control in Win32 using VC++?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-25-2007, 11:37 PM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Default Re: How to set value text to a control in Win32 using VC++?

We can use the SendMessage with WM_SETTEXT for set value text for a control in Win32 VC++ application.

For example,

const char *Msg = "This message was sent";
SendMessage(GetDlgItem(hDlg, IDC_CHECK1), WM_SETTEXT,
0,(LPARAM)(LPCTSTR)Msg);

Here is we set the value text for a check box using “SendMessage”.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I check that text entered in a text form field is an integer? itbarota HTML, CSS and Javascript Coding Techniques 2 10-26-2007 12:25 AM
use of Custom Control and User Control? a.deeban ASP and ASP.NET Programming 1 08-20-2007 08:25 AM
How can we get the text from edit control in Win32 VC++ application? mobilegeek C and C++ Programming 1 07-25-2007 11:27 PM
How to Encode a text and Decode it to get the original text using c# .Net? Archer C# Programming 1 07-21-2007 01:10 AM
I am using CString in my win32 application... theone C and C++ Programming 0 07-17-2007 03:41 AM


All times are GMT -7. The time now is 09:10 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0