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

C / C++ / MFC

 
GeneralRe: How do I deploy riched20.dll? Pin
Jack Handy28-Apr-02 10:22
Jack Handy28-Apr-02 10:22 
GeneralRe: How do I deploy riched20.dll? Pin
Tom Archer28-Apr-02 10:25
Tom Archer28-Apr-02 10:25 
GeneralRestoring View Size in Split Views :: MFC Pin
valikac27-Apr-02 12:49
valikac27-Apr-02 12:49 
GeneralRe: Restoring View Size in Split Views :: MFC Pin
Swinefeaster30-Apr-02 1:20
Swinefeaster30-Apr-02 1:20 
GeneralRe: Restoring View Size in Split Views :: MFC Pin
valikac30-Apr-02 4:12
valikac30-Apr-02 4:12 
GeneralRe: Placing SetColumnInfo() Pin
valikac30-Apr-02 19:52
valikac30-Apr-02 19:52 
GeneralRe: Placing SetColumnInfo() Pin
Swinefeaster30-Apr-02 19:58
Swinefeaster30-Apr-02 19:58 
GeneralRe: Restoring View Size in Split Views :: MFC Pin
valikac2-May-02 4:48
valikac2-May-02 4:48 
Here is the solution in RestoreWindowState() functon.

A special thanks to members of CodeGuru and CodeProject for responding about function SetColumnInfo() and RecalcLayout().

-----
bool CMainFrame::RestoreWindowState()
{
m_bVeriReturn = false;
CString version = _T("1.0");

WINDOWPLACEMENT wp;
wp.length = sizeof(WINDOWPLACEMENT);
GetWindowPlacement(&wp);

if (((wp.flags = theApp.GetProfileInt(version, _T("flag"), -1)) != -1) &&
((wp.showCmd = theApp.GetProfileInt(version, _T("command"), -1)) != -1) &&
((wp.rcNormalPosition.bottom = theApp.GetProfileInt(version, _T("bottom"), -1)) != -1) &&
((wp.rcNormalPosition.left = theApp.GetProfileInt(version, _T("left"), -1)) != -1) &&
((wp.rcNormalPosition.right = theApp.GetProfileInt(version, _T("right"), -1)) != -1) &&
((wp.rcNormalPosition.top = theApp.GetProfileInt(version, _T("top"), -1)) != -1))
{
wp.rcNormalPosition.left = min(wp.rcNormalPosition.left,
::GetSystemMetrics(SM_CXSCREEN) - ::GetSystemMetrics(SM_CXICON));
wp.rcNormalPosition.top = min(wp.rcNormalPosition.top,
::GetSystemMetrics(SM_CYSCREEN) - ::GetSystemMetrics(SM_CYICON));
SetWindowPlacement(&wp);

m_nSplitSize = theApp.GetProfileInt(version, _T("topsplit"), 300);
m_wndSplitter.SetRowInfo(0, m_nSplitSize, 10);
m_wndSplitter.RecalcLayout();

m_bVeriReturn = true;
}

return m_bVeriReturn;
}
-----

Kuphryn
GeneralAccess Violations Pin
Jack Handy27-Apr-02 12:02
Jack Handy27-Apr-02 12:02 
GeneralRe: Access Violations Pin
Tom Archer27-Apr-02 12:09
Tom Archer27-Apr-02 12:09 
GeneralRe: Access Violations Pin
Jack Handy27-Apr-02 12:21
Jack Handy27-Apr-02 12:21 
GeneralRe: Access Violations Pin
Tom Archer27-Apr-02 12:29
Tom Archer27-Apr-02 12:29 
GeneralRe: Access Violations Pin
Neville Franks27-Apr-02 12:35
Neville Franks27-Apr-02 12:35 
GeneralRe: Access Violations Pin
Jack Handy27-Apr-02 16:14
Jack Handy27-Apr-02 16:14 
GeneralRe: Access Violations Pin
Ravi Bhavnani27-Apr-02 12:41
professionalRavi Bhavnani27-Apr-02 12:41 
GeneralRe: Access Violations Pin
Jack Handy27-Apr-02 16:14
Jack Handy27-Apr-02 16:14 
GeneralRe: Access Violations Pin
Neville Franks27-Apr-02 16:20
Neville Franks27-Apr-02 16:20 
GeneralRe: Access Violations Pin
Jack Handy27-Apr-02 16:25
Jack Handy27-Apr-02 16:25 
GeneralRe: Access Violations Pin
Neville Franks27-Apr-02 17:04
Neville Franks27-Apr-02 17:04 
GeneralRe: Access Violations Pin
Ravi Bhavnani27-Apr-02 17:20
professionalRavi Bhavnani27-Apr-02 17:20 
GeneralRe: Access Violations Pin
Tom Archer28-Apr-02 0:49
Tom Archer28-Apr-02 0:49 
GeneralRe: Access Violations Pin
Roger Allen28-Apr-02 6:14
Roger Allen28-Apr-02 6:14 
GeneralManaged C++ books Pin
Michael P Butler27-Apr-02 11:21
Michael P Butler27-Apr-02 11:21 
GeneralRe: Managed C++ books Pin
Tom Archer27-Apr-02 11:57
Tom Archer27-Apr-02 11:57 
GeneralRe: Managed C++ books Pin
Nish Nishant27-Apr-02 14:55
sitebuilderNish Nishant27-Apr-02 14:55 

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.