CreateEx(0, NULL, NULL, WS_POPUP|WS_VISIBLE, CRect(pt,CSize(0,0)),
pParentWnd, nID);
CRect Rect2(10,85,80,110);
m_Close.Create("Close",WS_CHILD|WS_VISIBLE|BS_CENTER |BS_NOTIFY
,Rect2,this,IDC_CLOSE); // button
CRect Rect(120,85,190,110);
m_Open.Create("Open",WS_CHILD|WS_VISIBLE|BS_CENTER |BS_NOTIFY
,Rect,this,IDC_OPEN); // button
when i click one of the two button i send message with this code
TBNOTIFY mm;
mm.hdr.code = NM_CLICK;
mm.hdr.hwndFrom = m_hWnd;
mm.hdr.idFrom = GetDlgCtrlID();
mm.iItem = 2;
mm.cchText = 5;
mm.pszText = "Close";
SendMessage(WM_NOTIFY, mm.hdr.idFrom, (LPARAM)&mm)
Where the owner windows get the message with this function.
OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
I used the formview to be the owner but I found that if I open a new dialog
with do modal() the first dialog will be disabled
Can I use sendmessage to mainframe and how can I do it or how can I modify
the dialog to be usable in all the program and in the first lave always
thanks
"mido1971" <mido...@discussions.microsoft.com> wrote in message
news:874EF731-C164-4F1B...@microsoft.com...
"mido1971" <mido...@discussions.microsoft.com> wrote in message
news:620DFD58-D8DE-47ED...@microsoft.com...
i think CWnd* pOwner= AfxGetMainWnd(); instead of CWnd* pOwner=GetOwner( );
where the ownre in this casa is the main frame
but i dont know if its corect or not