hi... could anyone please help me with how to create buttons dynamically in vc++ 6.0 dailog based application

you are in the wrong section, this is a Visual Basic discussion group

sorry, i'll post in c++

it s on mfc

Here's how (link)

CButton* pButton = new CButton;
pButton->Create( /* add parameters here */ );
commented: Quick, useful, practical, informative posts. +5

can u say me how to do it on a win32 program

in case if i need to place 40 buttons on the dialog during run time what should i do...

make an array of HWND objects and call CreateWindow() 40 times. When one of the buttons is clicked windows will call your WinProc() function with the button's HWND.