10-26-2015 04:00 AM
Hi,
I want to create a window that behaves exactly like the "functions palette window" in Labview:
- opens like a floating window
- the window has no title bar
- user can interact (click, type) with controls in the window
- the window doesn't take "active status" (focus) from the caller window - the title bar of the caller window must be "active" and not grey out as it is normally if another windows is opened on top of the caller
I've been searching for the solution, but was not able to found it.
10-26-2015 04:47 AM
I'm not sure if that last part is possible because of how LV manages its windows. I don't remember all the details, but you could try looking for this discussion from a few years back - http://forums.ni.com/t5/LabVIEW/Win-API-WS-EX-NOACTIVATE-Window-Style-Problem/m-p/1058974#M470220
10-26-2015 07:26 AM
Based on the discussion (http://forums.ni.com/t5/LabVIEW/Win-API-WS-EX-NOAC
Or maybe has something changed in the last years?
10-26-2015 04:07 PM
> - user can interact (click, type) with controls in the window
Only the active window gets the type message.
You can't type into this window if it's not active.
10-27-2015 01:01 AM
This is not completely true, well it looks that for LV it is.
With Window Style WS_EX_NOACTIVATE (https://msdn.microsoft.com/en-us/library/windows/desktop/ff700543(v=vs.85).aspx) you can create a window that is not active, but can catch mouse and keyboard events. Examples of such windows are LV Functions Palette and on-screen keyboard.
10-27-2015 10:50 AM
That's common sense for Window programmers.
LabVIEW front panel is just another window, nothing more, nothing less.
You can make a window has WS_EX_NOACTIVATE style, you won't be able to type in it afterword.
You can try this on Notepad.
Both LV function Palette, and on-screen keyboard work with click. NO typping.
You can click on a window even it has WS_EX_NOACTIVATE style.