FullScrean listbox
-
Hello, Doe's anyone know how can I make a FullScrean listbox. I need to have the option that the list box will be somtimes at fullscrean and somtimes at regular mode. thanks in advence
Resize the ListBox using MoveWindow API while changing from full screen to regular mode and vice versa.
-
Hello, Doe's anyone know how can I make a FullScrean listbox. I need to have the option that the list box will be somtimes at fullscrean and somtimes at regular mode. thanks in advence
All you have to do is SetWindowPos[^] and use some kind of accelerator key combination to switch back and forth. You might have to handle WM_MINMAXINFO[^] to allow the control to be larger than the actual screen if you want to hide borders. Alternatively, you could modify the window style to achieve the same. The GetSystemMetrics[^] API will give you the size of the screen using the SM_CXFULLSCREEN and SM_CYFULLSCREEN parameters. Disclaimer: there might be another way get the screen size to support multiple monitor systems.
-
Resize the ListBox using MoveWindow API while changing from full screen to regular mode and vice versa.
-
All you have to do is SetWindowPos[^] and use some kind of accelerator key combination to switch back and forth. You might have to handle WM_MINMAXINFO[^] to allow the control to be larger than the actual screen if you want to hide borders. Alternatively, you could modify the window style to achieve the same. The GetSystemMetrics[^] API will give you the size of the screen using the SM_CXFULLSCREEN and SM_CYFULLSCREEN parameters. Disclaimer: there might be another way get the screen size to support multiple monitor systems.
-
Adding to the Niklas Lindquist suggestions in the below post GetClientRect API helps to obtain the client area of the Window. Get the parent window's client area and resize listbox according to it or the way you want.
-
thank you, I tried it but I can't get the handle to the window i.e. the first parameter of GetSystemMetrics is CWnd* and I don't know how to get it. can you please help me with this?
-
GetSystemMetrics has only one parameter which is an int.
GetSystemMetrics(SM_CXFULLSCREEN)
andGetSystemMetrics(SM_CYFULLSCREEN)
should work. Which version of the API accepts a CWnd*? -
I insert this on the constructor of the dialog: int x=GetSystemMetrics(SM_CXFULLSCREEN); int y=GetSystemMetrics(SM_CYFULLSCREEN); SetWindowPos(NULL,0,0,x,y,SWP_NOZORDER ); and its give me Debug Assertion Failed. do you know what can be the resone? thanks again
-
I insert this on the constructor of the dialog: int x=GetSystemMetrics(SM_CXFULLSCREEN); int y=GetSystemMetrics(SM_CYFULLSCREEN); SetWindowPos(NULL,0,0,x,y,SWP_NOZORDER ); and its give me Debug Assertion Failed. do you know what can be the resone? thanks again
-
Hello, Doe's anyone know how can I make a FullScrean listbox. I need to have the option that the list box will be somtimes at fullscrean and somtimes at regular mode. thanks in advence
For some reason I read the mis-spelling as FillScreaM, and I thought the OP wanted something to get immediate attention!
-
In your constructor the underlying window has not yet been created, and that's why the call fails. Put it in your OnInitDialog handler instead.