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

C / C++ / MFC

 
GeneralRe: How do I deploy riched20.dll? Pin
Jack Handy28-Apr-02 1:01
Jack Handy28-Apr-02 1:01 
GeneralRe: How do I deploy riched20.dll? Pin
Tim Smith28-Apr-02 3:22
Tim Smith28-Apr-02 3:22 
GeneralRe: How do I deploy riched20.dll? Pin
Tom Archer28-Apr-02 4:00
Tom Archer28-Apr-02 4:00 
GeneralRe: How do I deploy riched20.dll? Pin
Tom Archer28-Apr-02 4:25
Tom Archer28-Apr-02 4:25 
GeneralRe: How do I deploy riched20.dll? Pin
Tom Archer28-Apr-02 3:58
Tom Archer28-Apr-02 3:58 
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 
Hello.

I have having trouble getting a program to restore the the location of the splitter bar in a program with splitter views (two).

Here is the code in main.

-----
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
CString version = _T("1.0");

if (!m_wndSplitter.CreateStatic(this, 2, 1) ||
!m_wndSplitter.CreateView(1, 0, RUNTIME_CLASS(CView2),
CSize(0, 0), pContext) ||
!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CView1),
CSize(0, MyApp.GetProfileInt(version, _T("Size"), 300)), pContext))
return FALSE;

return TRUE;
}

The progres saves the size of the window in the register. Everything looks okay and function well except for the splitter. Here is the program design.

- program first starts with default View1 at height 300 (Note: I created view2 first for UpdateAllViews() to work right similar what Prosise presents in his book).

- progres restores size of view1 via code above.

Again, I cannot see a flaw in the code unless there is a flaw somewhere in the design. I implement the same code Prosise presents in his book to return windows size and location. Here is the code that does that.

-----
if (!(reinterpret_cast<cmainframe *="">(m_pMainWnd))->RestoreWindowState())
m_pMainWnd->ShowWindow(m_nCmdShow);
-----

Is it possible that this code and the one to restore size of view1 are conflicting?

Again, I am open to all interpretations and if you have a better technique please show.

Thanks,
Kuphryn
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 
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 

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.