|
i asked my dad about it and he said it was from an old stupid class called "MyDlg" so he told me to find a new way to call dialogs.
now that code and way of doing it its obsolet so if i acomplish solving this issue i solved the issue for all the dialogs that need to be called.
already tryed to use the .DoModal(); thing but it didnt work
modified on Wednesday, April 2, 2008 4:04 PM
|
|
|
|
|
pabloraul wrote: ...i think im using it wrong
That all depends on if you want a modal or modeless dialog. If the former, use DoModal() , much like you are already doing in your app's InitInstance() method to bring up dialog A.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
thenks for the idea, found an article about modal thingies
|
|
|
|
|
pabloraul wrote: an article about modal thingies
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Think nice thoughts - we were all there once.
Too long ago for me, I sometimes think!
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
It wasn't his verbiage that bothered me (I'm from Oklahoma so I get accused of talking funny all the time). It was that he talked about modal while linking to a modeless article.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: It was that he talked about modal while linking to a modeless article.
Ah, he's taking the zen approach to computer programming. Learn X, by learning about ~X.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
That reminds me of an incident in the elevator yesterday. The elevators in the lobby of our building can go up (to floors 2-15), or down (to floors B and SB). Above the elevator doors are red arrows pointing down. They are lit when the elevator is going down (and unlit otherwise) to let those getting on know where they are headed to. I got on yesterday with a guy that was apparently new to the building. We were both going up. Because I had gotten on so quickly, he asked me how I knew that the elevator was indeed going up. I told him it was because the red arrows did not tell me it was going down. Sort of a reverse logic thing.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
You are going to be in trouble when the bulb breaks!
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
Iain Clarke wrote: You are going to be in trouble when the bulb breaks!
They are already somewhat unreliable (built in the 50s). Worst case, and has happened, I go to the 7th floor via the sub-basement.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Can be used SetupComm() after port initialization and reading of some data to change buffer sizes?
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
No, after you have read data...you will need to close the handle, reopen it and call SetupComm() before reading/writing.
Best Wishes,
David Delaune
|
|
|
|
|
Thanks!
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Hello,
can I somehow find out how many thread are waiting
for an event on WaitForSingleObject (or how many Threads
have been released when setting it?
Alex
|
|
|
|
|
WaitForSingleObject waits for only one object. And to know the state of a thread, use getExitCodeThread.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
Thank you for your answer.
VuNic wrote: WaitForSingleObject waits for only one object.
But multiple threads can wait for one object - and I would like to know how many. The problem is:
when I use a (synchronized) counter before the WaitForSingleObject,
how do I know if the Thread has already reached it and is waiting
or was interrupted before - I can not unlock the counter atomically
with the WaitForSingleObject call...
Alex
|
|
|
|
|
LionAM wrote: how do I know if the Thread has already reached it and is waiting or was interrupted before
There's no way reliably. What thread would be examining this thread to see where it's at?
What are you trying to do and how is this counter involved? There may be a simpler solution
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I wanted to implement a multiple reader/single writer lock.
The counter counts the number of waiting readers (which
then wait until the event is set).
If a writer unlocks, it sets (or pulses if there are writers
waiting) the event so that all waiting readers can resume -
but only if they already wait.
Alex
|
|
|
|
|
The lack of an atomic lock/counter-adjust API makes it tricky.
There's a ton of solutions on the web (e.g. search "reader writer lock") that vary in performance and whether
they favor the reader thread(s) or the writer thread(s).
Even if you're looking to design your own, they're worth looking at IMO.
Here's an interesting article: Implementing a Reader-Writer lock[^]
along with its companion article: Analysis of Reader-Writer lock[^]
Here's a simple example - straight forward, if performance isn't a major concern: Reader/Writer Lock[^]
Hope that helps a bit,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I have found a very simple and short solution, using only
two "fast critical sections" (interlocked bool) and one
(interlocked) counter - and less than 20 lines of code.
Alex
|
|
|
|
|
Cool!
As long as it meets your performance requirements and doesn't deadlock
Like I mentioned, there's lots of ways to do it - with "big" performance differences between
the solutions.
Glad you found a solution!
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
AFAIK, no, not with Windows synchronization objects.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Friends, I am working on the code, wrote by somebody.. I added a new menu Item in the resource.. say "xyz", during the
runtime it is shown as "@xyz@".. I need it as "xyz",
how to handle this friends..
|
|
|
|
|
ptr_Electron wrote: how to handle this friends
Fix it friend
led mike
|
|
|
|
|
Thanks for ur responce friend
|
|
|
|