Rolando
3rd September 2005 21:48 UTC
Set Focus on title and subtitle
I tried searching the wiki for this and only found a function that can set focus on a custom page control. However, what I'm trying to do is set the focus on the installer's top title and subtitle. My guess is it can be done using the System plugin but I don't know how to do it. Can anyone help ?
iceman_k
3rd September 2005 22:34 UTC
I don't think a label control can grab focus anyway?
Rolando
3rd September 2005 22:43 UTC
Originally posted by iceman_k
I don't think a label control can grab focus anyway?
sure it can
iceman_k
4th September 2005 15:45 UTC
That's not what Microsoft says:
Although static controls are child windows, they cannot be selected. Therefore, they cannot receive the keyboard focus and cannot have a keyboard interface.
Rolando
4th September 2005 17:19 UTC
:| could there be a difference between keyfocus and mousefocus ? because if 2 simple lines in VB can do it, I doubt it can't be done. I'm not trying to select it by having the user press the "Tab" button. I just want to set focus on it so that it appears OVER a control which is placed above it by default. Anyway, it's not that important so I might as well drop this topic.
Afrow UK
4th September 2005 18:00 UTC
Then you want to change the Z-order not focus.
You can call SetWindowPos to do this with the System plugin.
-Stu
Rolando
4th September 2005 18:14 UTC
Well here's what I was able to find it...
System::Call "${sysSetWindowPos} (parameters)"
and as I saw on msdn, I probably need to use HWND_TOP or HWND_TOPMOST as the second paramter... However, I don't know how to obtain the control id or how the rest of the paramters should be. Can you assist me with that please ?
iceman_k
4th September 2005 18:30 UTC
What control is being created over the page title/subtitle?
This should not happen.
Anyway, the best way for you to find the control handles will be to look at the Modern UI macro MUI_HEADER_TEXT which sets the values of the title and subtitle.
Rolando
4th September 2005 18:47 UTC
it's actually the header image, because I added NO_RESIZE and the title/subtitle appear above the image just fine for all pages except the first one.