-
December 9th, 2008, 06:41 AM
#1
Creating topmost control on cdialog
Hi
I'm creating my own control. I dynamically creating CListBox over the other controls - it's my combo list control. My problem is that controls from behind my CListBox (eg. CEdit controls) getting to front. It disturbs everything. I tried to use myList.SetWindowPos( &CWnd::wndTopMost, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE ) - but it's not working. Is there any way to make control topmost (something like modal dialog) over other controls. Plaese help...
http://img529.imageshack.us/my.php?image=erroryt3.gif
Last edited by aragornx; December 9th, 2008 at 08:25 AM.
-
December 9th, 2008, 10:52 AM
#2
Re: Creating topmost control on cdialog
use this may help you :
Code:
CListCtrl myList;
myList.BringWindowToTop();
-
December 10th, 2008, 03:13 AM
#3
Re: Creating topmost control on cdialog
if you are going to use SetWindowPos, then use wndTop NOT wndTopMost.
-
August 10th, 2010, 04:39 AM
#4
Re: Creating topmost control on cdialog
My problem still exist. Above solutions didnt'work. I tried with
Code:
lista.CreateEx( WS_EX_TOPMOST | WS_EX_TOOLWINDOW | WS_EX_STATICEDGE, _T("LISTBOX"), NULL, WS_CHILD | LBS_STANDARD | WS_HSCROLL | WS_VISIBLE, listRect, parentWindow,IDC_UNIT_LISTBOX );
But it doesn't work too. I solve the problem using modal frame with my listbox - but I don't like such a workaround. Maybe someone's got the answer ?
-
August 10th, 2010, 07:14 AM
#5
Re: Creating topmost control on cdialog
How about hiding the other windows while you're displaying your list box?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|