Search found 251 matches

by dkaip
Wed Jun 17, 2020 9:20 pm
Forum: C++ Development
Topic: Serializeand deserialize wxImage
Replies: 9
Views: 410

Re: Serializeand deserialize wxImage

Yes you have right. That is my question. Is that possible?
In question
permanent storage such as a hard drive (why not?),
just for fun.
There is no need to do that, but only for knowledge and curiosity.
Thank you.
Jim
by dkaip
Wed Jun 17, 2020 7:06 pm
Forum: C++ Development
Topic: Serializeand deserialize wxImage
Replies: 9
Views: 410

Re: Serializeand deserialize wxImage

Hello. maybe i must start a new subject? After that code works perfect, a new idea to my mind. From clipboard all data as binary, to blob and vise versa. Is that possible? For example, copy a web page or doc file to clip and put in blob. Any time we can have it without have a file in hard disk. Than...
by dkaip
Sun Jun 14, 2020 9:03 pm
Forum: C++ Development
Topic: Serializeand deserialize wxImage
Replies: 9
Views: 410

Re: Serializeand deserialize wxImage

Hello, sorry if i am not respond. Too many things in my mind, and little time.
Thank you for the code.
As i see with code works just fine, thank you.
Jim
by dkaip
Sun Jun 14, 2020 4:02 pm
Forum: C++ Development
Topic: Serializeand deserialize wxImage
Replies: 9
Views: 410

Re: Serializeand deserialize wxImage

Hello, thank you. I have try wxBITMAP_TYPE_PNG and don’t work. Sorry, i forgot code ... wxString wxMemoryBufferToString(const wxMemoryBuffer& buffer) { wxString mystring(buffer, wxConvUTF8); return mystring; } Yes this is related to your other posts regarding wxSQLite. It is old problem for me. As i...
by dkaip
Sat Jun 13, 2020 7:00 pm
Forum: C++ Development
Topic: Serializeand deserialize wxImage
Replies: 9
Views: 410

Serializeand deserialize wxImage

