|
The selected item should remain selected after the second dialog terminates.
|
|
|
|
|
Thanks you so much for reply...
Now I tell u full story. when i drag the item into grid it also add into TreeView.Now suppose there are 3/4 item into editor and u select one the parallely tree item will also select.so now this time both the thing are selected but as u will click some where else like open an dialogbox and close it then tree item will be selected but partially it`s colour will be Gray..now my problem is that Gary colour. I need it Fully selected Item.
Please tell me what to do...
modified 5-Dec-16 7:40am.
|
|
|
|
|
If you want your item to be highlighted (blue) it must not only be selected, but the containing control must have the focus. Read up on "set focus".
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
I piece of code that is executed by 4 threads. I want to Serialize it one at a time
So I Create a Mutex handle = CreateMutex(NULL,FALSE,NULL);
I observe that the HANDLE its not NULL
Then I "dwWaitResult = WaitForSingleObject(sysblk.single_thread,INFINITE)"
(I am running this under VS debugger and have a few breakpoints before I do the ReleaseMutex)
Then finally the first thread gets to the end of the serialized code.
I do a "ReleaseMutex(sysblk.single_thread)" it returns 1 however
When I look back at the VS Threads Window and click on each the 3 threads there is an inverted arrow at the WaitForSingleObject indicating
that none of the threads were signaled
Thanks
|
|
|
|
|
|
Sorry that was a typo as I typed the code and didn't cut paste it was meant to be
WaitForSingleObject(handle,INFINITE); and ReleaseMutex(handle);
Let me ask question after the first thread goes thru the WaiForSingleObject it turns from
signaled to non-signaled then if more then one thread is waitting when the ReleaseMutex is
executed it lets only ONE thread at a time to process while the other remain waiting till
the next ReleaseMutex correct ?
|
|
|
|
|
That should be the way is works. Each thread should acquire the Mutex (i.e. lock it) in order to protect the data. When they finish the critical section they should Release it. The point being that you only want one thread through this path at any one time.
|
|
|
|
|
Sorry for the delayed response but I have been very busy at work
But can Multiple threads wait on the Mutex with the WaitForSingleObject
And then which is released with the ReleaseMutex the one waiting the longest
|
|
|
|
|
I'm not sure, you would need to run some tests to find out. But in a properly designed application it should not matter, mutexes are not supposed to be FIFO queues.
|
|
|
|
|
|
In the Microsoft example there are 2 threads so ..
1) thread gains ownership of the signaled object and the second waits
In may case they are 4 so If thread 1 gains ownership do threads 2 - 4 waits
if so When the ReleaseMutex are all released or only one at a time
if so Which one
|
|
|
|
|
ForNow wrote: do threads 2 - 4 waits
Yes.
ForNow wrote: When the ReleaseMutex are all released or only one at a time
It depends on the scheduler. Thread scheduling is a very interesting topic in OS design, and the rules can vary from platform. But a general rule is that the waiting thread with the highest priority runs. However some OSs throw in a bit of priority inversion on occasion to free up any deadlocks.
Within the same priority group you might decide on say, 'last thread run', or 'first thread waiting' to decide which to activate and give the CPU to. A bit like FIFO, LRU LIFO etc, there are a lot of designs.
The important point though is that the OS does this for you so no need to worry about it. Use the example from Microsoft and all will be well.
|
|
|
|
|
If all the threads are released it is a problem
|
|
|
|
|
they arent, so you are OK.
|
|
|
|
|
i need help for this project. I would glad if someone could help me with my concern.
Create in C/C++ client and server application for UNIX operating system using BSD
sockets (located at eva.fit.vutbr.cz or merlin.fit.vutbr.cz) which will provide directory
service (small LDAP) .
• Final programs should be compiled into filename called client and
server.
• Create makefile which can be used for automatic compilation of source
files by typing make statement in UNIX shell.
• All errors should be printed on stderr.
• Directory database will be presented as text file (CSV format) with
following syntax:
• “id,login,surname,firstname,faculty” . Each entry (line) is terminated by
\n character.
|
|
|
|
|
We will not do your homework.
|
|
|
|
|
|
We do not do homework, assignment help, because homework is assigned to check how much you have learnt and where you lag in programming.
All of those steps can be also easily answered if you just try to find them on Google.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
Any failure of you will help your teacher spot your weaknesses and set remedial actions.
So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
Is there someon that knows a good tutorial for a 2d game in c++.
I searched for manny tutorials vut didnt find a good one.
|
|
|
|
|
In any case, game development in C++ will be tough, and if you are a beginners don't even bother.
A good one, if you mean the one that builds everything for you, won't be available easily. You need to learn a lot of things them merge them. JavaScript, C# etc. have engines that can supports 2D game development easily and in simple code as compared to C++. So, look into them.
2D breakout game using pure JavaScript - Game development | MDN[^]
Unity - 2D Game Development Walkthrough[^]
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
I learned the basics od c++ and java but i think you can make beter games in c++ . Just ned a tutorial for hwo. To make some games with c++
|
|
|
|
|
If you are a beginner then Java or C++ doesn't make sense or difference. You can develop performance-ready games in Java too. For that, I would recommend having a good understanding of many things, there are books available; tutorial or article won't be enough.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
We have articles on this topic: 2d game[^].
|
|
|
|
|
<pre lang="C++ MFC">I have a question for making use of multiple cores within a single thread. The scenario is like this, I need to do an intensive analysis behind the scene, so I create a separate thread to do this. As I want this thread to use multiple cores if they are available, OpenMP is used within this thread. Does this thread actually use multiple cores available? I guess it does, then my next question is how to kill this thread safely? i.e. anything needs to take care of compare with single core case? Why I am asking this question is that the killing process crashes the application when nultiple cores are used</pre>
|
|
|
|