Click here to Skip to main content
15,928,109 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Resizing windows Pin
dart1320-May-04 10:42
dart1320-May-04 10:42 
GeneralRe: Resizing windows Pin
Curi0us_George20-May-04 11:05
Curi0us_George20-May-04 11:05 
GeneralRe: Resizing windows Pin
Dimitris Vasiliadis24-May-04 11:27
Dimitris Vasiliadis24-May-04 11:27 
Generalreading window messages Pin
Anonymous20-May-04 9:25
Anonymous20-May-04 9:25 
GeneralRe: reading window messages Pin
vladfein20-May-04 14:40
vladfein20-May-04 14:40 
GeneralRe: reading window messages Pin
Anonymous21-May-04 5:26
Anonymous21-May-04 5:26 
Generalstarting with MFC adding stuff to the MainFrame Pin
kfaday20-May-04 9:22
kfaday20-May-04 9:22 
GeneralRe: starting with MFC adding stuff to the MainFrame Pin
Antti Keskinen20-May-04 11:19
Antti Keskinen20-May-04 11:19 
If you want to add the scroll bar into the listbox, just specify 'WS_VSCROLL' for a vertical (up-down) scrollbar and 'WS_HSCROLL' for a horizontal (left-right) scrollbar to the style flags of the listbox (WS_CHILD, WS_VISIBLE, WS_BORDER). Using the list-box style flag 'LBS_DISABLENOSCROLL' will prevent the scrollbars from being hidden when there are less than the required amount of items in the box for the scrollbar to appear normally. By default, the scrollbar is hidden if there are not enough many items.

If you desire the scrollbars for the frame window, you need to step into a function called 'PreCreateWindow'. If this function does not exist for your CFrameWnd-derived class, you can use ClassWizard to add it. Then use boolean-OR operation '|' to add style flags into the CREATESTRUCT structure's 'style' member. For example:
BOOL PreCreateWindow( CREATESTRUCT cs )
{
    cs.style =| WS_HSCROLL | WS_VSCROLL;

    ...
}
This would add the scrollbars to your frame window. Hope these tips will help you out.

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: starting with MFC adding stuff to the MainFrame Pin
kfaday21-May-04 1:59
kfaday21-May-04 1:59 
GeneralWindows/Unix (platform independence) code Pin
Mash20-May-04 8:39
Mash20-May-04 8:39 
GeneralRe: Windows/Unix (platform independence) code Pin
Giles20-May-04 8:58
Giles20-May-04 8:58 
GeneralRe: Windows/Unix (platform independence) code Pin
Mash20-May-04 9:48
Mash20-May-04 9:48 
GeneralRe: Windows/Unix (platform independence) code Pin
Curi0us_George20-May-04 10:17
Curi0us_George20-May-04 10:17 
GeneralRe: Windows/Unix (platform independence) code Pin
Henry miller21-May-04 2:34
Henry miller21-May-04 2:34 
Generalimage pixels Pin
deniz79s20-May-04 8:37
deniz79s20-May-04 8:37 
GeneralRe: image pixels Pin
Member 42102521-May-04 11:52
Member 42102521-May-04 11:52 
GeneralVStudio; Property Wnd Pin
kylur20-May-04 8:15
kylur20-May-04 8:15 
GeneralRe: VStudio; Property Wnd Pin
Antti Keskinen20-May-04 11:22
Antti Keskinen20-May-04 11:22 
Generalsetting the size of a CFrameWnd Pin
kfaday20-May-04 8:05
kfaday20-May-04 8:05 
GeneralRe: setting the size of a CFrameWnd Pin
kylur20-May-04 8:21
kylur20-May-04 8:21 
GeneralRe: setting the size of a CFrameWnd Pin
oleg6320-May-04 8:24
professionaloleg6320-May-04 8:24 
GeneralRe: setting the size of a CFrameWnd Pin
kfaday20-May-04 8:32
kfaday20-May-04 8:32 
GeneralSetting the delay time for ToolTips control Pin
Cyrus Dang20-May-04 6:58
Cyrus Dang20-May-04 6:58 
GeneralCListBox problem... Pin
Mirelutza20-May-04 6:43
Mirelutza20-May-04 6:43 
GeneralRe: CListBox problem... Pin
David Crow20-May-04 9:20
David Crow20-May-04 9: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.