Hello. In code bellow i am try in first place to serialize the wxImage to wxString... ool wxImageToMemoryBuffer(const wxImage& image, wxMemoryBuffer& buffer) { wxCHECK(image.IsOk(), false); wxMemoryOutputStream stream; if ( !image.SaveFile(stream, wxBITMAP_TYPE_ANY) ) return false; buffer.SetBufSize...
by dkaip
Fri Jun 12, 2020 10:46 am
Forum: Database Related
Topic: Crach inserting same objects in wxSqlite3
Replies: 5
Views: 574

Re: Crach inserting same objects in wxSqlite3

Thank you. Now runs ok with select exists(select * from table where condition=value limit 1) where *=client, condition=client and value is previews client. wxString sql1=wxT("select exists(select client from clients where client='"); sql1+=cl.serialize(); sql1+=wxT("' limit 1)"); wxSQLite3ResultSet ...
by dkaip
Thu Jun 11, 2020 8:08 pm
Forum: Database Related
Topic: Crach inserting same objects in wxSqlite3
Replies: 5
Views: 574

Re: Crach inserting same objects in wxSqlite3

Thank you. Error code is 19 and message "constraint failed[2067]: UNIQUE constraint failed: clients.client" catch (wxSQLite3Exception& e) { wxMessageBox(wxString::Format(wxT("%d"),e.GetErrorCode())); wxMessageBox(e.GetMessage()); } If client is unique it must not try to make a row. So why make the e...
by dkaip
Thu Jun 11, 2020 4:39 pm
Forum: Database Related
Topic: Crach inserting same objects in wxSqlite3
Replies: 5
Views: 574

Crach inserting same objects in wxSqlite3

Hello. Trying to insert the cl object that already exists in db, i have no error but program crashes .. The table has many other columns but the inserting object is the client, that is unique, so for the already exists must not insert a new row. Is that correct? db->ExecuteUpdate(wxS("CREATE TABLE c...
by dkaip
Mon Jun 08, 2020 7:08 pm
Forum: C++ Development
Topic: wxString <-> wxImage/wxBitmap
Replies: 7
Views: 1110

Re: wxString <-> wxImage/wxBitmap

Hello. I am trying to do the same, but using code say ... error: ‘class wxString’ has no member named ‘GetWriteBuf’| Full code ... wxImage pic(omega_xpm); unsigned char* picData = pic.GetData(); wxString str; unsigned char* buf = (unsigned char*)str.GetWriteBuf(pic.GetHeight()*pic.GetWidth()*3); mem...
by dkaip
Sun Jun 07, 2020 2:12 pm
Forum: Database Related
Topic: How to copy tables between databases?
Replies: 3
Views: 460

Re: How to copy tables between databases?

Sorry, don’t know how to code this ... I have try ... wxFileDialog openFileDialog(this, _("Open db file"), "", "","files (*.db)|*.db", wxFD_OPEN|wxFD_FILE_MUST_EXIST); if (openFileDialog.ShowModal() == wxID_CANCEL)return; wxString file=openFileDialog.GetPath(); wxSQLite3Database* db = initDB(); wxSt...
by dkaip
Thu Jun 04, 2020 3:55 am
Forum: Database Related
Topic: How to copy tables between databases?
Replies: 3
Views: 460

How to copy tables between databases?

Hello. I must copy the rows from a one database to other. Usually i use ... wxSQLite3Database* db = initDB(); wxSQLite3ResultSet set = db->ExecuteQuery(wxS("SELECT client FROM clients")); int count = 0; wxString s; while (set.NextRow()) { s = set.GetAsString(0); s.Trim(); if(s.IsEmpty())continue; my...
by dkaip
Fri May 29, 2020 3:36 pm
Forum: C++ Development
Topic: Many wxWidgets Alerts
Replies: 2
Views: 210

Many wxWidgets Alerts

Hello. Moving from Linux Mint to win10 my program (wxWidgets3.1.3 && minGW-w64 && wxFormBuilder) i have many problems, that pass. Now i have many asserts with horizonal aligment flags and wxEXPAND even in release mode. Sizers are to many. There is a way to disable asserts? I already try wxDISABLE_DE...
by dkaip
Fri May 29, 2020 3:24 pm
Forum: Compiler / Linking / IDE Related
Topic: Problem reference wxXmlNode
Replies: 3
Views: 340

Re: Problem reference wxXmlNode

Thank you very mutch.
It works. Ok.
I want to know the way to reproduce in future the order of libs. There is a way?
Thanks.
Jim
by dkaip
Fri May 29, 2020 11:20 am
Forum: Compiler / Linking / IDE Related
Topic: Problem reference wxXmlNode
Replies: 3
Views: 340

Problem reference wxXmlNode

Hello. Downloading wxWidgets3.1.3, minGW-w64 and build with mingw32-make SHELL=CMD.exe -f makefile.gcc BUILD=release UNICODE=1 SHARED=0 libs i have the libs libwxbase31u.a , libwxbase31u_net.a , libwxbase31u_xml.a , libwxexpat.a , libwxjpeg.a, libwxmsw31u_adv.a, libwxmsw31u_aui.a, libwxmsw31u_core.a...
by dkaip
Sat Mar 07, 2020 5:09 pm
Forum: wxCode
Topic: Construct sqlcipher sqlite files for minimal.
Replies: 7
Views: 1002

Re: Construct sqlcipher sqlite files for minimal.

Hello. Suppose i have the code bellow ... wxSQLite3Database* initDB(void) { wxString testDBName = wxS("dub.db"); wxSQLite3Database* db = new wxSQLite3Database(); db->Open(testDBName); if (!wxFileExists(testDBName)) { db->UserAdd(wxS("user"), wxS("pswd"), true); db->UserLogin(wxS("user"), wxS("pswd")...