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 - Editstream und StreamInCallback

Empfohlene Antworten

Veröffentlicht

Hallo ihr,

hoffe, ihr könnt mir bei meinem Problem weiterhelfen. In meinem Dialog möchte ich im RichEditFeld einen Text ausgeben und ihn dann formatieren, allerdings bekomm ich das irgendwie nicht hin. Keine Ahnung an was das liegen könnte. :confused:

Mein Code sieht wie folgt aus:


static DWORD CALLBACK StreamInCallback(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb) 

{ 

    CString* pString = (CString*)dwCookie; 


    *pcb = min(pString->GetLength(), cb); 


    ::lstrcpyn((LPTSTR)pbBuff, *pString, cb); 


    *pString = pString->Mid(*pcb); 


    return 0;

}


//...


void DisplayUnknownBit::formateText()

{

	EDITSTREAM file;

             CString text ="Blubb";


             file.dwCookie = (DWORD)&text; 

	file.pfnCallback = StreamInCallback; 

	file.dwError = 0;

	m_RichEditText.StreamIn(SF_TEXT, file);

            //...

}

Was mach ich denn falsch?

Danke jetzt schon mal für eure Tipps/Ratschläge!! :e@sy

Gruß Kitty

Hallo,

habe herausgefunden, dass er mir alles nach "\n" nicht mehr anzeigt und daher auch kein Text in meinem RichEditFeld erscheint. Jetzt habe ich schon versucht das "\n" durch ein "\r\n" zu ersetzten, aber er zeigt trotzdem danach nix mehr an. Weiß jemand vielleicht, was für ein Zeilenumbruch-Zeichen ich eingeben muss?

Danke + Gruß

Kitty

//Edit: hat sich erledigt - musste nur mein REF auf "Mehrzeilig" umstellen :floet:

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.