| View previous topic :: View next topic |
| Author |
Message |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Mon Jun 09, 2014 5:14 am Post subject: Always Active Window? |
|
|
Back working on my appbar program again. Does anyone know if there's a way to make my window always active even if the user is using another window? I don't want to take the focus away from any other programs, I just don't want my menu texts to go gray when my appbar loses focus.
Thanks in advance,
~Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1752 Location: Space and Time
|
Posted: Mon Jun 09, 2014 4:40 pm Post subject: |
|
|
I think I may have something. I'll take a look and get back to you. If you don't hear from me within a day post another message to remind me. _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1752 Location: Space and Time
|
Posted: Mon Jun 09, 2014 5:16 pm Post subject: |
|
|
Give this a try. The dialog need to be set to always ontop
| Code: |
#define command,addstyleex
|
| Code: |
#get id of window
%%id = @winexists(#OSK)
# make sure the dialog window is always ontop and this should work
%%ws_ex_noactivate = $08000000
addstyleex %%id,%%WS_EX_NOACTIVATE
|
| Code: |
:AddStyleEx
%%wndstyleex = @lib(user32,GetWindowLongA,INT,INT:@strdel(%1,1,1),INT:-20)
%%newwndstyleex = @sum(%2,%%WndStyleEx)
%a = @lib(user32,SetWindowLongA,INT,INT:@strdel(%1,1,1),INT:-20,INT:%%NewWndStyleEx)
exit
|
_________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Tue Jun 10, 2014 1:57 am Post subject: |
|
|
No errors on the code, but did not achieve the desired effect.
Here's what worked in another language I tried: DS_SETFOREGROUND
Now I don't know if that's an API reference or an internal reference for the language I was checking out, but it worked as in intended in the other language.
I'm trying to avoid using the other language simply because it's more complex to make a program with than VDS. And I also have all the code work done for the program I'm making in VDS, it simply is missing this one feature/function.
Thanks a bunch,
~Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
cnodnarb Professional Member


Joined: 11 Sep 2002 Posts: 765 Location: Eastman, GA
|
Posted: Tue Jun 10, 2014 4:35 pm Post subject: |
|
|
0x00000200 is DS_SETFOREGROUND
My code might be off here, but maybe?
| Code: |
%%DS_SETFOREGROUND = $0000200
|
THE PROBLEM IS this is not set window, this is only used in CreateWindow and CreateWindowEx |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Fri Jun 13, 2014 12:24 am Post subject: |
|
|
After some poking around.. You are correct and there's not a thing we can do on this one since it has to be applied at the dialog creation.  _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
|