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.

Empfohlene Antworten

Veröffentlicht

Ich habe ein Dialogfeldbassierendes Projekt

mit mehreren dialogen!

Ein Dialog müßte jedcoh eine andere Hintergrundfarbe haben!

Könnt ihr mir helfen wie ich das mache??

ich benutze Visual Studio 6.0

Du musst in deiner Dialog-Klasse auf die Message WM_CTLCOLOR reagieren.

(In deinem Fall reflected-Message mit nem "=" davor)...

Die automatisch generierte Funktion müsste imho CtlColor heissen und bekommt einen cdc übergeben....

hier kannst du mit cdc->SetBKColor die Farbe ändern...

Wenn du dazu noch genaueres suchst schau mal auf www.codeguru.com -> Discussion Board auf der linken Seite... Ist zwar auf englisch aber dafür saugut!

cya

am besten reagiert man auf WM_ERASEBKGND

case WM_ERASEBKGND:

	hDC = GetDC(hWnd);

	GetClientRect(hWnd,&Rect);

	SelectObject(hDC,CreateSolidBrush(RGB(0,0,0)));

	Rectangle(hDC,0,0,Rect.right,Rect.bottom);

	break;

Achja, bei einer MFC Anwendung sollte man auf WM_CTLCOLOR reagieren und dann einfach einen HBRUSH returnen

  • Autor

Hab nachgeschaut, aber Englisch ist wohl leider nicht mein fall

jetzt hätte ich eine Behandlungsroutinge für die WM_CTLCOLOR eingerichtet =>

OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)

und in dieser Methode hätte ich dann

pDC->SetBKColor

probiert

aber da kommt die meldung dass SetBKColor kein element von CDC ist?!?

Was mach ich falsch?!?!?

das mit dem HBRUSH zurückgeben gibts auch...

Aber ich hab so ein dumpfes Gefühl dass es Fälle gibt in denen man es mit SetBkColor machen muss...

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

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.