How to make a window always appear on top of other windows? - mfc

In my dialog I have a rich edit control. While typing in the richeditcontrol, I am displaying a list box for auto completion.
I want to display the listbox on top of other windows but my listbox is not visible fully but it is forced to be inside of richedit control.
I want to implement like listbox in combobox which is always top of other windows.
How to display the listbox on top of other window?
I am displaying below styles.
DWORD nListStyle = WS_CLIPCHILDREN|WS_EX_TOPMOST|WS_CHILD |WS_VISIBLE|LBS_NOTIFY|WS_VSCROLL|WS_HSCROLL|WS_BORDER|
LBS_OWNERDRAWVARIABLE|LBS_HASSTRINGS| LBS_NOINTEGRALHEIGHT;
m_ctrlListBox.Create(nListStyle , listBoxRect, this,IDC_LIST);

Related

making Modaless dialog on top

I have application in which I will create multiple modalless dialogs, and I want the modaless dialog to be in top without making it top most in setwindowpos(), any alternate way??
I want to do this because , when I click on window the opened modaless dialog should exist as it is but focus will be on window, if I make top most it wil not allow to keep other windows on top

Put a window behind desktop icons

currently I've this but it doesn't put my window behind the desktop
SetWindowPos(hWnd,HWND_BOTTOM,0,0,SCREEN_WIDTH,SCREEN_HEIGHT,SWP_FRAMECHANGED);
ShowWindow(hWnd,SW_SHOWNOACTIVATE);
i want to put my window behind every window even the taskbar and desktop icons window
please help me how can i do this
thanks in advance
The Desktop is a ListView control, and the desktop icons are its list items. Top-level windows can be made children of that ListView window, but it is impossible to place a child window between the ListView's background and its list items. The only way to make anything appear behind the items is to draw directly on the ListView's background, such as by subclassing it to intercept its WM_ERASEBKGND and WM_PAINT messages.

MFC tooltip for list control of dialog box

I have developed on application, which shows a dialog box with two list controls.
In this list control, I am showing images. Now I want is, when we move the mouse on images from the list control of dialog box, It will show tool tip for that.
How can I show tool tips for images in a list control in a dialog box?
The CToolTipCtrl control is the MFC wrapper class around the Win32 "tool tip". You can use this to display a small pop-up window to describe another control or provide additional information in your app.
If you're using a ListBox control, explore one of these sample projects to see how to display tooltips for individual items displayed within that ListBox control:
ListBox With ToolTip Support
List Box With ToolTips
And if you're using a ListView control (CListCtrl in MFC), then you should start by reading the documentation for the GetToolTips function and the corresponding SetToolTips function. You can also check out how this sample ListView control implements tooltips:
CListCtrl and Displaying a Tooltip

Insert an UI into another MFC Dialog

I have one MFC application (exe) that contains two panes in its main UI. This application loads another DLL that also contains one dialog. How can I programatically place a Dialog defined into the DLL, and put it into (within) the pane of the MFC application? The question is not how to programatically retrieve the dialog from the DLL but how to put this dialog 'on the top' (within, inside) of one UI pane that belongs to the application?
My goal is to customize the UI of the application with dialog(s) retrieved from a dll and give the user the feeling that these dialogs all belong to one application UI. Thanks for any hint.
I have some applications with this feature, often with a tab control to alternate between windows.
First I set a frame in the container window, invisible to the user. The frame is just a placeholder to where the dialog window will be.
Then I make an instance of the dialog window as a global variable in the container class, I create the dialog window as a modeless window (using Create(), not DoModal()), move the window to the same RECT of the frame control, and call ShowWindow() to show the window.
Am I understanding you correctly that you don't want the dialogs to appear as dialogs, but rather as content of another window, or as a pane?
In other words, you want to get rid of the dialog's title bar and embed the dialog's content into another window, is that right?
That is possible. You would need to create the dialog without the title bar (change the window style) and make sure that you create the dialog's window as a childwindow of the window where you want the content to go. I can explain this further but I first would like to know if I'm understanding you correctly.

How do you have a window that has no icon in the tasktray?

I found the windows style WS_EX_TOOLWINDOW but this changes the title bar. Is there a way to not have the tasktray icon but keep the normal window titlebar?
You usually do want to do this if you have added an alternate means to restore the window - for example placing an icon in the notification tray.
The usual way of ensuring the taskbar does not display your window is to create it with a hidden parent window. Whenever a window has a parent, the parent window is used to create the button - hidden windows are not shown on the taskbar.
Also, WS_EX_APPWINDOW should be removed as that performs the opposite hint to the shell and forces the window onto the taskbar even if it would otherwise not have been shown.