Como impedir resize da dialog?
Moderador: Moderadores
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Como impedir resize da dialog?
Não encontrei aonde impedir resize da dialog.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
-
Fernando queiroz
- Usuário Nível 4

- Mensagens: 779
- Registrado em: 13 Nov 2014 00:41
- Localização: Porto Alegre/RS
Como impedir resize da dialog?
tenta assim
INIT DIALOG oDlg TITLE "Form1" ;
AT 527,122 SIZE 516,465 ;
STYLE WS_SYSMENU+WS_SIZEBOX+WS_VISIBLE
INIT DIALOG oDlg TITLE "Form1" ;
AT 527,122 SIZE 516,465 ;
STYLE WS_SYSMENU+WS_SIZEBOX+WS_VISIBLE
HARBOUR 3.2, HWGUI 2.23 B3, SEFAZCLASS, PDFClass, ADO + MariaDB/MySQL, RMChart
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Como impedir resize da dialog?
Nenhum efeito.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- Itamar M. Lins Jr.
- Administrador

- Mensagens: 7928
- Registrado em: 30 Mai 2007 11:31
- Localização: Ilheus Bahia
- Curtiu: 1 vez
Como impedir resize da dialog?
Olá!
STYLE WS_CHILD
Deveria ser WS_NOSIZE sei lá...
Saudações,
Itamar M. Lins Jr.
STYLE WS_CHILD
Deveria ser WS_NOSIZE sei lá...
Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
Itamar M. Lins Jr.
- Itamar M. Lins Jr.
- Administrador

- Mensagens: 7928
- Registrado em: 30 Mai 2007 11:31
- Localização: Ilheus Bahia
- Curtiu: 1 vez
Como impedir resize da dialog?
Olá!
Style CCS_NORESIZE
Assim também funciona.
Saudações,
Itamar M. Lins Jr.
Style CCS_NORESIZE
Assim também funciona.
Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
Itamar M. Lins Jr.
- Itamar M. Lins Jr.
- Administrador

- Mensagens: 7928
- Registrado em: 30 Mai 2007 11:31
- Localização: Ilheus Bahia
- Curtiu: 1 vez
Como impedir resize da dialog?
Olá!
Assim tá mais certo, minha dialog de login:
Pq tem que aparecer o ICONE de uma chave e tinha sumido... Não percebi.
Mais ainda não tá bom... Mexendo aqui...
Saudações,
Itamar M. Lins Jr.
Assim tá mais certo, minha dialog de login:
Código: Selecionar todos
STYLE WS_OVERLAPPED + WS_VISIBLE + WS_SYSMENU + WS_CAPTION + WS_TABSTOPCódigo: Selecionar todos
cTitulo:="Local: " + IIF(Empty(cServidor),cDirDados,cServidor), oIcon := HIcon():AddResource("ICON_4")Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
Itamar M. Lins Jr.
- Itamar M. Lins Jr.
- Administrador

- Mensagens: 7928
- Registrado em: 30 Mai 2007 11:31
- Localização: Ilheus Bahia
- Curtiu: 1 vez
Como impedir resize da dialog?
Olá!
O bagulho é doido!
Ficou com o ICONE + TITULO + MINIMIZAR e o X.
SE desligo o MINIMIZAR pode mudar o tamanho.
Saudações,
Itamar M. Lins Jr.
O bagulho é doido!
Código: Selecionar todos
STYLE WS_OVERLAPPED + WS_VISIBLE + WS_SYSMENU + WS_MAXIMIZEBOX + WS_CAPTION + WS_TABSTOPSE desligo o MINIMIZAR pode mudar o tamanho.
Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
Itamar M. Lins Jr.
- Itamar M. Lins Jr.
- Administrador

- Mensagens: 7928
- Registrado em: 30 Mai 2007 11:31
- Localização: Ilheus Bahia
- Curtiu: 1 vez
Como impedir resize da dialog?
Olá!
Um problema que vi foi que depois de fechado a DIALOG a Janela principal, fica MINIMIZADA.
Fiz uma oFormaMain:Maximize() para resolver. Mas não gostei pq antes não precisava.
Saudações,
Itamar M. Lins Jr.
Um problema que vi foi que depois de fechado a DIALOG a Janela principal, fica MINIMIZADA.
Fiz uma oFormaMain:Maximize() para resolver. Mas não gostei pq antes não precisava.
Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
Itamar M. Lins Jr.
-
Fernando queiroz
- Usuário Nível 4

