Fenêtre avec barre de titre réduite

Partagez votre expérience de PureBasic avec les autres utilisateurs.
Le Soldat Inconnu
Messages : 4312
Inscription : mer. 28/janv./2004 20:58
Localisation : Clermont ferrand OU Olsztyn
Contact :

Fenêtre avec barre de titre réduite

Message par Le Soldat Inconnu »

Code : Tout sélectionner


Procedure Open_PopupMenu(x.l, y.l)
  #TailleX = 118
  #TailleY = 118
  If OpenWindow(0, x, y, #TailleX - 1, #TailleY - 1, #PB_Window_Invisible, "Découpeur")
    SetWindowLong_(WindowID(), #GWL_EXSTYLE, GetWindowLong_(WindowID(), #GWL_EXSTYLE) ! #WS_EX_TOOLWINDOW) ; choix de la barre d'outil réduite
    ShowWindow_(WindowID(), #SW_SHOW) ; montre la fenêtre
    ResizeWindow(#TailleX, #TailleY)
    ResizeWindow(#TailleX, #TailleY * 2 - WindowHeight()) ; redimensionne la fenetre
    SetWindowPos_(WindowID(), -1, 0, 0, 0, 0, #SWP_NOSIZE | #SWP_NOMOVE) ; mets la fenêtre toujours au premier plan
  EndIf
EndProcedure



Open_PopupMenu(300, 300)

Repeat : Until WaitWindowEvent() = #PB_EventCloseWindow
Je ne suis pas à moitié Polonais mais ma moitié est polonaise ... Vous avez suivi ?

[Intel quad core Q9400 2.66mhz, ATI 4870, 4Go Ram, XP (x86) / 7 (x64)]