thank you all for helping me... I finaly got the some of a b.... to work hehehe here is what i did to get it working for all those people who mite get stuck on this and are new like me. CFrameWnd* pFrame=(CFrameWnd*)AfxGetMainWnd(); CTestView *p = (CTestView *)pFrame->GetActiveView(); p->LoadImages(str);
and this get the current CFormView window and everything works..... thanks all guys....for all your help ;);):):):):) E3
E3
Posts
-
Need help with pointer in View -
Need help with pointer in ViewIt's ok thanks for trying :) in my program the is no GetActiveView() i keep getting an error. maybe i'm putting this in the wrong way this is what i have CTestView * pView= (CTestView*)AfxGetMainWnd(); and lets say i want to call and function or an object like this pView->m_cThumbFrame.Add("picture.bmp"); but this dosen't work :(:((:((:((
-
Need help with pointer in ViewNo that dosen't work :(:((:((:(
-
Need help with pointer in Viewhello everybody I need some help with declering an pointer to my clss my class of CFromView in there i have a function class LoadImages
class CTestView : public CFormView
and i have a different class and object some where else and i want to point to this class where i double click my control and load my imagesCTestView *pView = (CTestView *)((CFormView *)AfxGetApp()->m_pMainWnd)->GetActiveWindow();
I new at this MFC Visual C++ program can any one please help me thanks........... -
Loading .LIB file and .DLL into MFC App.What i mean i create the wrapper for the DLL file I do have the code for that DLL file and the code is writin in C/Win32. Now i want to use this code in the MFC app with the MDI style so where CView it would display that object. Now i think think this is how i load the dll at run time HINSTANCE m_hInstDLL; if ((m_hInstDLL = LoadLibrary("name.dll")) == NULL) { return FALSE; // Failed to load the localized resources. } else { AfxSetResourceHandle(m_hInstDLL); // Get resources from the DLL. } Now after loading the DLL how do i use these function for the DLL? what else to i have to declare that where the wrapper come in. I want to have a class that controls all this functions. where abouts do i start. I hope you known what i'm trying to say. Then main think is that i want to display the control in CView window or is it called CDocument window...but you known what i'm taking about here. Thanks for the help Matt
-
Loading .LIB file and .DLL into MFC App.Hi, Dose any body known how to load .DLL file into your project that have .LIB file also and creating an warpper for that file???
-
Changing Colour in CDocumentHi all, Dose any body known how to change the color of mydoc in MDI program. I have created an Rich Text Control in the Mydoc and i set the rect to 40 pixals in so their is a space between the start of the my doc and i want to colour in that because it white and i want gray colour i trying to make it look like Visual C++ the code window so i could have line count beside the richtext box or do i have to do something different? I new at this Visaul C++ so could any body please send me on the right track. thanks an lot :)
-
Creating Line Count for CRich Edit ControlCan any body help me i'm try to create in CDocument view an Rich edit control that will that will allow me have a line count on the side when the user type any thing into the edit. Also beside the CRichEdit I want the color to be gray and white for CRichedit. SO i kind of looks like Visual Studio Editor or any coding editor. Can anybody help me to get this going. Thanks alot. :)