I've had good experiences in the past few years talking to relatives with various types of dementia including Alzheimer's at the nursing home where my father resided.
Many of these people do little talking and some may not recognize you, even if you are and were close to them. A lot of people don't know what to say to them. But, you are lucky if you are after their memories. You'll have a purpose in your talk and you'll be interested in hearing anything that they may recall. They will sense this from you and will then be interested in talking to you more.
I had a 100 year old cousin who talked to few people. I sat down with him, made sure he and I were both relaxed, and told him who I was. He didn't remember me. I told him who my father was. He recalled that name but couldn't quite place it. So then (armed with family information about his side), I started naming his wife, his brothers and sisters, his parents, and his home town he grew up in. In his particular case, his real memories still seemed to be there from when he was a teenager back in Turkey. I'd ask for stories, or anything he could provide. I wrote everything down as he spoke. He enjoyed talking. It refreshed him. He remembered things. It was good for him and very enjoyable for me.
As genealogists, we treasure talking to our elder relatives. People without our hobby somehow tend to shy away from them, usually because they don't know what to say. We actually have a great topic for them. One that we are interested in and one that they are as well. Keep the topic centered on them and their lives. Talk about them. Most of our elderly, no matter what mental state they are in, will take any opportunity to talk about their lives - whatever they can remember.
Depending on the person and on their mental state, you'll get a feeling about how far to go. Whatever they seem to remember, they'll be interested in and may have some info for you. Of course, these are memories and may not be factual, so you'll have to follow up. See what detail they can provide. If they remember a name or a place. Pictures are very helpful. If you have old ones of their family, it may trigger memories. They may even identify people you didn't know in old photos.
Just don't push them. Let them volunteer information. When they've given everything, ask a question to go a bit further in one direction. If they don't know, try a different direction. Go until they seem to start getting tired or bored or distracted. Come back another day to continue. It's best to do this one on one, with just the two of you in a quiet place together.
Some people you'll get nowhere with. Some mix up words and may not provide you anything reliable. That can't be helped. But their experience of talking to you and spending time with someone willing to spend time with them will have been enjoyable to them.
I've talked to a dozen people this way in various states, right to full-blown Alzheimer's. Very rarely have I ever found any of their memories to be painful to them - even though some were painful for me to hear. These memories are so distant, time has healed any pain in them. If you do sense they are having discomfort talking about something, then switch topics and don't bring that up again. You'll have to forgo that info from this person.
In your case, for someone who has recently lost her husband, she may get upset talking about him. So talk about other information that will be relevant to you. Her children, her home, her brothers and sisters. If it is her husband that is your relation and not her, see if you can talk about his brothers and sisters, or his parents. She herself may bring her husband into the conversation, and if she doesn't get upset, you can pursue further.
In the rare circumstances where someone gets upset, try to comfort them. Give them a hug, tell them its okay, and change the subject. Often people with dementia are single minded and once distracted have forgotten what they were talking about a few seconds ago, and they'll recover quickly.
Also I highly recommend reading the book Still Alice by Lisa Genova. It is written from the point of view of a University Professor coming down with early-onset Alzheimer's. This book will give you an insight into the mental thoughts of your relatives with dementia and you'll feel more comfortable talking to them. The book was recently made into a movie and Julianne Moore won an Academy Award for the role of Alice.