Home » U++ Library support » U++ Core » ChatClient with Ultimate++
Re: ChatClient with Ultimate++ [message #14668 is a reply to message #14666] |
Thu, 06 March 2008 21:39   |
chochmah
Messages: 5 Registered: March 2008
|
Promising Member |
|
|
///layout
LAYOUT(j2Layout, 624, 436)
ITEM(LineEdit, a, LeftPosZ(4, 564).TopPosZ(412, 20))
ITEM(RichTextView, e, LeftPosZ(0, 624).TopPosZ(0, 408))
END_LAYOUT
///main
class j2 : public Withj2Layout<TopWindow> {
public:
typedef j2 CLASSNAME;
j2();
};
j2 HG;
String qtfx;
j2::j2() {
CtrlLayout(*this, "Joachim 0.1");
SetLanguage( LNG_('D','E','D','E') );
SetDefaultCharset(CHARSET_UTF8);
}
void textin_cb(int x,String farbe,String Sender,String text) {
qtfx<<"\1"<<Sender<<":"<<text<<"\1]&";
HG.e.SetQTF(qtfx);
HG.e.ScrollEnd();
}
GUI_APP_MAIN
{
readinifile();
int ids = 1;
pthread_t threads;
pfi = &ParseChatLine;
pthread_create (&threads, NULL, readchat, &ids);
HG.Run();
}
Thanks for the Reply, I hope this helps. Calling textin_cb result in an heap or memory error when:
-The scrollbar is moved while textin_cb is called
-More then one page of text in the widget
(also happens without HG.e.ScrollEnd()
Thank you
|
|
|
Goto Forum:
Current Time: Wed Sep 03 20:07:45 CEST 2025
Total time taken to generate the page: 0.03930 seconds
|