- Mensagens: 779
- Registrado em: 13 Nov 2014 00:41
- Localização: Porto Alegre/RS
Como impedir resize da dialog?
/*
* Window Styles
*/
#define WS_OVERLAPPED 0
#define WS_POPUP 2147483648 // 0x80000000L
#define WS_CHILD 1073741824 // 0x40000000L
#define WS_MINIMIZE 536870912 // 0x20000000L
#define WS_VISIBLE 268435456 // 0x10000000L
#define WS_DISABLED 134217728 // 0x08000000L
#define WS_CLIPSIBLINGS 67108864 // 0x04000000L
#define WS_CLIPCHILDREN 33554432
#define WS_MAXIMIZE 16777216 // 0x01000000L
#define WS_CAPTION 12582912 // 0x00C00000L
#define WS_BORDER 8388608 // 0x00800000L
#define WS_VSCROLL 2097152 // 0x00200000L
#define WS_HSCROLL 1048576 // 0x00100000L
#define WS_DLGFRAME 4194304 // 0x00400000L
#define WS_EX_STATICEDGE 131072 // 0x00020000L
#define WS_SYSMENU 524288 // 0x00080000L
#define WS_THICKFRAME 262144 // 0x00040000L
#define WS_GROUP 131072 // 0x00020000L
#define WS_TABSTOP 65536 // 0x00010000L
#define WS_MINIMIZEBOX 131072 // 0x00020000L
#define WS_MAXIMIZEBOX 65536 // 0x00010000L
#define WS_SIZEBOX WS_THICKFRAME
#define WS_OVERLAPPEDWINDOW WS_OVERLAPPED + WS_CAPTION + WS_SYSMENU + WS_THICKFRAME + WS_MINIMIZEBOX + WS_MAXIMIZEBOX
* Window Styles
*/
#define WS_OVERLAPPED 0
#define WS_POPUP 2147483648 // 0x80000000L
#define WS_CHILD 1073741824 // 0x40000000L
#define WS_MINIMIZE 536870912 // 0x20000000L
#define WS_VISIBLE 268435456 // 0x10000000L
#define WS_DISABLED 134217728 // 0x08000000L
#define WS_CLIPSIBLINGS 67108864 // 0x04000000L
#define WS_CLIPCHILDREN 33554432
#define WS_MAXIMIZE 16777216 // 0x01000000L
#define WS_CAPTION 12582912 // 0x00C00000L
#define WS_BORDER 8388608 // 0x00800000L
#define WS_VSCROLL 2097152 // 0x00200000L
#define WS_HSCROLL 1048576 // 0x00100000L
#define WS_DLGFRAME 4194304 // 0x00400000L
#define WS_EX_STATICEDGE 131072 // 0x00020000L
#define WS_SYSMENU 524288 // 0x00080000L
#define WS_THICKFRAME 262144 // 0x00040000L
#define WS_GROUP 131072 // 0x00020000L
#define WS_TABSTOP 65536 // 0x00010000L
#define WS_MINIMIZEBOX 131072 // 0x00020000L
#define WS_MAXIMIZEBOX 65536 // 0x00010000L
#define WS_SIZEBOX WS_THICKFRAME
#define WS_OVERLAPPEDWINDOW WS_OVERLAPPED + WS_CAPTION + WS_SYSMENU + WS_THICKFRAME + WS_MINIMIZEBOX + WS_MAXIMIZEBOX
HARBOUR 3.2, HWGUI 2.23 B3, SEFAZCLASS, PDFClass, ADO + MariaDB/MySQL, RMChart
- Itamar M. Lins Jr.
- Administrador

