Search found 217 matches

by Nunki
Wed Jul 08, 2020 8:32 pm
Forum: C++ Development
Topic: wxTimeSpan
Replies: 3
Views: 68

Re: wxTimeSpan

Hi pvn,

It is two days. It would be three days if your second date would be 2020-03-29T23:59:59. But since the time is 00:00:00, the 29th day is 'about to' begin...

tricky hey!

regards,
Nunki
by Nunki
Tue Jun 30, 2020 10:02 am
Forum: C++ Development
Topic: How can the best output and storage of large amounts of data
Replies: 3
Views: 142

Re: How can the best output and storage of large amounts of data

Hi Andy, Working with data in your application, you should always ask yourself what am I going to do with the data besides writing it to a file. Are you going to read it, alter it, search in it. If so you should do the little overhead now to introduce storage into an SQL database. So that for future...
by Nunki
Tue Jun 02, 2020 8:53 pm
Forum: C++ Development
Topic: Main window too large
Replies: 12
Views: 450

Re: Main window too large

Hi Quinze, Since you did not include your source, it may be very difficult for us to give you a descent answer. However I use DialogBlocks made by Julian Smart. Which is a good tool to create in a wysiwyg style your frames and dialogs. It also generates C++ code if you like which gives you good stud...
by Nunki
Tue May 12, 2020 3:32 pm
Forum: C++ Development
Topic: Drag and drop
Replies: 3
Views: 196

Re: Drag and drop

Hi OneEyeMan, In the meantime I found some similar question from back in 2005. Seemed that wxGrid did not support DnD. Don't know if they support it now. I don't see any event that may be linked like EVT_GRID_BEGIN_DRAG as there is with a treeview. Also it would be a DnD between two different object...
by Nunki
Tue May 12, 2020 9:34 am
Forum: C++ Development
Topic: Drag and drop
Replies: 3
Views: 196

Drag and drop

Hi Guys,

I would like to know how to implement the drag and drop feature between a wxGrid (row selection) and a treeview.

with regards,
Nunki
dragndrop.png
dragndrop.png (59.22 KiB) Viewed 196 times
by Nunki
Sun May 03, 2020 1:36 pm
Forum: C++ Development
Topic: One file - many users (program instances) should write to it
Replies: 17
Views: 578

Re: One file - many users (program instances) should write to it

Hi Wanderer82, I'm pretty sure the first instance who opens the file for writing (CreateFile) will succeed, the second will get a 'locked' error while opening and an invalid file handle. However, reading this post I get the funny feeling you have spent a lot of time searching for a bypass of a commo...
by Nunki
Thu Apr 30, 2020 10:12 am
Forum: C++ Development
Topic: One file - many users (program instances) should write to it
Replies: 17
Views: 578

Re: One file - many users (program instances) should write to it

Best beware for easy solutions, they tend to bite you back in the long run. Go for a real database like Postgresql or MySql, or even MS sqlserver. SQlite is not an option for it too uses 1 datafile and has issues with simultaneous writes as has MS access. It may seem to you as overkill but the desig...
by Nunki
Fri Apr 17, 2020 10:29 am
Forum: C++ Development
Topic: wxExecute and mysqldump
Replies: 5
Views: 226

Re: wxExecute and mysqldump

Hi YuMera, I suggest you use your debugger, set a breakpoint on wxExecute and run. Once you hit the breakpoint evaluate the string command. I guess it will only contain your command up to the password option. I think the line should be: wxString command = myAppPath + "\\mysqldump --host=localhost --...
by Nunki
Mon Apr 13, 2020 1:36 pm
Forum: C++ Development
Topic: Making an Item in a ComboBox Unselectable
Replies: 2
Views: 188

Re: Making an Item in a ComboBox Unselectable

Hi Alex,

I don't know if this would help you but in a popup menu you can add separators which are - if I remember - grayed and unselectable. Maybe this is also possible with a combobox, or maybe a popup menu does suffice for you.

happy coding,
Nunki
by Nunki
Sun Mar 29, 2020 8:20 pm
Forum: C++ Development
Topic: [Solved] problem with socket program for p2p
Replies: 45
Views: 1865

Re: problem with socket program for p2p

Hi Marco, A segmentation fault is most likely when you use an invalid variable or uninitialised pointer. The error message gives you the information. The call socket->Connect(addr,false); is faulty in some way. Two possibilities either socket is not initialised or addr is wrong. You put pClient into...
by Nunki
Thu Mar 26, 2020 2:32 pm
Forum: C++ Development
Topic: [Solved] problem with socket program for p2p
Replies: 45
Views: 1865

Re: problem with socket program for p2p

Hi Marco, Just to be sure... You want one PC to connect to multiple servers ? so PC1 connects to SRV1 and SRV2 and SRV3 ..... up to SRVx ? right ? If this is the case, that is perfectly possible. Let's say you have created your application to listen on port 2000 so the client tries to connect to SRV...
by Nunki
Wed Mar 25, 2020 10:31 am
Forum: C++ Development
Topic: [Solved] problem with socket program for p2p
Replies: 45
Views: 1865

Re: problem with socket program for p2p

Hi Marco, If I may reply on your last comment, Basically a sochet server starts and listens on a socket port for incomming connection requests - by socket clients of course. Once a connection is made the server tells the client lets continue our conversation on another port xxxxx and the connection ...
by Nunki
Wed Mar 25, 2020 10:25 am
Forum: C++ Development
Topic: [Solved] problem with socket program for p2p
Replies: 45
Views: 1865

Re: problem with socket program for p2p

Hi Marco, I think it would be wise to do some reading on sockets and how to build a client-server. Luckily sockets is quite standard on all platforms so you could start with the following book: UNIX Network Programming Networking APIs: Sockets and XTI Volume 1 by W. Richard Stevens This will help yo...
by Nunki
Fri Feb 21, 2020 12:12 pm
Forum: C++ Development
Topic: How to know if a wxFrame is beeing closed by a user
Replies: 11
Views: 612

Re: How to know if a wxFrame is beeing closed by a user

Hi,
Maybe not the nicest way and maybe I'm looking at it too simple. When your application closes the frame itself, set a global boolean flag bAutoClosed to true. Then you can at any time after closing a frame, determine whether a user closed the frame or your program did.

regards,
Nunki
by Nunki
Fri Feb 21, 2020 10:10 am
Forum: C++ Development
Topic: How to change language at runtime
Replies: 8
Views: 470

Re: How to change language at runtime

Hi,

You could, instead of creating the whole dialog with several wx statements, create XRC files and simply load them and display them. Then you can layout them while designing them with your wysiwig tool. Saves you a lot of coding.

with regards,
Nunki