I would like to better understand the way to use CDocument class with multi-view application.

The thing I have difficulty to understand is what pointer is retrive by the GetDocument function in the view object. I don't know where I can initialise the data un my CDocument object before creating my view. My Data are not save in a serialize document. The only data I would like to put in the CDocument object are things about a SQL request.

I thing these lines of code associate the dynamic class View and document together.
Code:
CMultiDocTemplate* pDocTemplate;
	pDocTemplate = new CMultiDocTemplate(
		IDR_MDIWITTYPE,
		RUNTIME_CLASS(CMDIWithDOCDoc),
		RUNTIME_CLASS(CChildFrame), // custom MDI child frame
		RUNTIME_CLASS(CMDIWithDOCView));
	AddDocTemplate(pDocTemplate);
But after that where is the object to store data?

Thank you