Many thx Fib and Elysia. This is what I've did. I've 'duplicate' aboutbox resource and Ive build a class as this.
Code:
class CSecondWindow : public CDialog
{
public:
CSecondWindow();
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX1 };
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public:
// afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
public:
afx_msg void OnChildActivate();
};
#endif
In the main class of my application I have:
Code:
CSecondWindow m_new_window1, m_new_window2....m_new_window5;
and on a button click I have
Code:
m_new_window1.Create(IDD_ABOUTBOX1, this);
m_new_window1.SetWindowTextA("one");
....
m_new_window5.Create(IDD_ABOUTBOX1, this);
m_new_window5.SetWindowTextA("five");
Scenario:
When a user use alt+shift or click in order to chose between one of the generated windows, how can I know which window has the focus?