|
|
Has si been initialized (properly)?
Why are you not calling GetLastError() to find out why CreateProcessA() failed?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: Why are you not calling GetLastError() to find out why CreateProcessA() failed?
He's busy eating his Fish Filet
|
|
|
|
|
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Which is exactly what I had for lunch today. I don't get the joke, however.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: I don't get the joke, however.
Still?[^]
|
|
|
|
|
It's clear now. Thanks.
Reminds me of this joke:
A man boarded a bus and saw the back bench seat occupied by a group of schoolboys. He made his way to the back and heard one of the boys yell out "5" and the whole group laughed loudly. Another boy yelled out "23" and louder laughter ensued. This went on for sometime and the man out of curiosity asked one of the boys what was up. He said that they had numbered the jokes they knew and just called out the joke number instead of telling the whole joke.
The man thought he would give it a try and yelled "3" - no one laughed. He tried again "7" - silence. "Whats wrong?" he asked.
"C'mon man - that's no way to tell a joke." the boy replied.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
After the amusement, it always just makes me hungry!
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I've got Cornish Mackerel on for tea if you're in the area
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
That sounds VERY tasty!
Sadly, I am NOT in the area
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi
I have a worker thread in my project and this thread is waiting the data which is coming from serial port.I want that when a certain data comes from the serial port I will change the keyboard focus from one edit box to another.This data which is coming from serial port will work like TAB button in our keyboards.I know that SetFocus() method is doing that job however when I want to do this in worker thread it is not working.Although I can do many things in worker threads like writing tha data to edit boxes,I can not change visually the keyboard focus from one edit box to another.Is there any body who have an idea about that problem?
Thanks all
|
|
|
|
|
If you're working in MFC then there is a simple rule.
Never do anything in a worker thread that touches the user interface directly in any way. Not even a message box. (Even if it seems to work most of the time)
If you want to change the UI from a worker thread then use PostMessage to tell your main thread to do it and then get the main thread to change the UI in the message handler. You can define your own mesages in the WM_USER + n range for these sort of things and add ON_MESSAGE entries to your message maps to route to your handler.
The reason for this overly strict sounding rule is that MFC blocks the main thread anyway when it does anything UI related even if you call the MFC functions from your worker thread. If the main thread is waiting for the worker to complete but the worker is waiting for MFC to grab the main thread to change the UI nothing will ever happen. This receipe for deadlocks should be avoided by all non masochists
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Thanks for your help.
This solved the problem.
|
|
|
|
|
Matthew Faithfull wrote: You can define your own mesages in the WM_USER + n range for these sort of things
It's better to use WM_APP instead of WM_USER because some of the control classes use WM_USER to define their internal messages (like the TB_* messages). This isn't usually a problem since those messages tend to not be sent to "main window" message queues but it does happen. I speak from experience . Good practice is to use WM_APP instead and avoid the problem.
Judy
|
|
|
|
|
You ought to read this[^] in addition to what Matthew already stated.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hi All,
I've been out of the application development cycle for quite a while, but now need to touch up again (and quickly). So I was wondering which Visualization and Modelling Tools you would recommend to review, something like StarUML or RationalRose etc. Also which modelling "language" is mainstream these days, still UML, anything else perhaps ?
Thanks
OD
|
|
|
|
|
The silence is deafening
|
|
|
|
|
Not much has changed has it. UML is still as standard and as next to useless, as it ever was and Rational Rose is still over priced and still flakier than VB6 on a good day. Modelling is still hard and few have the resources to do it at all let alone properly. I'd call it an opportunity for a major rethink and a developer driven push to update or replace UML with something practical and the tools to match. Time to stop being pushed into an inadequate way of thinking about software design by the limited range of agreement between a bunch of bickering professors.
I'd like the kind of tools building architects have where they can wander around a building before they've built it and check out the view from the 5th floor balcony. Where they can try out different lighting designs and see what effect they'll have, calculate how much material they'll need automagically and see whether standard stairwells will fit or not. We wrote those tools so why can't we do as well for ourselves?;)
Feel free to Soapbox this thread as you see fit.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Matthew, are there at least some commonly accepted Best Practices for documenting projects ? I have already decided that we will use Doxygen to document/comment the source code, but what do we use to depict the actual design/architecture/data flow/etc of our project ?
Regards
|
|
|
|
|
Hi
I have again some problem regarding windows registery.
I am trying to delete a key and it's sub keys and all
the corressponding values.
Here is the code which I am using:
HKEY m_htKey;
LONG res;
const char* lpSubNsKey = "SOFTWARE\\N K Product";
res = RegOpenKeyEx(HKEY_CURRENT_USER ,lpSubNsKey,0,KEY_ALL_ACCESS,&m_htKey);
if (res == ERROR_SUCCESS)
{
//res = RegDeleteKey(m_htKey,lpSubNsKey);
LONG status = SHDeleteKey( m_htKey,lpSubNsKey);
RegCloseKey(m_htKey);
}
In the above code,the RegOpenKeyEx() is returning 0 means registery is getting
opened but the SHDeleteKey() is returning 2 i.e. it's error code message is "The system cannot find the file specified".
But the key name is available there in the registery.
So,can you please suggest me what could be the problem?
With Regards
Neeraj Sinha
|
|
|
|
|
You're passing the handle you got back from RegOpenKeyEx , which in effect means you're asking SHDeleteKey to delete HKEY_CURRENT_USER\SOFTWARE\N K Product\SOFTWARE\N K Product , which presumably doesn't exist.
Simply pass HKEY_CURRENT_USER as the first parameter to SHDeleteKey , and don't bother calling RegOpenKeyEx .
|
|
|
|
|
Hi Mike
Thanks a lot for your help.I got it and my problem got solved.
With Regards
Neeraj Sinha
|
|
|
|
|
Hi all
I need a perfect tool to convert microsoft coff format library to
omf format library . Borland c++ Builder coff2omf doesnot work .
please . i need urgent help
RajeshGupta
|
|
|
|
|
rajeshgupta1253 wrote: i need urgent help
that's not a correct way to ask for something, don't you find ?
|
|
|
|
|
I search a lot like digital mars Borland . but no one works fine
can you suggest me more if u know something about it.
RajeshGupta
|
|
|
|