A prominent black House Democrat told President Trump Wednesday that his administration must investigate voter suppression along with voter fraud, and told reporters after the meeting that the president “got it.”

“He seemed to get it, to understand that you cannot have research done on voting in the United States without dealing with voter suppression,” said Rep. Elijah Cummings, Maryland Democrat. “I think he got it. “

The lawmaker also told the president that his comments about “carnage” and poverty in black communities were “hurtful.” And he told reporters later that he wished he’d had time in the meeting to chide Mr. Trump for accusing President Obama of wiretapping his campaign phones.

Mr. Cummings, a member of the Congressional Black Caucus and top Democrat on the House Oversight Committee, met with the president at the White House Wednesday afternoon about lowering the cost of prescription drug prices. He said he raised the issue of voter suppression in light of Mr. Trump’s assertions that voter fraud cost him millions of votes in the presidential election.

The president has appointed Vice President Mike Pence to lead a government task force to investigate voter fraud. But Mr. Cummings said he told the president that the probe will be meaningless unless it examines partisan efforts to keep minorities from voting.

“I told him that I thought voting fraud is all but nonexistent,” Mr. Cummings said later. “The thing that we do know is a problem is voter suppression, and that you cannot have any kind of reasonable investigation of voting in the United States unless you deal with that issue. I think he got it.”

A resident of Baltimore, Mr. Cummings also confronted the president about his comments that black communities are suffering. During the campaign, Mr. Trump pledged to rebuild inner cities “because our African-American communities are absolutely in the worst shape that they’ve ever been in before.”

“I said ‘I don’t know whether anyone has ever said this to you, but most of the African-American communities are doing very good,’” Mr. Cummings told reporters. “When we hear those words about carnage, and we’re living in depressed situations, I told him that it was very hurtful for people. Our children are being raised and we’re doing fine, our neighborhoods are doing great. All neighborhoods have some kind of problems. I think he got it. Where he goes from there, I don’t know. But I could not come out of this meeting without raising those issues.”

The president has often cited the example of Chicago, with its soaring murder rate and gun violence, as a city in need of help.

Mr. Cummings said he told Mr. Trump, “‘I’ve been living in the inner city of Baltimore for some 35 years in the same house, and that I think it would be good for him to acknowledge that most African-American people are doing very, very well.’ We certainly welcome his efforts to improve our communities.”

The lawmaker said he didn’t have time to bring up Mr. Trump’s claims that Mr. Obama wiretapped his phones last year.

“You do the best you can with the time that you have,” Mr. Cummings said. “If I had time, I would have told him that I would appreciate if he wouldn’t say things like that about President Obama. He’s one of the most honorable men that I’ve ever met.”

Mr. Trump met last month with dozens of presidents of historically black colleges and universities as part of his push to improve education overall. The president signed an executive order moving oversight of those schools from the Education Department to the White House.

Mr. Cummings said the president told him that the HBCU leaders “never asked” him for more government funding.

“The HBCUs need money,” Mr. Cummings said. “He said they never asked. So I asked that he help those historically black colleges and universities. He said he would work on that.”