String Buffer...
-
CodeFinder schrieb:
Also so sollte das aussehen ...
ist auch zu kompliziert. brauchst keine kopierorgie zu machen. man kann auch direkt auf den speicher des edit-controls zugreifen: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/editcontrols/editcontrolreference/editcontrolmessages/em_gethandle.asp
-
ten schrieb:
CodeFinder schrieb:
Also so sollte das aussehen ...
ist auch zu kompliziert. brauchst keine kopierorgie zu machen. man kann auch direkt auf den speicher des edit-controls zugreifen: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/editcontrols/editcontrolreference/editcontrolmessages/em_gethandle.asp
Jaja...dazu sag ich jetzt mal nix...
-
CodeFinder schrieb:
Jaja...dazu sag ich jetzt mal nix...
wieso? geht's nicht?
:xmas2:
-
ten schrieb:
CodeFinder schrieb:
Jaja...dazu sag ich jetzt mal nix...
wieso? geht's nicht?
:xmas2:MSDN schrieb:
If the function succeeds, the application can access the contents of the edit control by casting the return value to HLOCAL and passing it to LocalLock. LocalLock returns a pointer to a buffer that is a null-terminated array of CHARs or WCHARs, depending on whether an ANSI or Unicode function created the control.
Bääääääääääääh.
Pfui Deibel
*schüttel*p.S.: schonmal dass ich wissen muss wie das dumme Control angelegt wurde... das kann ich garnicht wissen es sei denn ich selber lege das an. *schauder* *nochmal-schüttel*
-
hustbaer schrieb:
MSDN schrieb:
If the function succeeds, the application can access the contents of the edit control by casting the return value to HLOCAL and passing it to LocalLock. LocalLock returns a pointer to a buffer that is a null-terminated array of CHARs or WCHARs, depending on whether an ANSI or Unicode function created the control.
Bääääääääääääh.
Pfui Deibel
*schüttel*aha, unüberwindliche hindernisse tun sich auf...

konnt' ja nicht ahnen dass ihr damit überfordert seid.
:xmas2:
-
ROFL Also erstmal thx @hustbear genau das meinte ich (u.a.). Des weiteren musst Du auch da ne Menge kopieren, wenn Du mit dem Text arbeiten willst (id est: ihn
verändern willst).MSDN schrieb:
The application may not change the contents of the buffer.
ten schrieb:
hustbaer schrieb:
MSDN zu EM_GETHANDLE schrieb:
If the function succeeds, the application can access the contents of the edit control by casting the return value to HLOCAL and passing it to LocalLock. LocalLock returns a pointer to a buffer that is a null-terminated array of CHARs or WCHARs, depending on whether an ANSI or Unicode function created the control.
Bääääääääääääh.
Pfui Deibel
*schüttel*aha, unüberwindliche hindernisse tun sich auf...

konnt' ja nicht ahnen dass ihr damit überfordert seid.
:xmas2:Wenn Du Dich in der Lage siehst, kannst Du das ja so machen, ich glaube jeder andere ist mit meinem vorherigen Vorschlag besser beraten.
PS: MS rät indirekt sogar von der Verwendung ab:
MSDN zu EM_GETHANDLE schrieb:
If your application cannot abide by the restrictions imposed by EM_GETHANDLE, use the GetWindowTextLength and GetWindowText functions to copy the contents of the edit control into an application-provided buffer.
-
IsWindowUnicode
-
CodeFinder schrieb:
ROFL Also erstmal thx @hustbear genau das meinte ich (u.a.).
hehe, hinterher kann das jeder sagen

CodeFinder schrieb:
Des weiteren musst Du auch da ne Menge kopieren, wenn Du mit dem Text arbeiten willst (id est: ihn verändern willst).
falls es dir noch nicht aufgefallen ist: wir wollen den text nicht verändern, sondern ihn nur mit 'ner messagebox ausgeben...
:xmas2:
-
@OP: Die Nachrichten für ein Edit-Control und für ein Rich-Edit-Control fangen beide mit EM_ an. EM_GETLINE ist eine Nachricht für ein Rich-Edit-Control und deine Editbox kann deshalb nichts damit anfangen.
Du musst da unbedingt unterscheiden, Rich-Edit und Edit sind was anderes.
-
ten schrieb:
hehe, hinterher kann das jeder sagen

Und warum hätte ich dann Deiner Meinung nach überhaupt gepostet, wenn ich keinen Hintergedanken dabei hätte ? Ab einem bestimmen Zeitpunkt setzt der menschliche Körper s.g. Schlafhormone frei die im Allgemeinen für Müdigkeit sorgen
. Wenn das bei Dir nicht der Fall ist, würde ich mir Gedanken machen
... (Ich hoffe Du weißt worauf sich diese Aussagen beziehen *grinz*)