Click here to Skip to main content
15,914,109 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: App wants to know: Is cursor off me now? Pin
Mazdak3-Apr-02 1:47
Mazdak3-Apr-02 1:47 
GeneralRe: App wants to know: Is cursor off me now? Pin
Rickard Andersson203-Apr-02 1:50
Rickard Andersson203-Apr-02 1:50 
GeneralRe: App wants to know: Is cursor off me now? Pin
Mazdak3-Apr-02 1:55
Mazdak3-Apr-02 1:55 
GeneralRe: App wants to know: Is cursor off me now? Pin
alex.barylski3-Apr-02 3:13
alex.barylski3-Apr-02 3:13 
GeneralRe: App wants to know: Is cursor off me now? Pin
Jack Handy3-Apr-02 5:25
Jack Handy3-Apr-02 5:25 
GeneralOpenGL in MDI Apps under Windows 2000 Pin
v_krishnan3-Apr-02 0:56
v_krishnan3-Apr-02 0:56 
GeneralRefreshing View From Tree Selection Pin
3-Apr-02 0:42
suss3-Apr-02 0:42 
GeneralRe: Refreshing View From Tree Selection Pin
3-Apr-02 2:15
suss3-Apr-02 2:15 
To keep the doucument/View design pattern intact, always keep relevant data in your doc object, and then redraw your view through the existing mechanisms for this purpose. In your case it could be something like:
call the SelectTreeObject from your dialog:
public: CMyDocument::SelectTreeObject(CMyTreeData* pData)
{
m_pSelectedObject = pData;
UpdateAllViews(NULL, ID_SELECTION_CHANGED, pData);
}
CMyView::OnUpdate(CView *pView, UINT lHint, CObject *pHint)
{
if (lHint == ID_SELECTION_CHANGED)
{
// Do your stuff here, e.g. call Invalidate()
}
}
In your OnDraw() handler you could ask your doc object for the selected tree object. Don't forget to #define your ID_SELECTION_CHANGED to some value.
GeneralRe: Refreshing View From Tree Selection Pin
undeadhamster3-Apr-02 2:38
undeadhamster3-Apr-02 2:38 
GeneralDBGrid Pin
Drawil3-Apr-02 0:13
Drawil3-Apr-02 0:13 
GeneralExact Caret Position in the Rich Edit Control Pin
internal2-Apr-02 23:51
internal2-Apr-02 23:51 
GeneralRe: Exact Caret Position in the Rich Edit Control Pin
alex.barylski3-Apr-02 0:17
alex.barylski3-Apr-02 0:17 
General3D graphics question Pin
alex.barylski2-Apr-02 23:49
alex.barylski2-Apr-02 23:49 
GeneralRe: 3D graphics question Pin
Paul M Watt3-Apr-02 5:54
mentorPaul M Watt3-Apr-02 5:54 
GeneralNetwork Card packet Programm! Pin
Reza Azizi2-Apr-02 23:28
Reza Azizi2-Apr-02 23:28 
GeneralWorking with DDS images Pin
benjymous2-Apr-02 23:20
benjymous2-Apr-02 23:20 
GeneralCFSTR_* Pin
2-Apr-02 23:20
suss2-Apr-02 23:20 
GeneralGet HWND from HINSTANCE Pin
Tran Hoang Chuong2-Apr-02 23:15
Tran Hoang Chuong2-Apr-02 23:15 
GeneralRe: Get HWND from HINSTANCE Pin
alex.barylski2-Apr-02 23:25
alex.barylski2-Apr-02 23:25 
GeneralRe: Get HWND from HINSTANCE Pin
Tran Hoang Chuong2-Apr-02 23:59
Tran Hoang Chuong2-Apr-02 23:59 
GeneralRe: Get HWND from HINSTANCE Pin
alex.barylski3-Apr-02 0:09
alex.barylski3-Apr-02 0:09 
GeneralRe: Get HWND from HINSTANCE Pin
Tran Hoang Chuong3-Apr-02 14:01
Tran Hoang Chuong3-Apr-02 14:01 
GeneralRe: Get HWND from HINSTANCE Pin
alex.barylski6-Apr-02 1:20
alex.barylski6-Apr-02 1:20 
QuestionOwnerdraw with underlined text? Pin
2-Apr-02 22:58
suss2-Apr-02 22:58 
AnswerRe: Ownerdraw with underlined text? Pin
alex.barylski2-Apr-02 23:33
alex.barylski2-Apr-02 23:33 

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.