Click here to Skip to main content
15,920,801 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Trouble making a custom mfc control... Pin
Optimus Chaos22-May-07 20:29
Optimus Chaos22-May-07 20:29 
AnswerRe: Trouble making a custom mfc control... Pin
Mark Salsbery23-May-07 6:52
Mark Salsbery23-May-07 6:52 
Questiondll to lib Pin
llp00na22-May-07 11:37
llp00na22-May-07 11:37 
AnswerRe: dll to lib Pin
User 58385222-May-07 19:39
User 58385222-May-07 19:39 
GeneralRe: dll to lib Pin
llp00na23-May-07 1:56
llp00na23-May-07 1:56 
AnswerRe: dll to lib Pin
Mark Salsbery23-May-07 6:55
Mark Salsbery23-May-07 6:55 
QuestionAccessing the CView class from the CWinApp class? Pin
MasterShin22-May-07 11:03
MasterShin22-May-07 11:03 
AnswerRe: Accessing the CView class from the CWinApp class? Pin
Arman S.22-May-07 19:55
Arman S.22-May-07 19:55 
I understand that this happens because the CView class makes its own thread, and works in it, while the CWinApp is in another.

No. CView does not make its own thread. There is a single thread in a standard MFC application unless you specify your own threads. CWinApp makes the primary thread, so called UI thread and, particularly, CView object is created there.

Try the following code to access the view. Do not call this code before InitInstance method because InitInstace should have created the view (frame and doc as well) before any attept to use it [view].

CMyView *pView = (CMyView * ) ((CFrameWnd *)AfxGetMainWnd())->GetActiveView();


--
=====
Arman

QuestionBitmap sappear as different colors Pin
Reagan Conservative22-May-07 9:56
Reagan Conservative22-May-07 9:56 
QuestionRe: Bitmap sappear as different colors Pin
CPallini22-May-07 10:08
mveCPallini22-May-07 10:08 
AnswerRe: Bitmap sappear as different colors Pin
Reagan Conservative22-May-07 10:17
Reagan Conservative22-May-07 10:17 
QuestionRe: Bitmap sappear as different colors Pin
Mark Salsbery23-May-07 6:58
Mark Salsbery23-May-07 6:58 
AnswerRe: Bitmap sappear as different colors Pin
Reagan Conservative23-May-07 8:03
Reagan Conservative23-May-07 8:03 
GeneralRe: Bitmap sappear as different colors Pin
Mark Salsbery23-May-07 8:55
Mark Salsbery23-May-07 8:55 
GeneralRe: Bitmap sappear as different colors Pin
Reagan Conservative23-May-07 9:27
Reagan Conservative23-May-07 9:27 
GeneralRe: Bitmap sappear as different colors Pin
Mark Salsbery23-May-07 12:35
Mark Salsbery23-May-07 12:35 
GeneralRe: Bitmap sappear as different colors Pin
Reagan Conservative24-May-07 3:10
Reagan Conservative24-May-07 3:10 
GeneralRe: Bitmap sappear as different colors Pin
Mark Salsbery24-May-07 5:17
Mark Salsbery24-May-07 5:17 
GeneralRe: Bitmap sappear as different colors Pin
Reagan Conservative24-May-07 5:56
Reagan Conservative24-May-07 5:56 
QuestionRe: Bitmap sappear as different colors Pin
Mark Salsbery24-May-07 6:17
Mark Salsbery24-May-07 6:17 
AnswerRe: Bitmap sappear as different colors Pin
Reagan Conservative24-May-07 6:22
Reagan Conservative24-May-07 6:22 
GeneralRe: Bitmap sappear as different colors Pin
Mark Salsbery24-May-07 6:30
Mark Salsbery24-May-07 6:30 
GeneralRe: Bitmap sappear as different colors Pin
Reagan Conservative24-May-07 6:35
Reagan Conservative24-May-07 6:35 
QuestionVideo on OpenGL window, from image frames Pin
DoctorDoctor22-May-07 7:58
DoctorDoctor22-May-07 7:58 
QuestionWhy do DLLs get loaded... Pin
dontknowitall22-May-07 6:41
dontknowitall22-May-07 6:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.