user1206688
user1206688

Reputation: 13

How to move button through dialog using mfc application

I am beginner and want to move button in such away that i click on a button and that moves to the coordinates that i have given statically. so what class i have to use and in which way.

Upvotes: 1

Views: 2884

Answers (1)

Adriano Repetti
Adriano Repetti

Reputation: 67138

Simply use the MoveWindow() method of your CButton as:

m_btnDoSomething.MoveWindow(CRect(0, 0, 20, 20));

(the rectangle is in client coordinates)

Upvotes: 2

Related Questions