- Mensagens: 7928
- Registrado em: 30 Mai 2007 11:31
- Localização: Ilheus Bahia
- Curtiu: 1 vez
Como impedir resize da dialog?
Olá!
Ai não explica nada.
Tem que ver no site da M$.
https://learn.microsoft.com/pt-br/windo ... dow-styles Lógico que no site da Microsoft tem mais opções.
Saudações,
Itamar M. Lins Jr.
Ai não explica nada.
Tem que ver no site da M$.
https://learn.microsoft.com/pt-br/windo ... dow-styles Lógico que no site da Microsoft tem mais opções.
Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
Itamar M. Lins Jr.
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Como impedir resize da dialog?
https://learn.microsoft.com/en-us/windo ... dow-styles
Pois é, a LIB deveria fazer isso.
Pois é, a LIB deveria fazer isso.
|  WS_BORDER  |  0x00800000L  |  The window has a thin-line border  |
|  WS_CAPTION  |  0x00C00000L  |  The window has a title bar (includes the WS_BORDER style).  |
|  WS_CHILD  |  0x40000000L  |  The window is a child window. A window with this style cannot have a menu bar. This style cannot be used with the WS_POPUP style.  |
|  WS_CHILDWINDOW  |  0x40000000L  |  Same as the WS_CHILD style.  |
|  WS_CLIPCHILDREN  |  0x02000000L  |  Excludes the area occupied by child windows when drawing occurs within the parent window. This style is used when creating the parent window.  |
|  WS_CLIPSIBLINGS  |  0x04000000L  |  Clips child windows relative to each other; that is, when a particular child window receives a WM_PAINT message, the WS_CLIPSIBLINGS style clips all other overlapping child windows out of the region of the child window to be updated. If WS_CLIPSIBLINGS is not specified and child windows overlap, it is possible, when drawing within the client area of a child window, to draw within the client area of a neighboring child window.  |
|  WS_DISABLED  |  0x08000000L  |  The window is initially disabled. A disabled window cannot receive input from the user. To change this after a window has been created, use the EnableWindow function.  |
|  WS_DLGFRAME  |  0x00400000L  |  The window has a border of a style typically used with dialog boxes. A window with this style cannot have a title bar.  |
|  WS_GROUP  |  0x00020000L  |  The window is the first control of a group of controls. The group consists of this first control and all controls defined after it, up to the next control with the WS_GROUP style. The first control in each group usually has the WS_TABSTOP style so that the user can move from group to group. The user can subsequently change the keyboard focus from one control in the group to the next control in the group by using the direction keys.You can turn this style on and off to change dialog box navigation. To change this style after a window has been created, use the SetWindowLong function.  |
|  WS_HSCROLL  |  0x00100000L  |  The window has a horizontal scroll bar.  |
|  WS_ICONIC  |  0x20000000L  |  The window is initially minimized. Same as the WS_MINIMIZE style.  |
|  WS_MAXIMIZE  |  0x01000000L  |  The window is initially maximized.  |
|  WS_MAXIMIZEBOX  |  0x00010000L  |  The window has a maximize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified.  |
|  WS_MINIMIZE  |  0x20000000L  |  The window is initially minimized. Same as the WS_ICONIC style.  |
|  WS_MINIMIZEBOX  |  0x00020000L  |  The window has a minimize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified.  |
|  WS_OVERLAPPED  |  0x00000000L  |  The window is an overlapped window. An overlapped window has a title bar and a border. Same as the WS_TILED style.  |
|  WS_OVERLAPPEDWINDOW  |  WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX  |  The window is an overlapped window. Same as the WS_TILEDWINDOW style.  |
|  WS_POPUP  |  0x80000000L  |  The window is a pop-up window. This style cannot be used with the WS_CHILD style.  |
|  WS_POPUPWINDOW  |  (WS_POPUP | WS_BORDER | WS_SYSMENU)  |  The window is a pop-up window. The WS_CAPTION and WS_POPUPWINDOW styles must be combined to make the window menu visible.  |
|  WS_SIZEBOX  |  0x00040000L  |  The window has a sizing border. Same as the WS_THICKFRAME style.  |
|  WS_SYSMENU  |  0x00080000L  |  The window has a window menu on its title bar. The WS_CAPTION style must also be specified.  |
|  WS_TABSTOP  |  0x00010000L  |  The window is a control that can receive the keyboard focus when the user presses the TAB key. Pressing the TAB key changes the keyboard focus to the next control with the WS_TABSTOP style.You can turn this style on and off to change dialog box navigation. To change this style after a window has been created, use the SetWindowLong function. For user-created windows and modeless dialogs to work with tab stops, alter the message loop to call the IsDialogMessage function.  |
|  WS_THICKFRAME  |  0x00040000L  |  The window has a sizing border. Same as the WS_SIZEBOX style.  |
|  WS_TILED  |  0x00000000L  |  The window is an overlapped window. An overlapped window has a title bar and a border. Same as the WS_OVERLAPPED style.  |
|  WS_TILEDWINDOW  |  (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX)  |  The window is an overlapped window. Same as the WS_OVERLAPPEDWINDOW style.  |
|  WS_VISIBLE  |  0x10000000L  |  The window is initially visible. This style can be turned on and off by using the ShowWindow or SetWindowPos function.  |
|  WS_VSCROLL  |  0x00200000L  |  The window has a vertical scroll bar.  |
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Como impedir resize da dialog?
Talvez no evento SIZE, mas como isso é DEPOIS de redimensionar, precisa tratamento pra não travar tudo.
É... porque... pelo que imagino.... voltar ao tamanho normal acaba sendo outro resize.
E se não tomar cuidado vai causar um loop infinito.
É... porque... pelo que imagino.... voltar ao tamanho normal acaba sendo outro resize.
E se não tomar cuidado vai causar um loop infinito.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Como impedir resize da dialog?
Código: Selecionar todos
INIT DIALOG oDlg ;
AT AppWindowRect( 1 ), AppWindowRect( 2 ) SIZE AppWindowRect( 3 ), AppWindowRect( 4 ) ;
TITLE cTitle ;
ON SIZE { || FixSize( oDlg ) }
...
STATIC FUNCTION FixSize( oDlg )
LOCAL aPos := hwg_GetWindowRect( oDlg:Handle )
hwg_MsgInfo( Str( oDlg:nTop ) + Str( oDlg:nLeft ) + Str( oDlg:nWidth ) + ", " + Str( oDlg:nHeight ) + hb_Eol() + ;
Str( aPos[ 1 ] ) + Str( aPos[ 2 ] ) + Str( aPos[ 3 ] ) + Str( aPos[ 4 ] ) )
RETURN Nil
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Como impedir resize da dialog?
Agora é descobrir como usar a informação.
Código: Selecionar todos
STATIC FUNCTION FixSize( oDlg )
LOCAL aPos := hwg_GetWindowRect( oDlg:Handle )
WITH OBJECT oDlg
IF :nWidth!= aPos[ 4 ] - aPos[ 2 ] .OR. :nHeight != aPos[ 3 ] - aPos[ 1 ]
hwg_MsgInfo( Str( :nTop ) + Str( :nLeft ) + Str( :nWidth ) + ", " + Str( :nHeight ) + hb_Eol() + ;
Str( aPos[ 1 ] ) + Str( aPos[ 2 ] ) + Str( aPos[ 3 ] ) + Str( aPos[ 4 ] ) )
ENDIF
ENDWITH
RETURN .T.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Como impedir resize da dialog?
Código: Selecionar todos
STATIC FUNCTION FixSize( oDlg )
LOCAL aPos := hwg_GetWindowRect( oDlg:Handle )
WITH OBJECT oDlg
IF :nWidth != aPos[ 4 ] - aPos[ 2 ] .OR. :nHeight != aPos[ 3 ] - aPos[ 1 ]
hwg_MsgInfo( ;
Str( :nTop ) + Str( :nLeft ) + hb_Eol() + ;
Str( :nWidth ) + ", " + Str( :nHeight ) + hb_Eol() + ;
Str( aPos[ 1 ] ) + Str( aPos[ 2 ] ) + hb_Eol() + ;
Str( aPos[ 3 ] ) + Str( aPos[ 4 ] ) )
ENDIF
ENDWITH
RETURN .T.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/