Bouton d'une feuille MDI

Résolu
cs_PHILOUVB Messages postés 141 Date d'inscription mardi 18 mars 2003 Statut Membre Dernière intervention 3 octobre 2010 - 29 juil. 2004 à 12:09
noah56 Messages postés 9 Date d'inscription mardi 24 décembre 2002 Statut Membre Dernière intervention 27 février 2008 - 22 janv. 2008 à 21:00
J'aimerais savoir si il existe un moyen pour ne pas faire apparaitre les boutons de réduction, d'aggrandissement et de fermeture qui apparaissent sur une feuille MDI.

En fait j'aimerais que je bouton d'aggrandissement de la feuille n'apparaisse pas.

Existe-t-il une API ou une autre possibilité qui me permette de gérer ces boutons.

Merci par avance et par la meme occasion, bonnes vacances à tous.

PhilouVB

3 réponses

cs_liquide Messages postés 1016 Date d'inscription samedi 22 mars 2003 Statut Membre Dernière intervention 24 juin 2008
29 juil. 2004 à 14:10
salut

A mon avis et si c'est possible sur une MDI, je pense qu'il faut utiliser l'API :

Public Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Public Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

'# nIndex
Public Const GWL_EXSTYLE As Long = -20
Public Const GWL_HINSTANCE As Long = -6
Public Const GWL_ID As Long = -12
Public Const GWL_STYLE As Long = -16
Public Const GWL_USERDATA As Long = -21
Public Const GWL_WNDPROC As Long = -4

Public Const DWL_DLGPROC As Long = 4
Public Const DWL_MSGRESULT As Long = 0
Public Const DWL_USER As Long = 8


avec les paramètre :GWL_STYLE
et redéfinir avec les paramètres :

'# dwStyle
Public Const WS_ACTIVECAPTION As Long = &H1
Public Const WS_CHILD As Long = &H40000000
Public Const WS_CHILDWINDOW As Long = (WS_CHILD)
Public Const WS_CLIPCHILDREN As Long = &H2000000
Public Const WS_CLIPSIBLINGS As Long = &H4000000
Public Const WS_DISABLED As Long = &H8000000
Public Const WS_DLGFRAME As Long = &H400000
Public Const WS_GROUP As Long = &H20000
Public Const WS_TABSTOP As Long = &H10000
Public Const WS_GT As Long = (WS_GROUP Or WS_TABSTOP)
Public Const WS_HSCROLL As Long = &H100000
Public Const WS_MINIMIZE As Long = &H20000000
Public Const WS_ICONIC As Long = WS_MINIMIZE
Public Const WS_MAXIMIZE As Long = &H1000000
Public Const WS_MAXIMIZEBOX As Long = &H10000
Public Const WS_MINIMIZEBOX As Long = &H20000
Public Const WS_OVERLAPPED As Long = &H0&
Public Const WS_CAPTION As Long = &HC00000
Public Const WS_SYSMENU As Long = &H80000
Public Const WS_THICKFRAME As Long = &H40000
Public Const WS_POPUP As Long = &H80000000
Public Const WS_OVERLAPPEDWINDOW As Long = (WS_OVERLAPPED Or WS_CAPTION Or WS_SYSMENU Or WS_THICKFRAME Or WS_MINIMIZEBOX Or WS_MAXIMIZEBOX)
Public Const WS_BORDER As Long = &H800000
Public Const WS_POPUPWINDOW As Long = (WS_POPUP Or WS_BORDER Or WS_SYSMENU)
Public Const WS_SIZEBOX As Long = WS_THICKFRAME
Public Const WS_TILED As Long = WS_OVERLAPPED
Public Const WS_VISIBLE As Long = &H10000000
Public Const WS_TILEDWINDOW As Long = WS_OVERLAPPEDWINDOW
Public Const WS_VSCROLL As Long = &H200000


pour plus d'info, va voir dans l'API CreateWindowEx

Bonne prog, poele_a_frire@hotmail.com
liquide
3
Tilois Messages postés 721 Date d'inscription dimanche 10 juin 2001 Statut Membre Dernière intervention 27 mars 2011 7
29 juil. 2004 à 14:05
Non, ca existe pas pour les feuilles MDI. Au pire tu peux désactiver leur utilisation, en forcant le non-redimensionnement dans le code lors de l'aggrandissement ou le retrécissement de ta feuille! Ou alors grisé les boutons!
0
noah56 Messages postés 9 Date d'inscription mardi 24 décembre 2002 Statut Membre Dernière intervention 27 février 2008
22 janv. 2008 à 21:00
c'est moi
0
Rejoignez-nous