Type: Posts; User: OReubens
Search took 0.12 seconds.
Yes, as I said before, this'll work, but it's synchronicity by using a double asynchrone approach. Which makes it a less than ideal solution. There's a few gotcha's with the approach, one of them...
the first is recursive
and will get 10 calls deep, each call will use AT LEAST 8 bytes of stack (could be more), so a total of at least 80 bytes stack will be used (could be more).
The first is...
April 17th, 2015, 10:14 AM
I never claimed other wise. I even said that an XML parser would be semi-advanced.
But that doesn't mean that ALL worthwhile programming exercises even very simple ones necessarily have to be...
April 17th, 2015, 08:04 AM
If your worker threads SEND messages to your UI thread. There is no way you can guarantee that no deadlock will ever occur and that all those sends will be successful, consistent and not cause...
April 17th, 2015, 07:55 AM
If a thread has a messageloop that manages/handles messages sent to windows. It is a UI thread. Any thread that isn't a UI thread is a worker thread.
While it is possible to have multiple UI...
April 17th, 2015, 07:43 AM
Writing programs to calculate the area and circumference of a circle,
reading files and producing score cards
and pretty much every other programmign exercise IS in essense a waste of...
April 17th, 2015, 06:47 AM
or in more detail.
Because the MDI document window is not a child of the frame
it's a child of the MDI child window (manager window), which is a parent of the frame.
April 17th, 2015, 06:40 AM
If you need that much memory, and you require this in Win32, then possible ways out are:
- Using better algorithms that use less memory. For example if your arrays are sparse (lots of large arrays...
April 17th, 2015, 06:31 AM
You set this per application actually. It's part of the features flags in the PE header.
April 16th, 2015, 07:48 AM
Deadlock is one problem
Having your app crash is another (happened to me, see above).
Deadlock and crashing are entirely non-related issues, even though the underlying problem causing them can be...
April 16th, 2015, 07:46 AM
I meant it as I wrote it.
PostThreadMessage() is one way to post, but it isn't the only way. If the thread has a messageloop, you can post anything you want. You just need to make sure it arrivés...
April 16th, 2015, 07:41 AM
If that is the only way you can make your app. Then yes.
But from a more realistic p.o.v. you should strive to make your worker threads not be very "chatty" towards your UI.
A worker thread...
April 16th, 2015, 07:29 AM
you can concatenate literal strings. (although technically this isn't "concatenating", the compiler will merge this into a single string)
string s = "one" "two"
April 16th, 2015, 07:18 AM
Maybe the idea was to actually write a simple xml parser that will handle xml and have methods to programmatically query the parsed xml tree. Provided it doesn't contain some of the more complex...
April 16th, 2015, 07:08 AM
It doesn't work
unless you change the program for every new file you receive, since you hardcoded a date.
a date which doesn't even match the date in the sample fiel in your OP....
April 16th, 2015, 06:58 AM
Have you even tried running this through a debugger ?
That should be your first step for any sort of "this program doesn't work the way I expect it to".
Now, if you have specific parts you cna't...
April 15th, 2015, 08:14 AM
THAT is your problem.
don't do other requests, file output and requesting data from the devices' buffer on the same thread that takes care of UI.
Or, if you do, that will be exactly the places...
April 15th, 2015, 07:46 AM
Missed this before.
have the worker thread post a message requesting info.
gui thread retrieves the info and posts this back to the worker.
There's various ways you could do this, depending...
April 15th, 2015, 07:34 AM
Exactly like I posted
Gui thread was updating controls, some automatically, some on user input
worker thread reads the controls, does some work.
Worked fine for quite a long time, until it...
April 15th, 2015, 07:25 AM
if you want to convert xml to some other tekst format there is XSLT.
I have used it to convert xml to other xml, xml to html, xml to csv, and xml to plain text.
Other than that, you can write a...
April 15th, 2015, 07:15 AM
This is obviously wrong.
SMTP is built entirely around 'readable characters' (typically even 7bit) with a couple allowed control characters like \n, \r, \t.
\0 is not a valid character anywhere in...
April 15th, 2015, 07:12 AM
In Windows, you cannot 'reparent' a child window.
In part because that wouldn't even make a whole lot of sense, part of the Windows approach to things is that it is the parent that is responsible...
April 14th, 2015, 07:35 AM
If someone asks to use GetWindowText() from a thread, that typically means it's about getting text that will change during the lifetime of the worker thread. Because if it wouldn't be changing, you...
April 14th, 2015, 07:24 AM
for all intents and purposes... If you put a SendMessage() that is pretty much 'hardwired' to directly call into the windows procedure without any sort of queueing. The real story is a bit...
April 14th, 2015, 07:19 AM
I had a program like that once. Then I fixed a bug and that 'feature' went away.
I realise how much less awesome that program is now. :-(
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.