Click here to Skip to main content
15,902,860 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: String Table bug? Pin
Joe Woodbury1-Jun-08 12:24
professionalJoe Woodbury1-Jun-08 12:24 
Questioncustom control Pin
subramanyeswari31-May-08 21:03
subramanyeswari31-May-08 21:03 
AnswerRe: custom control Pin
Rajkumar R1-Jun-08 0:26
Rajkumar R1-Jun-08 0:26 
GeneralRe: custom control Pin
subramanyeswari1-Jun-08 0:42
subramanyeswari1-Jun-08 0:42 
GeneralRe: custom control Pin
Rajkumar R1-Jun-08 2:20
Rajkumar R1-Jun-08 2:20 
QuestionProblem about shared list by MDI child views Pin
followait31-May-08 20:44
followait31-May-08 20:44 
AnswerRe: Problem about shared list by MDI child views Pin
Rajkumar R1-Jun-08 1:09
Rajkumar R1-Jun-08 1:09 
AnswerRe: Problem about shared list by MDI child views Pin
Nelek1-Jun-08 6:38
protectorNelek1-Jun-08 6:38 
followait wrote:
There are two problems, first assume there two opened document,


I guess you are using one Document with more than one View, and you are running two different instances of your application.

I made something similar once, I just got a CMyDoc* pointer declared in the StdAfx, then on the InitialUpdate in the first (main) view I made:

extern CMyDoc* myCommonDoc;
myCommonDoc = GetDocument ();


Afterwards everytime I wanted to use the document in all the other views I just had to use that pointer.
Advantage... when more than one App is running, everyone will have its own myCommonDoc so you will avoid the mixing from one on the other.


followait wrote:
when I switch from other application the this one, OnActiveView is called, and the grid is refilled unnecessarily.


I guess this is not going to be the best solution, but you can try to get the pDeactiveView and check into your document if it is one of the views associated with it, with the functions GetFirstViewPosition and GetNextView . If there is no match, it means that you are comming back from another application into this one and avoid the refilling.

Greetings.
--------
M.D.V. Wink | ;)

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.

QuestionTime Bomb in VS5.00 Pin
Bram van Kampen31-May-08 17:25
Bram van Kampen31-May-08 17:25 
AnswerRe: Time Bomb in VS5.00 Pin
Gary R. Wheeler1-Jun-08 1:05
Gary R. Wheeler1-Jun-08 1:05 
GeneralRe: Time Bomb in VS5.00 Pin
Bram van Kampen2-Jun-08 15:36
Bram van Kampen2-Jun-08 15:36 
QuestionUsing Help Workshop in MFC VS2008 Pin
Larry Mills Sr31-May-08 15:40
Larry Mills Sr31-May-08 15:40 
QuestionInstallShield and non English languages Pin
Joseph Marzbani31-May-08 9:31
Joseph Marzbani31-May-08 9:31 
Question[MFC] Split a form Pin
Schehaider_Aymen31-May-08 8:00
Schehaider_Aymen31-May-08 8:00 
AnswerRe: [MFC] Split a form Pin
Schehaider_Aymen31-May-08 10:25
Schehaider_Aymen31-May-08 10:25 
AnswerRe: [MFC] Split a form Pin
Nelek1-Jun-08 6:06
protectorNelek1-Jun-08 6:06 
GeneralRe: [MFC] Split a form Pin
Schehaider_Aymen1-Jun-08 13:14
Schehaider_Aymen1-Jun-08 13:14 
Questionnumeric keypads Pin
Tom Paronis31-May-08 6:24
Tom Paronis31-May-08 6:24 
QuestionHow to control data from edit box Pin
Trupti Mehta31-May-08 4:24
Trupti Mehta31-May-08 4:24 
AnswerRe: How to control data from edit box Pin
Schehaider_Aymen31-May-08 4:30
Schehaider_Aymen31-May-08 4:30 
GeneralRe: How to control data from edit box Pin
Jijo.Raj31-May-08 5:42
Jijo.Raj31-May-08 5:42 
GeneralRe: How to control data from edit box Pin
Schehaider_Aymen31-May-08 7:55
Schehaider_Aymen31-May-08 7:55 
JokeRe: How to control data from edit box Pin
Nelek1-Jun-08 6:03
protectorNelek1-Jun-08 6:03 
AnswerRe: How to control data from edit box Pin
Rajesh R Subramanian31-May-08 4:33
professionalRajesh R Subramanian31-May-08 4:33 
AnswerRe: How to control data from edit box Pin
Hamid_RT31-May-08 8:24
Hamid_RT31-May-08 8:24 

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.