Click here to Skip to main content
15,885,032 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hi,
I want to add Picture control Programmatically.Can any one suggest how to do it.Meanwhile I will also search.

I am using following code for creating static control in MFC Dialog.

CStatic * myStatic = new CStatic;<br /><br />myStatic->Create( _T("my static"), WS_CHILD|WS_VISIBLE|SS_CENTER, CRect(0,0,150,15), NULL );<br /><br />delete myStatic;


But I am unable to creat it.
Posted

1 solution

Try using this piece of code.

<br /><br />CStatic * myStatic = new CStatic;<br /><br />myStatic->Create(_T("my static"), WS_CHILD|WS_VISIBLE|SS_CENTER, <br />   CRect(10,10,150,50), this,1);<br /><br /><br />
 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900