2 // It it works contact Paul DiLascia
3 // if not you're own your own
5 #ifndef __WINDOWPLACEMENT_H__
6 #define __WINDOWPLACEMENT_H__
8 // CWindowPlacement reads and writes WINDOWPLACEMENT
9 // Helper for restoring the app size and placement.
10 class CTRL_EXT_CLASS CWindowPlacement : public WINDOWPLACEMENT {
15 // Read/write to app profile
16 BOOL GetProfileWP(LPCTSTR lpKeyName);
17 void WriteProfileWP(LPCTSTR lpKeyName);
19 // Save/restore window pos (from app profile)
20 void Save(LPCTSTR lpKeyName, CWnd* pWnd);
21 BOOL Restore(LPCTSTR lpKeyName, CWnd* pWnd);
23 // Save/restore from archive
24 friend CArchive& operator<<(CArchive& ar, const CWindowPlacement& wp);
25 friend CArchive& operator>>(CArchive& ar, CWindowPlacement& wp);