Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MFC - kleine Anwendung

Empfohlene Antworten

Veröffentlicht

Hallo,

Ich habe keine Erfahrung mit MFC (VS 2005) und deswegen habe ich sehr einfache Fragen.

Ich möchte eine Anwendung mit Edit Control, Button and Static Text erstellen - Wenn man einen Text im Edit Control eingeben und dann auf den Knopf drücken, muss diesen Text in dem Static Text angezeigt werden.


void CCANDlg::OnEnChangeEdit1()

{


  string input   = (string )cell_var. GetString();



}


void CCANDlg::OnBnClickedButton1()

{

	// TODO: Add your control notification handler code here


}

Vielleicht können Sie mir helfen das zu machen.

Danke,

Iliya

PS.

Gibt es ein gutes Tutorial für MFC mit VS2005?


void CCANDlg::OnBnClickedButton1()

{

	[B]Label1.Text = MaskedTextBox1.Text[/B]


}

Lupo49, hast Du überhaupt die Frage oder auch nur die Überschrift gelesen? Es ging um C++ mit den MFC und nicht Visual Basic. Zur eigentlichen Frage:

	CString txt;

	GetDlgItemTextW(IDC_EDIT, txt); 

	SetDlgItemTextW(IDC_STATIC, static_cast<LPCTSTR>(txt));

Dies muss in OnBnClicked...-Handler eingebaut werden, die Control-IDs (IDC_...) müssen so angepasst werden, dass die richtigen Controls angesprochen werden. Den static_cast<LPCTSTR> kann man hier auch weglassen, ich hab ihn eingefügt, damit klarer ist, was passiert.

Hallo,

Vielen Dank für die Antwort. Jetzt hat es geklappt.

Kannst du mir bitte mitteilen, wo ich mehr info über MFC mit VS2005 finden kann.

Grüße,

Iliya

Kannst du mir bitte mitteilen, wo ich mehr info über MFC mit VS2005 finden kann.

Die Dokumentation ist in der MSDN-Library enthalten. Es gibt aber auch Bücher, da müsstest Du Dich selbst entscheiden, welche Dir am besten gefallen.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.