cela fait des heures et des heures que je me creuse la tete a essayer de rajouter une toolbar dans windows explorer

si on pouvait me dire si c'est possible et au cas ou me donner la solus?
merci d'avance!

merci du tuyeau mais c pas encore demon niveauCpl.Bator a écrit :Salut , une piste : http://www.purebasic.fr/french/viewtopi ... findwindow
oui sa je sais le faire mais ensuite pour faire le lien entre les deux fenetres,c'est la que je bloque!!!Ollivier a écrit :Ah! Et est-ce que tu peux créer cette fenêtre sans ses rebords?
(Flag = $80000000)
Aussi, il y a la fonction StickyWindow() pour maintenir cette fenêtre au premier plan.
Comme ça, tout est de ton niveau!!
ça te semble intéressant?
Code : Tout sélectionner
Declare OpenWindow_Window_0()
Declare OpenWindow_Window_1()
Declare WindowCallback( WindowID ,message,wParam,lParam)
Global Thread
Enumeration
#Window_0
#Window_1
#Gadget
EndEnumeration
InitSprite()
OpenWindow_Window_0()
OpenWindow_Window_1()
SetWindowCallback (@WindowCallback())
Repeat
Event = WaitWindowEvent () ; on récupère un évènement
Select Event ; on sélectionne cet évènement
Case #PB_Event_Gadget ; cet évènement concerne une action sur un Gadget
Select EventGadget () ; dans ce cas, on récupère l'identifiant du gadget qui l'a créé
EndSelect
Case #PB_Event_CloseWindow ; cet évènement concerne la fermeture de la fenêtre !!!!!!
Quit=1
EndSelect
Until Quit=1
Procedure OpenWindow_Window_0()
If OpenWindow ( #Window_0 , 407, 62, 362, 289, "bouge moi" , #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar )
If CreateGadgetList ( WindowID ( #Window_0 ))
Resultat = TextGadget ( #Gadget , 10, 10,200, 30, "Bouge moi" )
EndIf
EndIf
EndProcedure
Procedure OpenWindow_Window_1()
If OpenWindow ( #Window_1 , 408, 384, 362, 287, "je suis..." , #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar )
If CreateGadgetList ( WindowID ( #Window_1 ))
EndIf
EndIf
EndProcedure
Procedure WindowCallback( WindowID ,message,wParam,lParam)
res= #PB_ProcessPureBasicEvents
Select message
Case #WM_PAINT
xw = WindowX ( #Window_0 )+0
yw = WindowY ( #Window_0 )+302
hWinCalc = FindWindow_ (vbNullString, "je suis..." )
SetWindowPos_ (hWinCalc, -1, xw, yw, 0, 0, #SWP_NOSIZE ) ;fenetre toujours devant
ProcedureReturn #True
EndSelect
ProcedureReturn res
EndProcedure
si si! on peut !!Cpl.Bator a écrit :De toute Façon , tu ne peut pas comme ca , rajouté des toolbars , et divers gadgets à des programmes déjà compilé !
Code : Tout sélectionner
Global oldproc, Quit=0, cebutton, clearbutton, one, two, three
Global four, five, six, seven, eight, nine, zero, point
Procedure ButtonProc(hwnd, msg, wParam, lParam)
Select msg
Case #WM_NCDESTROY
End
Case #WM_LBUTTONUP
SendMessage_(cebutton, #BM_CLICK, 0,0)
SendMessage_(three, #BM_CLICK, 0,0)
SendMessage_(point, #BM_CLICK, 0,0)
SendMessage_(one, #BM_CLICK, 0,0)
SendMessage_(four, #BM_CLICK, 0,0)
SendMessage_(one, #BM_CLICK, 0,0)
SendMessage_(five, #BM_CLICK, 0,0)
EndSelect
ProcedureReturn CallWindowProc_(oldproc, hwnd, msg, wParam, lParam)
EndProcedure
Procedure GetClearButtons(hwnd, param)
CtrlID = GetDlgCtrlID_(hwnd)
If CtrlID = 81
clearbutton = hwnd
ElseIf CtrlID = 82
cebutton = hwnd
EndIf
ProcedureReturn 1
EndProcedure
Procedure GetNumbers(hwnd, param)
Select GetDlgCtrlID_(hwnd)
Case 124 : zero = hwnd
Case 125 : one = hwnd
Case 126 : two = hwnd
Case 127 : three = hwnd
Case 128 : four = hwnd
Case 129 : five = hwnd
Case 130 : six = hwnd
Case 131 : seven = hwnd
Case 132 : eight = hwnd
Case 133 : nine = hwnd
Case 85 : point = hwnd
EndSelect
ProcedureReturn 1
EndProcedure
CalcProgramID = RunProgram("Calc.Exe", "", "", #PB_Program_Open)
If CalcProgramID
CalcProcessID = ProgramID(CalcProgramID)
Count = 0
Repeat
Delay(100) ; Avoid hanging of windows during start of application while searching for the window
Count = Count + 1 ; Security counter to avoid hanging
WinHandle = FindWindow_(0,0)
While WinHandle <> 0
GetWindowThreadProcessId_(WinHandle, @ProcessID)
If ProcessID = CalcProcessID
c = WinHandle
Break
EndIf
WinHandle = GetWindow_(WinHandle, #GW_HWNDNEXT)
Wend
Until c Or (Count=50) ; Wait up to 5 seconds for window to occur
EndIf
If c
EnumChildWindows_(c, @GetClearButtons(), 0)
EnumChildWindows_(c, @GetNumbers(), 0)
SetWindowPos_(clearbutton, 0,0,0,28,29,#SWP_NOZORDER|#SWP_NOMOVE|#SWP_FRAMECHANGED)
InitCommonControls_()
GetWindowRect_(c, @cr.RECT)
w = cr\right-cr\left
If w < 270 ; Standard
If OSVersion() = #PB_OS_Windows_NT_4
yPosPIButton = 46
Else
yPosPIButton = 37
EndIf
button = CreateWindowEx_(0,"Button", "PI", #WS_CHILD|#WS_VISIBLE,216,yPosPIButton,28,29,c,0,GetModuleHandle_(0),0)
EndIf
RedrawWindow_(button, 0, 0, #RDW_UPDATENOW)
Else
MessageRequester("OOPS!", "Can't find the Calculator!", #MB_ICONERROR)
End
EndIf
oldproc = SetWindowLong_(button, #GWL_WNDPROC, @ButtonProc())
Result = GetMessage_(@msg.MSG, #Null, #Null, #Null)
While Result <> 0
If Result = -1 ; GetMessage failed
MessageRequester("OOPS!", "Failure in GetMessage Loop", #MB_ICONERROR)
End
EndIf
TranslateMessage_(msg)
DispatchMessage_(msg)
Result = GetMessage_(@msg.MSG, #Null, #Null, #Null)
Wend
si si! on peut !! SmileCpl.Bator a écrit:
De toute Façon , tu ne peut pas comme ca , rajouté des toolbars , et divers gadgets à des programmes déjà compilé !
ce code ajoute le bouton PI a la calculatrice de windows !! Smile
Le nom de la fenetre me semble un repérage suffisant. Cherche le mot-clé "trou" avec "Le Soldat Inconnu", comme auteur. Il a fait un code surprenant pour voir à travers les fenêtres.Samy97 a écrit :aucune idée je croi qu'avec le focus ou le non de la fenetre sa devrai marcher mé je sais pas le faire