Mutex objects use on Window Objects

Posted on 2004-11-23
Last Modified: 2013-11-20
Hello All,

This is sample code snippet in my code.

 CString str=list.GetItemText(1,i);

Now my question is will mutex locks the total list control or only the item I have selected??

Question by:sudhakar_koundinya
    LVL 13

    Accepted Solution

    The mutex will only assure that no other thread/ process can get that mutex. To completly lock the list you need to enclose all access to this ctrl with that mutex.
    LVL 13

    Expert Comment

    What is your need? I guess it is not blocking the OS from accessing the list control. Else you need to derive a class from that control and secure all modifier functions with a lock/unloch pair.
    LVL 14

    Author Comment

    I Just get the doubt

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
    Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    This video discusses moving either the default database or any database to a new volume.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now