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.

SetDlgItemInt in einem Thread

Empfohlene Antworten

Veröffentlicht

Ich habe mit Visual C++ version 6 ein MFC Dialog Programm geschrieben.

Von einem Thread aus muss ich eine Integer Zahl an ein Editfeld senden.

Ich habe dazu den Befehl SetDlgItemInt benutzt. nur wird mir dieser Error angezeigt:

SetDlgItemInt function does not take 3 parameters.

folgender Code:

SetDlgItemInt( IDC_EDIT4, q, false);

Ich habe mich noch ein bischen über die Funktion Informiert:

SetDlgItemInt Function ()

und etwas Gefunden das ich nicht ganz verstehe:

hDlg

[in] Handle to the dialog box that contains the control.

Also so was wie ein Handle Argument. Nur wie finde ich heraus wie das bei meinem Dialog heisst?

Freundliche grüsse

neo

Du wolltest wahrscheinlich nicht die Funktion SetDlgItemInt benutzen, sondern die Methode CWnd::SetDlgItemInt, die hat nur drei Parameter, weil sich das Dialoghandle aus dem this-Zeiger der Instanz ergibt.

Diese Methode darfst du allerdings nur aus dem Thread aufrufen, der das Fenster auch erstellt hat. Das gilt für alle CWnd-Methoden.

An ein Handle für die Funktion SetDlgItemInt kommst du über die m_hWnd-Membervariable deines Dialogs.

Und weil das nichts mit Standard-C++ zu tun hat:

Verschoben -> C++: Compiler, IDEs, APIs

  • Autor

oke sorry da brauch ich jetzt nochmal bischen verständnis nachhilfe^^

also das mit der Methode ist mit klar gerworden

nur die ->m_hWnd-Membervariable<- hab ich leider keine Ahnung was das ist oder wo ich die finde.

ich hab noch nicht so viel mit MFC gearbeitet.

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.