Speaking from a lavish room at Mar-a-Lago, the club that he and his staff have deemed “the Winter White House,” he applauded the progress he said was being made in Afghanistan and Iraq, adding that the gains made against the Islamic State in the past year exceeded those during “years of the previous administration.”

“We’re being talked about again as an armed forces,” he said as a few club members lingered outside. “We’re really winning. We know how to win. But we have to let you win. They weren’t letting you win before.”

He continued extolling the victories during a second event at a Coast Guard station in Riviera Beach. The first lady, Melania Trump, joined him to hand out sandwiches in the station’s mess hall. The first couple had also provided assortments of fruit, muffins and cookies to the service members, some of whom were about to go out on patrol.

Mr. Trump, the master marketer, spoke of the Coast Guard in terms few presidents have used. “I think that there is no brand — of any kind, I’m not just talking about a military branch — that has gone up more than the Coast Guard,” Mr. Trump told the service members, citing what he described as the organization’s successful response to Hurricanes Harvey, Irma and Maria this year. “Incredible people, you’ve done an incredible job, and I love coming here and doing this for you today.”

He noted orders for new military equipment, including Coast Guard cutters, Navy ships and Air Force planes, including one that is “almost like an invisible fighter.”