Skip to main content
GameDev.net gamedev.net
🔒 Locked

A problem about MFC...

Started by zhang_zhou Dec 2, 2000 at 7:46 AM 0 replies 200+ views
Original Post
zhang_zhou
zhang_zhou
Hey,HOW CAN I DO?? Boys! Basically,my prob is as the following... Now,I am about to make an interface for one my program using VC+MFC,the interface will be: 1)SDI(Single Document Interface); 2)Windows Explorer style,that is,the left side of the view (client) on the main window is a List View control,where will show some items,and the right side is a common window,where will show the related description(figure and text) of one item selected by the user on the right side.If I do it use a SplitterWnd class to split the view as two view,one is a list view (CListView),and the other is a common CView,I think I will not post the post ever ,but I cannot use the way,because I use it,it will be a ugly split-bar in the view,as you known,I cannot hide and fixup(don''t let the users to move it)it,therefore,I have to do it with the other way...think,think,...later,I have a thought--why not create a CListCtrl object on the right side of the view and create a common CWnd object on the left side of the view by hand while the program is runing? well,do it! so...
-------------------------------------------------------
  //within the CMyAppView class in the MyAappView.h
  CListCtrl  m_ListCtrl;  
  
  //within the initialize function of the CMyAppView class in the MyAppView.cpp
  CRect rc;
  GetClientRect(&rc);
  RECT rect={50,0,rc.Width()-50,rc.Height()};

   m_ListCtrl.Create (WS_CHILD|WS_VISIBLE|WS_BORDER|LVS_REPORT,rect,this,0X29);
  m_ListCtrl.ShowWindow(WS_VISIBLE);
  m_ListCtrl.UpdateWindow();
 //fill the list control some stuff here 
//...
------------------------------------------------------- 
 
and then compile and link the program...ok,no error! but,but,while I run it--oh,my god--nothing appeared on the view of the main window--cannot show the list control!! Dear friends,what wrong on the above program? and can I use the way to do it? if no,can you tell me else? REMEMBER,I cannot use the CSplitterWnd class,unless you can tell me the way to hide and fixup the splitter-bar! Help! help!!...
============================= Hey,I just wanna know WHY! =============================

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.