Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Can controls be created at run time using create for a form view rather than using placing them on template?
Does the form class have an HWND data member that can be specified as the parent of the control created at run time?

If yes can the function movewindow be used on such control.
Posted
Comments
nv3 9-Feb-14 17:35pm    
Yes, yes, and yes.
Gbenbam 9-Feb-14 17:44pm    
Please one last question.Will the control created at run time be scrollable across the form?
Gbenbam 9-Feb-14 17:47pm    
I ask this because I understand that the form created using CFormView are scrollable.
nv3 10-Feb-14 4:23am    
There is no difference between controls that have been created by the template mechanism and controls that have been created dynamically. From the viewpoint of the operating system they are all the same controls and don't behave differently.
Gbenbam 10-Feb-14 4:44am    
Thanks a billion times.

You can use the CreateWindow API to create a window, dialog and controls.
Every thing is a window in Windows, unlike other OSs.
I've done just that in this article - Mousey! Roll Over and Park[^]

The article doesn't use MFC, but the same can be done using the CWnd::Create method, which the CFormView class indirectly inherits.
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



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