Page 1 of 1

Rebar dropdown with loading icon

Posted: Tue Feb 16, 2016 12:17 am
by bbanelli
Greetings to all,

I am aware that this search box is part of the rebar class, but is this entirely custom drawn part of Windows UI or can it be accessed somehow through API?

Image

I'm refering to "computing filters" part with rotating "loading" circle. It also contains "x" as a button.

Thanks in advance for any hints!

With my very best,

Bruno

Re: Rebar dropdown with loading icon

Posted: Tue Feb 16, 2016 9:22 am
by RSBasic
Would you like to have only the animate icon?
http://purebasic.fr/german/viewtopic.php?f=8&t=24780
(tested in Windows 7)

\\Edit:
Or you can import this png image from imageres.dll:
Image

Re: Rebar dropdown with loading icon

Posted: Tue Feb 16, 2016 1:21 pm
by bbanelli
RSBasic wrote:Would you like to have only the animate icon?
Hi RSBasic,

thank you very much! This is exactly what I was searching for, everything else will be easy after that! :)

BTW, any reason why it isn't working in Windows 7+? Works great on XP, though...

With my very best,

Bruno

Re: Rebar dropdown with loading icon

Posted: Tue Feb 16, 2016 8:21 pm
by RSBasic
If file "bthprops.cpl" exists:

Code: Select all

EnableExplicit

Define EventID
Define hanim
Define hshell

hshell = LoadLibrary_("bthprops.cpl")

If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  hanim = CreateWindowEx_(0, "SysAnimate32", "", #ACS_AUTOPLAY | #ACS_CENTER | #ACS_TRANSPARENT | #WS_CHILD | #WS_VISIBLE | #WS_CLIPCHILDREN | #WS_CLIPSIBLINGS, 10, 10, 280, 100, WindowID(0), 0, GetModuleHandle_(0), 0)
 
  SendMessage_(hanim, #ACM_OPEN, hshell, 140)
 
  Repeat
    EventID = WaitWindowEvent()
    If EventID = #PB_Event_CloseWindow
      FreeLibrary_(hshell)
      End
    EndIf
  ForEver
EndIf
(tested in Windows 10)

Re: Rebar dropdown with loading icon

Posted: Tue Feb 16, 2016 8:35 pm
by bbanelli
It seems that pnpui.dll exist only in system32 on Windows 7, for example, which makes it unusable for 32 bit apps.

Your example with bthprops.cpl works like a charm, though! Shame it is missing in XP, and copying both W7 or W10 32bit version produces procedure entry point error in msvcrt.dll

In any case, since Microsoft doesn't support XP, users will have to live without that round animation! :)

Thank you once again for your help!

With my very best,

Bruno