Loading
submit to reddit
May 25, 2013, 01:35:55 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome!
 
   Forum Home   Help Search Forum Login Register  
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: About textbox  (Read 1633 times)
eee1984
Newbie
*
Posts: 5


« on: January 19, 2009, 06:32:27 AM »

Hi Frends.. Again me..  :Smiley

I have some question  Cry please help me this.

I watched  video that is from Microsoft How I Learn Videos name is How Do I Develop MFC Applications with Visual Studio..

He create a dialog class and there is a textbox and a label and  an ok button in dialog class..Then He create variable for textbox and dialog class's reference is added in DotsView.cpp file.

then he use a code like below codes:

CDotSizeDlg dialog;
dialog.m_nDotSize = m_nDotSize;

dlg.m_nDotSize(int) is textbox's  variable bu other is CDotsView's variable(int)..

I dont understand that when I say dlg.m_nDotSize(int)how do compiler  understand it is textbox's text property

I cannot explain  Cry
for example I  write above code in c#
int dotsize=9;
Form1.txtbox.text=dotsize.ToString();

I write this namely especially I explain clearly I give value to Textbox'ın text property  this is not denote text property in c++ 
Logged
Jenna Hall
Administrator
Full Member
*****
Posts: 152



WWW
« Reply #1 on: January 19, 2009, 06:57:23 PM »

Hi! First, I'm a little confused; are you writing in C#, or C++ using MFC?

If you're writing C#, maybe someone else can help you out; I don't know much about the way to specify a value in a textbox in C#.

About this code:

Code:
CDotSizeDlg dialog;
dialog.m_nDotSize = m_nDotSize;

Looks like m_nDotSize is a member variable, potentially from the View class in DotsView.cpp. Then, he's setting m_nDotSize to his CDotSizeDlg class's own member variable then.

Hope that helps!
Logged
eee1984
Newbie
*
Posts: 5


« Reply #2 on: January 25, 2009, 12:51:15 PM »

I have used C# before .But I am new at MFC and I want to learn MFC but sometimes I cannot understand some codes so that I compare C# ..

Thanks a lot..
Logged
Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!