Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot make window visible by activation
#11
It may not have anything to do with the fact that the function I coded was being called by another function rather than a macro but the code does not seem to be able to execute "act w" and I have also seen a pointer error from the line "cloaked=(IsWindowCloaked(w))".

The code worked ok when called from a macro and not a function.

Here is the code for the function "actuncloak"

Macro Macro17
Code:
Copy      Help
/
function str'chart int'&cloaked

int w=win(chart)

out "activating and uncloaking"

;tryagain
0.01
act w
err
,out "cannot activate window in actuncloak"
,goto tryagain
,
if win<>w or win=0
,out "trying to activate window in actuncloak again"
,goto tryagain

cloaked=(IsWindowCloaked(w))
int active(win=w) visible(IsWindowVisible(w))
out "active=%i visible=%i cloaked=%i" active visible cloaked
if cloaked
,cloaked=0
,if(DwmSetWindowAttribute(w 13 &cloaked 4))
,,out _s.dllerror ;;Try to uncloak. Error: Access is denied..
,,ret

ret


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)