Code: Select all
-ldwmapiCode: Select all
Libs=dwmapiCode: Select all
libpaths=C:\hmg.3.6\mingw64\x86_64-w64-mingw32\lib
incpaths=C:\hmg.3.6\mingw64\x86_64-w64-mingw32\include
libs=dwmapi]]>#include "hmg.ch"
FUNCTION Main()
DEFINE WINDOW Win_1 ;
AT 0, 0 WIDTH 600 HEIGHT 400 ;
TITLE "Prueba DWM en HMG" ;
MAIN
END WINDOW
// Obtenemos el Handle (HWND) de la ventana HMG
LOCAL hWnd := GetFormHandle("Win_1")
// Ejemplo: Activar modo oscuro en la barra de título (Windows 10/11)
// DWMWA_USE_IMMERSIVE_DARK_MODE = 20
DwmSetWindowAttributeInt( hWnd, 20, 1 )
CENTER WINDOW Win_1
ACTIVATE WINDOW Win_1
RETURN NIL
// ============================================================================
// C-WRAPPERS PARA DWM
// ============================================================================
#pragma BEGINDUMP
#ifndef WINVER
#define WINVER 0x0600
#endif
#include <windows.h>
#include <dwmapi.h>
#include "hbapi.h"
/*
* Permite cambiar atributos del DWM pasando un entero (ej: Modo Oscuro, Esquinas redondas)
* Sintaxis Harbour: DwmSetWindowAttributeInt( hWnd, nAttribute, nValue )
*/
HB_FUNC( DWMSETWINDOWATTRIBUTEINT )
{
HWND hwnd = (HWND) hb_parptr( 1 );
DWORD dwAttribute = (DWORD) hb_parni( 2 );
int nValue = hb_parni( 3 );
HRESULT hr = DwmSetWindowAttribute( hwnd, dwAttribute, &nValue, sizeof(nValue) );
hb_retnl( (LONG) hr );
}
/*
* Extender el marco de la ventana hacia el área de cliente (Efecto Glass/Blur)
* Sintaxis Harbour: DwmExtendFrameIntoClientArea( hWnd, nLeft, nTop, nRight, nBottom )
*/
HB_FUNC( DWMEXTENDFRAMEINTOCLIENTAREA )
{
HWND hwnd = (HWND) hb_parptr( 1 );
MARGINS margins;
margins.cxLeftWidth = hb_parni( 2 );
margins.cxRightWidth = hb_parni( 3 );
margins.cyTopHeight = hb_parni( 4 );
margins.cyBottomHeight = hb_parni( 5 );
HRESULT hr = DwmExtendFrameIntoClientArea( hwnd, &margins );
hb_retnl( (LONG) hr );
}
#pragma ENDDUMP
Code: Select all
-ldwmapiCode: Select all
Libs=dwmapiCode: Select all
libpaths=C:\hmg.3.6\mingw64\x86_64-w64-mingw32\lib
incpaths=C:\hmg.3.6\mingw64\x86_64-w64-mingw32\include
libs=dwmapi]]>#include "hmg.ch"
FUNCTION Main()
DEFINE WINDOW Win_1 ;
AT 0, 0 WIDTH 600 HEIGHT 400 ;
TITLE "Prueba DWM en HMG" ;
MAIN
END WINDOW
// Obtenemos el Handle (HWND) de la ventana HMG
LOCAL hWnd := GetFormHandle("Win_1")
// Ejemplo: Activar modo oscuro en la barra de título (Windows 10/11)
// DWMWA_USE_IMMERSIVE_DARK_MODE = 20
DwmSetWindowAttributeInt( hWnd, 20, 1 )
CENTER WINDOW Win_1
ACTIVATE WINDOW Win_1
RETURN NIL
// ============================================================================
// C-WRAPPERS PARA DWM
// ============================================================================
#pragma BEGINDUMP
#ifndef WINVER
#define WINVER 0x0600
#endif
#include <windows.h>
#include <dwmapi.h>
#include "hbapi.h"
/*
* Permite cambiar atributos del DWM pasando un entero (ej: Modo Oscuro, Esquinas redondas)
* Sintaxis Harbour: DwmSetWindowAttributeInt( hWnd, nAttribute, nValue )
*/
HB_FUNC( DWMSETWINDOWATTRIBUTEINT )
{
HWND hwnd = (HWND) hb_parptr( 1 );
DWORD dwAttribute = (DWORD) hb_parni( 2 );
int nValue = hb_parni( 3 );
HRESULT hr = DwmSetWindowAttribute( hwnd, dwAttribute, &nValue, sizeof(nValue) );
hb_retnl( (LONG) hr );
}
/*
* Extender el marco de la ventana hacia el área de cliente (Efecto Glass/Blur)
* Sintaxis Harbour: DwmExtendFrameIntoClientArea( hWnd, nLeft, nTop, nRight, nBottom )
*/
HB_FUNC( DWMEXTENDFRAMEINTOCLIENTAREA )
{
HWND hwnd = (HWND) hb_parptr( 1 );
MARGINS margins;
margins.cxLeftWidth = hb_parni( 2 );
margins.cxRightWidth = hb_parni( 3 );
margins.cyTopHeight = hb_parni( 4 );
margins.cyBottomHeight = hb_parni( 5 );
HRESULT hr = DwmExtendFrameIntoClientArea( hwnd, &margins );
hb_retnl( (LONG) hr );
}
#pragma ENDDUMP
AUGE_OHR wrote: ↑Wed Mar 16, 2022 10:42 pm hi,
while when load into IDE it will not work withwhich is in *.HBPCode: Select all
-ldwmapi
btw. i have try to include it into *.HBCbut it seems not to work this WayCode: Select all
Libs=dwmapi
i use VLC ActiveX to Show IPTV (using *.M3U Files, include in ZIP File)Hola Jimmy, xomo no tengo el codigo fuente completo para probar IPTV con El Administrador de ventanas de escritorio (DWM)
puede usar esa misma libreria de Mingw64 desde esta ruta :
Code: Select all
DEFINE ACTIVEX oxVLC
PARENT Form_1
ROW 0
COL 0
WIDTH aSize[ 1 ]
HEIGHT aSize[ 2 ]
PROGID "VideoLAN.VLCPlugin.2"
TOOLTIP "right-click Mouse Menu"
END ACTIVEX
AUGE_OHR wrote: ↑Wed Mar 16, 2022 10:42 pm hi,
while when load into IDE it will not work withwhich is in *.HBPCode: Select all
-ldwmapi
btw. i have try to include it into *.HBCbut it seems not to work this WayCode: Select all
Libs=dwmapi
i use VLC ActiveX to Show IPTV (using *.M3U Files, include in ZIP File)Hola Jimmy, xomo no tengo el codigo fuente completo para probar IPTV con El Administrador de ventanas de escritorio (DWM)
puede usar esa misma libreria de Mingw64 desde esta ruta :
Code: Select all
DEFINE ACTIVEX oxVLC
PARENT Form_1
ROW 0
COL 0
WIDTH aSize[ 1 ]
HEIGHT aSize[ 2 ]
PROGID "VideoLAN.VLCPlugin.2"
TOOLTIP "right-click Mouse Menu"
END ACTIVEX
Code: Select all
IF !__dbOpenSDF("testlong.txt", aStruct, "DELIM", .T., "TESTLONG", Chr(9))Code: Select all
IF !__dbOpenSDF("testlong.txt", aStruct, "DELIM", .T., "TESTLONG", Chr(9))]]>serge_girard wrote: ↑Sun Jul 19, 2026 6:34 am Try this way:
IF !__dbOpenSDF("testlong.txt", aStruct)
]]>serge_girard wrote: ↑Sun Jul 19, 2026 6:34 am Try this way:
IF !__dbOpenSDF("testlong.txt", aStruct)
Code: Select all
aStruct := {}
AADD(aStruct, { 'ID1', "C", 10, 0 })
AADD(aStruct, { 'ID2', "C", 10, 0 })
DBCREATE("testlong.DBF", aStruct)
USE testlong
APPEND FROM "testlong.txt" SDF
Code: Select all
aStruct := {}
AADD(aStruct, { 'ID1', "C", 10, 0 })
AADD(aStruct, { 'ID2', "C", 10, 0 })
DBCREATE("testlong.DBF", aStruct)
USE testlong
APPEND FROM "testlong.txt" SDF
]]>serge_girard wrote: ↑Sun Jul 19, 2026 5:27 pm Would something like this be helpful ?
Code: Select all
aStruct := {} AADD(aStruct, { 'ID1', "C", 10, 0 }) AADD(aStruct, { 'ID2', "C", 10, 0 }) DBCREATE("testlong.DBF", aStruct) USE testlong APPEND FROM "testlong.txt" SDF
]]>serge_girard wrote: ↑Sun Jul 19, 2026 5:27 pm Would something like this be helpful ?
Code: Select all
aStruct := {} AADD(aStruct, { 'ID1', "C", 10, 0 }) AADD(aStruct, { 'ID2', "C", 10, 0 }) DBCREATE("testlong.DBF", aStruct) USE testlong APPEND FROM "testlong.txt" SDF
para ello descargo el core desde : https://github.com/harbour/core/archive ... master.zipC:\WorkSpace\harbour64\bin>harbour -build
Harbour 3.2.1dev (r2607071005)
Copyright (c) 1999-2025, https://harbour.github.io/
Harbour Build Info
---------------------------
Version: Harbour 3.2.1dev (r2607071005)
Compiler: MinGW GNU C 16.1 (64-bit)
Platform: Windows 11 or newer 10.0.26100
PCode version: 0.3
ChangeLog last entry: 2026-07-07 12:05 UTC+0200 Antonio Linares
ChangeLog ID: 035ed416171ae735a70f5ea49d5d17e1fc00bab3
Built on: Jul 19 2026 22:02:37
Build options: (Clipper 5.3b) (Clipper 5.x undoc)
Code: Select all
cd c:\core-master
set path=c:\mingw64\bin
set HB_INSTALL_PREFIX=c:\harbour64
win-make installpara ello descargo el core desde : https://github.com/harbour/core/archive ... master.zipC:\WorkSpace\harbour64\bin>harbour -build
Harbour 3.2.1dev (r2607071005)
Copyright (c) 1999-2025, https://harbour.github.io/
Harbour Build Info
---------------------------
Version: Harbour 3.2.1dev (r2607071005)
Compiler: MinGW GNU C 16.1 (64-bit)
Platform: Windows 11 or newer 10.0.26100
PCode version: 0.3
ChangeLog last entry: 2026-07-07 12:05 UTC+0200 Antonio Linares
ChangeLog ID: 035ed416171ae735a70f5ea49d5d17e1fc00bab3
Built on: Jul 19 2026 22:02:37
Build options: (Clipper 5.3b) (Clipper 5.x undoc)
Code: Select all
cd c:\core-master
set path=c:\mingw64\bin
set HB_INSTALL_PREFIX=c:\harbour64
win-make installCode: Select all
/*
* MenuButtonsDemo.prg
*
* Ejemplos:
* 1. Split Button -> BS_SPLITBUTTON
* 2. Drop-Down -> BS_COMMANDLINK + men£ agregado manualmente
* 3. Popup Menu -> boton normal + TrackPopupMenuEx
* 4. Flyout -> ventana WS_POPUP personalizada
*
* Compilar:
* hbmk2 MenuButtonsDemo.prg <ruta>\hmg64.hbc -gtgui
*/
#include "hmg.ch"
FUNCTION Main()
DEFINE WINDOW MainWindow AT 0, 0 WIDTH 720 HEIGHT 520 TITLE "HMG - Menus modernos Win32" MAIN ON INIT NativeMenuDemo_Init( GetFormHandle( "MainWindow" ) )
@ 25, 25 LABEL TitleLabel VALUE "Controles de menu para Workspace" WIDTH 500 HEIGHT 30 FONT "Segoe UI" SIZE 15 BOLD
@ 65, 25 LABEL SplitLabel VALUE "1. Split Button: zona principal + flecha independiente" WIDTH 600 HEIGHT 24 FONT "Segoe UI" SIZE 10
@ 150, 25 LABEL CommandLabel VALUE "2. Command Link usado como Drop-Down completo" WIDTH 600 HEIGHT 24 FONT "Segoe UI" SIZE 10
@ 270, 25 LABEL PopupLabel VALUE "3. Bot¢n normal que abre TrackPopupMenuEx" WIDTH 600 HEIGHT 24 FONT "Segoe UI" SIZE 10
@ 350, 25 LABEL FlyoutLabel VALUE "4. Flyout: panel emergente personalizado" WIDTH 600 HEIGHT 24 FONT "Segoe UI" SIZE 10
@ 455, 25 LABEL InfoLabel VALUE "Los cuatro controles inferiores son creados directamente con Win32." WIDTH 650 HEIGHT 24 FONT "Segoe UI" SIZE 9
END WINDOW
CENTER WINDOW MainWindow
ACTIVATE WINDOW MainWindow
RETURN NIL
#pragma BEGINDUMP
#define _WIN32_WINNT 0x0601
#include <windows.h>
#include <commctrl.h>
#include "hbapi.h"
#ifndef BS_SPLITBUTTON
#define BS_SPLITBUTTON 0x0000000CL
#endif
#ifndef BS_COMMANDLINK
#define BS_COMMANDLINK 0x0000000EL
#endif
#ifndef BCN_FIRST
#define BCN_FIRST ( 0U - 1250U )
#endif
#ifndef BCN_DROPDOWN
#define BCN_DROPDOWN ( BCN_FIRST + 0x0002 )
#endif
#ifndef BCM_FIRST
#define BCM_FIRST 0x1600
#endif
#ifndef BCM_SETNOTE
#define BCM_SETNOTE ( BCM_FIRST + 0x0009 )
#endif
#define ID_SPLIT_BUTTON 1001
#define ID_COMMAND_BUTTON 1002
#define ID_POPUP_BUTTON 1003
#define ID_FLYOUT_BUTTON 1004
#define ID_MENU_NEW 2001
#define ID_MENU_OPEN 2002
#define ID_MENU_SAVE 2003
#define ID_MENU_BUILD 2004
#define ID_MENU_SETTINGS 2005
#define ID_FLYOUT_PROJECT 3001
#define ID_FLYOUT_TERMINAL 3002
#define ID_FLYOUT_CLOSE 3003
static HWND s_hMainWindow = NULL;
static HWND s_hSplitButton = NULL;
static HWND s_hCommandButton = NULL;
static HWND s_hPopupButton = NULL;
static HWND s_hFlyoutButton = NULL;
static HWND s_hFlyoutWindow = NULL;
static LRESULT CALLBACK MenuDemo_SubclassProc(
HWND hWnd,
UINT nMessage,
WPARAM wParam,
LPARAM lParam,
UINT_PTR nSubclassId,
DWORD_PTR nReferenceData
);
static LRESULT CALLBACK FlyoutWindowProc(
HWND hWnd,
UINT nMessage,
WPARAM wParam,
LPARAM lParam
);
static void MenuDemo_CreateControls( HWND hParent );
static void MenuDemo_ShowPopupMenu( HWND hOwner, HWND hAnchor );
static void MenuDemo_ShowFlyout( HWND hOwner, HWND hAnchor );
static void MenuDemo_CreateFlyoutWindow( HWND hOwner );
static void MenuDemo_ExecuteCommand( HWND hOwner, UINT nCommand );
static void MenuDemo_SetDefaultFont( HWND hControl );
static POINT MenuDemo_GetControlBottomLeft( HWND hControl );
static void MenuDemo_SetDefaultFont( HWND hControl )
{
HFONT hFont;
hFont = ( HFONT ) GetStockObject( DEFAULT_GUI_FONT );
SendMessage(
hControl,
WM_SETFONT,
( WPARAM ) hFont,
TRUE
);
}
static POINT MenuDemo_GetControlBottomLeft( HWND hControl )
{
RECT rcControl;
POINT ptPosition;
GetWindowRect( hControl, &rcControl );
ptPosition.x = rcControl.left;
ptPosition.y = rcControl.bottom;
return ptPosition;
}
static void MenuDemo_ExecuteCommand( HWND hOwner, UINT nCommand )
{
const char *pszMessage;
pszMessage = NULL;
switch( nCommand )
{
case ID_MENU_NEW:
pszMessage = "Nuevo proyecto";
break;
case ID_MENU_OPEN:
pszMessage = "Abrir proyecto";
break;
case ID_MENU_SAVE:
pszMessage = "Guardar proyecto";
break;
case ID_MENU_BUILD:
pszMessage = "Compilar proyecto";
break;
case ID_MENU_SETTINGS:
pszMessage = "Configuracion";
break;
}
if( pszMessage != NULL )
{
MessageBoxA(
hOwner,
pszMessage,
"Comando seleccionado",
MB_OK | MB_ICONINFORMATION
);
}
}
static void MenuDemo_ShowPopupMenu( HWND hOwner, HWND hAnchor )
{
HMENU hPopupMenu;
POINT ptPosition;
UINT nCommand;
hPopupMenu = CreatePopupMenu();
if( hPopupMenu == NULL )
{
return;
}
AppendMenuA(
hPopupMenu,
MF_STRING,
ID_MENU_NEW,
"Nuevo proyecto"
);
AppendMenuA(
hPopupMenu,
MF_STRING,
ID_MENU_OPEN,
"Abrir proyecto..."
);
AppendMenuA(
hPopupMenu,
MF_SEPARATOR,
0,
NULL
);
AppendMenuA(
hPopupMenu,
MF_STRING,
ID_MENU_SAVE,
"Guardar"
);
AppendMenuA(
hPopupMenu,
MF_STRING,
ID_MENU_BUILD,
"Compilar"
);
AppendMenuA(
hPopupMenu,
MF_SEPARATOR,
0,
NULL
);
AppendMenuA(
hPopupMenu,
MF_STRING,
ID_MENU_SETTINGS,
"Configuracion"
);
ptPosition = MenuDemo_GetControlBottomLeft( hAnchor );
SetForegroundWindow( hOwner );
nCommand = TrackPopupMenuEx(
hPopupMenu,
TPM_LEFTALIGN |
TPM_TOPALIGN |
TPM_LEFTBUTTON |
TPM_RETURNCMD,
ptPosition.x,
ptPosition.y,
hOwner,
NULL
);
PostMessage(
hOwner,
WM_NULL,
0,
0
);
DestroyMenu( hPopupMenu );
if( nCommand != 0 )
{
MenuDemo_ExecuteCommand(
hOwner,
nCommand
);
}
}
static void MenuDemo_CreateFlyoutWindow( HWND hOwner )
{
WNDCLASSEXA WindowClass;
HINSTANCE hInstance;
HWND hLabel;
HWND hProjectButton;
HWND hTerminalButton;
HWND hCloseButton;
if( IsWindow( s_hFlyoutWindow ) )
{
return;
}
hInstance = GetModuleHandle( NULL );
ZeroMemory(
&WindowClass,
sizeof( WindowClass )
);
WindowClass.cbSize = sizeof( WindowClass );
WindowClass.style = CS_HREDRAW | CS_VREDRAW;
WindowClass.lpfnWndProc = FlyoutWindowProc;
WindowClass.hInstance = hInstance;
WindowClass.hCursor = LoadCursor( NULL, IDC_ARROW );
WindowClass.hbrBackground = ( HBRUSH ) ( COLOR_WINDOW + 1 );
WindowClass.lpszClassName = "HMG_WORKSPACE_FLYOUT";
RegisterClassExA( &WindowClass );
s_hFlyoutWindow = CreateWindowExA(
WS_EX_TOOLWINDOW |
WS_EX_TOPMOST |
WS_EX_CONTROLPARENT,
"HMG_WORKSPACE_FLYOUT",
"",
WS_POPUP |
WS_BORDER,
0,
0,
270,
185,
hOwner,
NULL,
hInstance,
NULL
);
if( s_hFlyoutWindow == NULL )
{
return;
}
hLabel = CreateWindowExA(
0,
"STATIC",
"Acciones de Workspace",
WS_CHILD |
WS_VISIBLE,
18,
15,
225,
24,
s_hFlyoutWindow,
NULL,
hInstance,
NULL
);
hProjectButton = CreateWindowExA(
0,
"BUTTON",
"Abrir proyecto",
WS_CHILD |
WS_VISIBLE |
WS_TABSTOP |
BS_PUSHBUTTON,
18,
48,
232,
34,
s_hFlyoutWindow,
( HMENU ) ( INT_PTR ) ID_FLYOUT_PROJECT,
hInstance,
NULL
);
hTerminalButton = CreateWindowExA(
0,
"BUTTON",
"Abrir terminal",
WS_CHILD |
WS_VISIBLE |
WS_TABSTOP |
BS_PUSHBUTTON,
18,
88,
232,
34,
s_hFlyoutWindow,
( HMENU ) ( INT_PTR ) ID_FLYOUT_TERMINAL,
hInstance,
NULL
);
hCloseButton = CreateWindowExA(
0,
"BUTTON",
"Cerrar",
WS_CHILD |
WS_VISIBLE |
WS_TABSTOP |
BS_PUSHBUTTON,
172,
136,
78,
28,
s_hFlyoutWindow,
( HMENU ) ( INT_PTR ) ID_FLYOUT_CLOSE,
hInstance,
NULL
);
MenuDemo_SetDefaultFont( hLabel );
MenuDemo_SetDefaultFont( hProjectButton );
MenuDemo_SetDefaultFont( hTerminalButton );
MenuDemo_SetDefaultFont( hCloseButton );
}
static void MenuDemo_ShowFlyout( HWND hOwner, HWND hAnchor )
{
POINT ptPosition;
MenuDemo_CreateFlyoutWindow( hOwner );
if( ! IsWindow( s_hFlyoutWindow ) )
{
return;
}
ptPosition = MenuDemo_GetControlBottomLeft( hAnchor );
SetWindowPos(
s_hFlyoutWindow,
HWND_TOPMOST,
ptPosition.x,
ptPosition.y + 4,
270,
185,
SWP_SHOWWINDOW
);
ShowWindow(
s_hFlyoutWindow,
SW_SHOWNOACTIVATE
);
SetForegroundWindow( s_hFlyoutWindow );
}
static void MenuDemo_CreateControls( HWND hParent )
{
HINSTANCE hInstance;
hInstance = GetModuleHandle( NULL );
s_hSplitButton = CreateWindowExA(
0,
"BUTTON",
"Compilar",
WS_CHILD |
WS_VISIBLE |
WS_TABSTOP |
BS_SPLITBUTTON,
25,
95,
210,
42,
hParent,
( HMENU ) ( INT_PTR ) ID_SPLIT_BUTTON,
hInstance,
NULL
);
s_hCommandButton = CreateWindowExA(
0,
"BUTTON",
"Abrir Workspace",
WS_CHILD |
WS_VISIBLE |
WS_TABSTOP |
BS_COMMANDLINK,
25,
180,
340,
72,
hParent,
( HMENU ) ( INT_PTR ) ID_COMMAND_BUTTON,
hInstance,
NULL
);
SendMessageW(
s_hCommandButton,
BCM_SETNOTE,
0,
( LPARAM ) L"Seleccionar proyecto, carpeta o configuracion"
);
s_hPopupButton = CreateWindowExA(
0,
"BUTTON",
"Mostrar Popup Menu",
WS_CHILD |
WS_VISIBLE |
WS_TABSTOP |
BS_PUSHBUTTON,
25,
300,
210,
40,
hParent,
( HMENU ) ( INT_PTR ) ID_POPUP_BUTTON,
hInstance,
NULL
);
s_hFlyoutButton = CreateWindowExA(
0,
"BUTTON",
"Mostrar Flyout",
WS_CHILD |
WS_VISIBLE |
WS_TABSTOP |
BS_PUSHBUTTON,
25,
380,
210,
40,
hParent,
( HMENU ) ( INT_PTR ) ID_FLYOUT_BUTTON,
hInstance,
NULL
);
MenuDemo_SetDefaultFont( s_hSplitButton );
MenuDemo_SetDefaultFont( s_hCommandButton );
MenuDemo_SetDefaultFont( s_hPopupButton );
MenuDemo_SetDefaultFont( s_hFlyoutButton );
}
static LRESULT CALLBACK FlyoutWindowProc(
HWND hWnd,
UINT nMessage,
WPARAM wParam,
LPARAM lParam
)
{
switch( nMessage )
{
case WM_COMMAND:
{
UINT nControlId;
nControlId = LOWORD( wParam );
switch( nControlId )
{
case ID_FLYOUT_PROJECT:
MessageBoxA(
s_hMainWindow,
"Abrir proyecto desde el Flyout",
"Flyout",
MB_OK | MB_ICONINFORMATION
);
ShowWindow(
hWnd,
SW_HIDE
);
return 0;
case ID_FLYOUT_TERMINAL:
MessageBoxA(
s_hMainWindow,
"Abrir terminal desde el Flyout",
"Flyout",
MB_OK | MB_ICONINFORMATION
);
ShowWindow(
hWnd,
SW_HIDE
);
return 0;
case ID_FLYOUT_CLOSE:
ShowWindow(
hWnd,
SW_HIDE
);
return 0;
}
break;
}
case WM_ACTIVATE:
{
if( LOWORD( wParam ) == WA_INACTIVE )
{
ShowWindow(
hWnd,
SW_HIDE
);
}
break;
}
case WM_CLOSE:
{
ShowWindow(
hWnd,
SW_HIDE
);
return 0;
}
}
return DefWindowProc(
hWnd,
nMessage,
wParam,
lParam
);
}
static LRESULT CALLBACK MenuDemo_SubclassProc(
HWND hWnd,
UINT nMessage,
WPARAM wParam,
LPARAM lParam,
UINT_PTR nSubclassId,
DWORD_PTR nReferenceData
)
{
HB_SYMBOL_UNUSED( nSubclassId );
HB_SYMBOL_UNUSED( nReferenceData );
switch( nMessage )
{
case WM_NOTIFY:
{
NMHDR *pNotify;
pNotify = ( NMHDR * ) lParam;
if(
pNotify != NULL &&
pNotify->hwndFrom == s_hSplitButton &&
pNotify->code == BCN_DROPDOWN
)
{
MenuDemo_ShowPopupMenu(
hWnd,
s_hSplitButton
);
return 0;
}
break;
}
case WM_COMMAND:
{
UINT nControlId;
UINT nNotifyCode;
nControlId = LOWORD( wParam );
nNotifyCode = HIWORD( wParam );
if( nNotifyCode == BN_CLICKED )
{
switch( nControlId )
{
case ID_SPLIT_BUTTON:
MessageBoxA(
hWnd,
"Accion principal del Split Button: Compilar",
"Split Button",
MB_OK | MB_ICONINFORMATION
);
return 0;
case ID_COMMAND_BUTTON:
MenuDemo_ShowPopupMenu(
hWnd,
s_hCommandButton
);
return 0;
case ID_POPUP_BUTTON:
MenuDemo_ShowPopupMenu(
hWnd,
s_hPopupButton
);
return 0;
case ID_FLYOUT_BUTTON:
MenuDemo_ShowFlyout(
hWnd,
s_hFlyoutButton
);
return 0;
}
}
break;
}
case WM_DESTROY:
{
if( IsWindow( s_hFlyoutWindow ) )
{
DestroyWindow( s_hFlyoutWindow );
s_hFlyoutWindow = NULL;
}
RemoveWindowSubclass(
hWnd,
MenuDemo_SubclassProc,
1
);
break;
}
}
return DefSubclassProc(
hWnd,
nMessage,
wParam,
lParam
);
}
HB_FUNC( NATIVEMENUDEMO_INIT )
{
INITCOMMONCONTROLSEX CommonControls;
HWND hParent;
hParent = ( HWND ) ( HB_PTRUINT ) hb_parnint( 1 );
if( ! IsWindow( hParent ) )
{
hb_retl( HB_FALSE );
return;
}
CommonControls.dwSize = sizeof( CommonControls );
CommonControls.dwICC = ICC_STANDARD_CLASSES;
InitCommonControlsEx( &CommonControls );
s_hMainWindow = hParent;
MenuDemo_CreateControls( hParent );
SetWindowSubclass(
hParent,
MenuDemo_SubclassProc,
1,
0
);
hb_retl( HB_TRUE );
}
#pragma ENDDUMPAttachments
Code: Select all
/*
* MenuButtonsDemo.prg
*
* Ejemplos:
* 1. Split Button -> BS_SPLITBUTTON
* 2. Drop-Down -> BS_COMMANDLINK + men£ agregado manualmente
* 3. Popup Menu -> boton normal + TrackPopupMenuEx
* 4. Flyout -> ventana WS_POPUP personalizada
*
* Compilar:
* hbmk2 MenuButtonsDemo.prg <ruta>\hmg64.hbc -gtgui
*/
#include "hmg.ch"
FUNCTION Main()
DEFINE WINDOW MainWindow AT 0, 0 WIDTH 720 HEIGHT 520 TITLE "HMG - Menus modernos Win32" MAIN ON INIT NativeMenuDemo_Init( GetFormHandle( "MainWindow" ) )
@ 25, 25 LABEL TitleLabel VALUE "Controles de menu para Workspace" WIDTH 500 HEIGHT 30 FONT "Segoe UI" SIZE 15 BOLD
@ 65, 25 LABEL SplitLabel VALUE "1. Split Button: zona principal + flecha independiente" WIDTH 600 HEIGHT 24 FONT "Segoe UI" SIZE 10
@ 150, 25 LABEL CommandLabel VALUE "2. Command Link usado como Drop-Down completo" WIDTH 600 HEIGHT 24 FONT "Segoe UI" SIZE 10
@ 270, 25 LABEL PopupLabel VALUE "3. Bot¢n normal que abre TrackPopupMenuEx" WIDTH 600 HEIGHT 24 FONT "Segoe UI" SIZE 10
@ 350, 25 LABEL FlyoutLabel VALUE "4. Flyout: panel emergente personalizado" WIDTH 600 HEIGHT 24 FONT "Segoe UI" SIZE 10
@ 455, 25 LABEL InfoLabel VALUE "Los cuatro controles inferiores son creados directamente con Win32." WIDTH 650 HEIGHT 24 FONT "Segoe UI" SIZE 9
END WINDOW
CENTER WINDOW MainWindow
ACTIVATE WINDOW MainWindow
RETURN NIL
#pragma BEGINDUMP
#define _WIN32_WINNT 0x0601
#include <windows.h>
#include <commctrl.h>
#include "hbapi.h"
#ifndef BS_SPLITBUTTON
#define BS_SPLITBUTTON 0x0000000CL
#endif
#ifndef BS_COMMANDLINK
#define BS_COMMANDLINK 0x0000000EL
#endif
#ifndef BCN_FIRST
#define BCN_FIRST ( 0U - 1250U )
#endif
#ifndef BCN_DROPDOWN
#define BCN_DROPDOWN ( BCN_FIRST + 0x0002 )
#endif
#ifndef BCM_FIRST
#define BCM_FIRST 0x1600
#endif
#ifndef BCM_SETNOTE
#define BCM_SETNOTE ( BCM_FIRST + 0x0009 )
#endif
#define ID_SPLIT_BUTTON 1001
#define ID_COMMAND_BUTTON 1002
#define ID_POPUP_BUTTON 1003
#define ID_FLYOUT_BUTTON 1004
#define ID_MENU_NEW 2001
#define ID_MENU_OPEN 2002
#define ID_MENU_SAVE 2003
#define ID_MENU_BUILD 2004
#define ID_MENU_SETTINGS 2005
#define ID_FLYOUT_PROJECT 3001
#define ID_FLYOUT_TERMINAL 3002
#define ID_FLYOUT_CLOSE 3003
static HWND s_hMainWindow = NULL;
static HWND s_hSplitButton = NULL;
static HWND s_hCommandButton = NULL;
static HWND s_hPopupButton = NULL;
static HWND s_hFlyoutButton = NULL;
static HWND s_hFlyoutWindow = NULL;
static LRESULT CALLBACK MenuDemo_SubclassProc(
HWND hWnd,
UINT nMessage,
WPARAM wParam,
LPARAM lParam,
UINT_PTR nSubclassId,
DWORD_PTR nReferenceData
);
static LRESULT CALLBACK FlyoutWindowProc(
HWND hWnd,
UINT nMessage,
WPARAM wParam,
LPARAM lParam
);
static void MenuDemo_CreateControls( HWND hParent );
static void MenuDemo_ShowPopupMenu( HWND hOwner, HWND hAnchor );
static void MenuDemo_ShowFlyout( HWND hOwner, HWND hAnchor );
static void MenuDemo_CreateFlyoutWindow( HWND hOwner );
static void MenuDemo_ExecuteCommand( HWND hOwner, UINT nCommand );
static void MenuDemo_SetDefaultFont( HWND hControl );
static POINT MenuDemo_GetControlBottomLeft( HWND hControl );
static void MenuDemo_SetDefaultFont( HWND hControl )
{
HFONT hFont;
hFont = ( HFONT ) GetStockObject( DEFAULT_GUI_FONT );
SendMessage(
hControl,
WM_SETFONT,
( WPARAM ) hFont,
TRUE
);
}
static POINT MenuDemo_GetControlBottomLeft( HWND hControl )
{
RECT rcControl;
POINT ptPosition;
GetWindowRect( hControl, &rcControl );
ptPosition.x = rcControl.left;
ptPosition.y = rcControl.bottom;
return ptPosition;
}
static void MenuDemo_ExecuteCommand( HWND hOwner, UINT nCommand )
{
const char *pszMessage;
pszMessage = NULL;
switch( nCommand )
{
case ID_MENU_NEW:
pszMessage = "Nuevo proyecto";
break;
case ID_MENU_OPEN:
pszMessage = "Abrir proyecto";
break;
case ID_MENU_SAVE:
pszMessage = "Guardar proyecto";
break;
case ID_MENU_BUILD:
pszMessage = "Compilar proyecto";
break;
case ID_MENU_SETTINGS:
pszMessage = "Configuracion";
break;
}
if( pszMessage != NULL )
{
MessageBoxA(
hOwner,
pszMessage,
"Comando seleccionado",
MB_OK | MB_ICONINFORMATION
);
}
}
static void MenuDemo_ShowPopupMenu( HWND hOwner, HWND hAnchor )
{
HMENU hPopupMenu;
POINT ptPosition;
UINT nCommand;
hPopupMenu = CreatePopupMenu();
if( hPopupMenu == NULL )
{
return;
}
AppendMenuA(
hPopupMenu,
MF_STRING,
ID_MENU_NEW,
"Nuevo proyecto"
);
AppendMenuA(
hPopupMenu,
MF_STRING,
ID_MENU_OPEN,
"Abrir proyecto..."
);
AppendMenuA(
hPopupMenu,
MF_SEPARATOR,
0,
NULL
);
AppendMenuA(
hPopupMenu,
MF_STRING,
ID_MENU_SAVE,
"Guardar"
);
AppendMenuA(
hPopupMenu,
MF_STRING,
ID_MENU_BUILD,
"Compilar"
);
AppendMenuA(
hPopupMenu,
MF_SEPARATOR,
0,
NULL
);
AppendMenuA(
hPopupMenu,
MF_STRING,
ID_MENU_SETTINGS,
"Configuracion"
);
ptPosition = MenuDemo_GetControlBottomLeft( hAnchor );
SetForegroundWindow( hOwner );
nCommand = TrackPopupMenuEx(
hPopupMenu,
TPM_LEFTALIGN |
TPM_TOPALIGN |
TPM_LEFTBUTTON |
TPM_RETURNCMD,
ptPosition.x,
ptPosition.y,
hOwner,
NULL
);
PostMessage(
hOwner,
WM_NULL,
0,
0
);
DestroyMenu( hPopupMenu );
if( nCommand != 0 )
{
MenuDemo_ExecuteCommand(
hOwner,
nCommand
);
}
}
static void MenuDemo_CreateFlyoutWindow( HWND hOwner )
{
WNDCLASSEXA WindowClass;
HINSTANCE hInstance;
HWND hLabel;
HWND hProjectButton;
HWND hTerminalButton;
HWND hCloseButton;
if( IsWindow( s_hFlyoutWindow ) )
{
return;
}
hInstance = GetModuleHandle( NULL );
ZeroMemory(
&WindowClass,
sizeof( WindowClass )
);
WindowClass.cbSize = sizeof( WindowClass );
WindowClass.style = CS_HREDRAW | CS_VREDRAW;
WindowClass.lpfnWndProc = FlyoutWindowProc;
WindowClass.hInstance = hInstance;
WindowClass.hCursor = LoadCursor( NULL, IDC_ARROW );
WindowClass.hbrBackground = ( HBRUSH ) ( COLOR_WINDOW + 1 );
WindowClass.lpszClassName = "HMG_WORKSPACE_FLYOUT";
RegisterClassExA( &WindowClass );
s_hFlyoutWindow = CreateWindowExA(
WS_EX_TOOLWINDOW |
WS_EX_TOPMOST |
WS_EX_CONTROLPARENT,
"HMG_WORKSPACE_FLYOUT",
"",
WS_POPUP |
WS_BORDER,
0,
0,
270,
185,
hOwner,
NULL,
hInstance,
NULL
);
if( s_hFlyoutWindow == NULL )
{
return;
}
hLabel = CreateWindowExA(
0,
"STATIC",
"Acciones de Workspace",
WS_CHILD |
WS_VISIBLE,
18,
15,
225,
24,
s_hFlyoutWindow,
NULL,
hInstance,
NULL
);
hProjectButton = CreateWindowExA(
0,
"BUTTON",
"Abrir proyecto",
WS_CHILD |
WS_VISIBLE |
WS_TABSTOP |
BS_PUSHBUTTON,
18,
48,
232,
34,
s_hFlyoutWindow,
( HMENU ) ( INT_PTR ) ID_FLYOUT_PROJECT,
hInstance,
NULL
);
hTerminalButton = CreateWindowExA(
0,
"BUTTON",
"Abrir terminal",
WS_CHILD |
WS_VISIBLE |
WS_TABSTOP |
BS_PUSHBUTTON,
18,
88,
232,
34,
s_hFlyoutWindow,
( HMENU ) ( INT_PTR ) ID_FLYOUT_TERMINAL,
hInstance,
NULL
);
hCloseButton = CreateWindowExA(
0,
"BUTTON",
"Cerrar",
WS_CHILD |
WS_VISIBLE |
WS_TABSTOP |
BS_PUSHBUTTON,
172,
136,
78,
28,
s_hFlyoutWindow,
( HMENU ) ( INT_PTR ) ID_FLYOUT_CLOSE,
hInstance,
NULL
);
MenuDemo_SetDefaultFont( hLabel );
MenuDemo_SetDefaultFont( hProjectButton );
MenuDemo_SetDefaultFont( hTerminalButton );
MenuDemo_SetDefaultFont( hCloseButton );
}
static void MenuDemo_ShowFlyout( HWND hOwner, HWND hAnchor )
{
POINT ptPosition;
MenuDemo_CreateFlyoutWindow( hOwner );
if( ! IsWindow( s_hFlyoutWindow ) )
{
return;
}
ptPosition = MenuDemo_GetControlBottomLeft( hAnchor );
SetWindowPos(
s_hFlyoutWindow,
HWND_TOPMOST,
ptPosition.x,
ptPosition.y + 4,
270,
185,
SWP_SHOWWINDOW
);
ShowWindow(
s_hFlyoutWindow,
SW_SHOWNOACTIVATE
);
SetForegroundWindow( s_hFlyoutWindow );
}
static void MenuDemo_CreateControls( HWND hParent )
{
HINSTANCE hInstance;
hInstance = GetModuleHandle( NULL );
s_hSplitButton = CreateWindowExA(
0,
"BUTTON",
"Compilar",
WS_CHILD |
WS_VISIBLE |
WS_TABSTOP |
BS_SPLITBUTTON,
25,
95,
210,
42,
hParent,
( HMENU ) ( INT_PTR ) ID_SPLIT_BUTTON,
hInstance,
NULL
);
s_hCommandButton = CreateWindowExA(
0,
"BUTTON",
"Abrir Workspace",
WS_CHILD |
WS_VISIBLE |
WS_TABSTOP |
BS_COMMANDLINK,
25,
180,
340,
72,
hParent,
( HMENU ) ( INT_PTR ) ID_COMMAND_BUTTON,
hInstance,
NULL
);
SendMessageW(
s_hCommandButton,
BCM_SETNOTE,
0,
( LPARAM ) L"Seleccionar proyecto, carpeta o configuracion"
);
s_hPopupButton = CreateWindowExA(
0,
"BUTTON",
"Mostrar Popup Menu",
WS_CHILD |
WS_VISIBLE |
WS_TABSTOP |
BS_PUSHBUTTON,
25,
300,
210,
40,
hParent,
( HMENU ) ( INT_PTR ) ID_POPUP_BUTTON,
hInstance,
NULL
);
s_hFlyoutButton = CreateWindowExA(
0,
"BUTTON",
"Mostrar Flyout",
WS_CHILD |
WS_VISIBLE |
WS_TABSTOP |
BS_PUSHBUTTON,
25,
380,
210,
40,
hParent,
( HMENU ) ( INT_PTR ) ID_FLYOUT_BUTTON,
hInstance,
NULL
);
MenuDemo_SetDefaultFont( s_hSplitButton );
MenuDemo_SetDefaultFont( s_hCommandButton );
MenuDemo_SetDefaultFont( s_hPopupButton );
MenuDemo_SetDefaultFont( s_hFlyoutButton );
}
static LRESULT CALLBACK FlyoutWindowProc(
HWND hWnd,
UINT nMessage,
WPARAM wParam,
LPARAM lParam
)
{
switch( nMessage )
{
case WM_COMMAND:
{
UINT nControlId;
nControlId = LOWORD( wParam );
switch( nControlId )
{
case ID_FLYOUT_PROJECT:
MessageBoxA(
s_hMainWindow,
"Abrir proyecto desde el Flyout",
"Flyout",
MB_OK | MB_ICONINFORMATION
);
ShowWindow(
hWnd,
SW_HIDE
);
return 0;
case ID_FLYOUT_TERMINAL:
MessageBoxA(
s_hMainWindow,
"Abrir terminal desde el Flyout",
"Flyout",
MB_OK | MB_ICONINFORMATION
);
ShowWindow(
hWnd,
SW_HIDE
);
return 0;
case ID_FLYOUT_CLOSE:
ShowWindow(
hWnd,
SW_HIDE
);
return 0;
}
break;
}
case WM_ACTIVATE:
{
if( LOWORD( wParam ) == WA_INACTIVE )
{
ShowWindow(
hWnd,
SW_HIDE
);
}
break;
}
case WM_CLOSE:
{
ShowWindow(
hWnd,
SW_HIDE
);
return 0;
}
}
return DefWindowProc(
hWnd,
nMessage,
wParam,
lParam
);
}
static LRESULT CALLBACK MenuDemo_SubclassProc(
HWND hWnd,
UINT nMessage,
WPARAM wParam,
LPARAM lParam,
UINT_PTR nSubclassId,
DWORD_PTR nReferenceData
)
{
HB_SYMBOL_UNUSED( nSubclassId );
HB_SYMBOL_UNUSED( nReferenceData );
switch( nMessage )
{
case WM_NOTIFY:
{
NMHDR *pNotify;
pNotify = ( NMHDR * ) lParam;
if(
pNotify != NULL &&
pNotify->hwndFrom == s_hSplitButton &&
pNotify->code == BCN_DROPDOWN
)
{
MenuDemo_ShowPopupMenu(
hWnd,
s_hSplitButton
);
return 0;
}
break;
}
case WM_COMMAND:
{
UINT nControlId;
UINT nNotifyCode;
nControlId = LOWORD( wParam );
nNotifyCode = HIWORD( wParam );
if( nNotifyCode == BN_CLICKED )
{
switch( nControlId )
{
case ID_SPLIT_BUTTON:
MessageBoxA(
hWnd,
"Accion principal del Split Button: Compilar",
"Split Button",
MB_OK | MB_ICONINFORMATION
);
return 0;
case ID_COMMAND_BUTTON:
MenuDemo_ShowPopupMenu(
hWnd,
s_hCommandButton
);
return 0;
case ID_POPUP_BUTTON:
MenuDemo_ShowPopupMenu(
hWnd,
s_hPopupButton
);
return 0;
case ID_FLYOUT_BUTTON:
MenuDemo_ShowFlyout(
hWnd,
s_hFlyoutButton
);
return 0;
}
}
break;
}
case WM_DESTROY:
{
if( IsWindow( s_hFlyoutWindow ) )
{
DestroyWindow( s_hFlyoutWindow );
s_hFlyoutWindow = NULL;
}
RemoveWindowSubclass(
hWnd,
MenuDemo_SubclassProc,
1
);
break;
}
}
return DefSubclassProc(
hWnd,
nMessage,
wParam,
lParam
);
}
HB_FUNC( NATIVEMENUDEMO_INIT )
{
INITCOMMONCONTROLSEX CommonControls;
HWND hParent;
hParent = ( HWND ) ( HB_PTRUINT ) hb_parnint( 1 );
if( ! IsWindow( hParent ) )
{
hb_retl( HB_FALSE );
return;
}
CommonControls.dwSize = sizeof( CommonControls );
CommonControls.dwICC = ICC_STANDARD_CLASSES;
InitCommonControlsEx( &CommonControls );
s_hMainWindow = hParent;
MenuDemo_CreateControls( hParent );
SetWindowSubclass(
hParent,
MenuDemo_SubclassProc,
1,
0
);
hb_retl( HB_TRUE );
}
#pragma ENDDUMPAttachments
Code: Select all
CD c:\Temp\VLCusarC:\Users\danie>cd c:\Temp\vlc
Code: Select all
setpath.batdespuesc:\Temp\VLC>setpath
=== CONFIGURAR RUTAS ===
HB_HOME=C:\hmg.3.6\harbour64
MINGW_HOME=C:\hmg.3.6\mingw64
HMG_HOME=C:\hmg.3.6
=== OPCIONES DE COMPILACIÓN ===
INCLUDES=-IC:\hmg.3.6\harbour64\include
LIBPATHS=-LC:\hmg.3.6\harbour64\lib\win\mingw64
=== ACTUALIZAR PATH 'solo si no está ya' ===
Code: Select all
Compile.batno debe haber problemas de compilacionhbmk2: Harbour: Compilando módulos...
Harbour 3.2.0dev (r2510040809)
Copyright (c) 1999-2025, https://harbour.github.io/
Compiling 'Cliente.prg'...
Lines 262, Functions/Procedures 1
Generating C source output to '.hbmk\win\mingw64\Cliente.c'... Done.
Compiling 'VLC.prg'...
Lines 1026, Functions/Procedures 21
Generating C source output to '.hbmk\win\mingw64\VLC.c'... Done.
Compiling 'Bridge.prg'...
Lines 1089, Functions/Procedures 0
Generating C source output to '.hbmk\win\mingw64\Bridge.c'... Done.
hbmk2: Compilando...
hbmk2: Enlazando... Cliente.exe
Code: Select all
Cliente.exeAttachments
Code: Select all
CD c:\Temp\VLCusarC:\Users\danie>cd c:\Temp\vlc
Code: Select all
setpath.batdespuesc:\Temp\VLC>setpath
=== CONFIGURAR RUTAS ===
HB_HOME=C:\hmg.3.6\harbour64
MINGW_HOME=C:\hmg.3.6\mingw64
HMG_HOME=C:\hmg.3.6
=== OPCIONES DE COMPILACIÓN ===
INCLUDES=-IC:\hmg.3.6\harbour64\include
LIBPATHS=-LC:\hmg.3.6\harbour64\lib\win\mingw64
=== ACTUALIZAR PATH 'solo si no está ya' ===
Code: Select all
Compile.batno debe haber problemas de compilacionhbmk2: Harbour: Compilando módulos...
Harbour 3.2.0dev (r2510040809)
Copyright (c) 1999-2025, https://harbour.github.io/
Compiling 'Cliente.prg'...
Lines 262, Functions/Procedures 1
Generating C source output to '.hbmk\win\mingw64\Cliente.c'... Done.
Compiling 'VLC.prg'...
Lines 1026, Functions/Procedures 21
Generating C source output to '.hbmk\win\mingw64\VLC.c'... Done.
Compiling 'Bridge.prg'...
Lines 1089, Functions/Procedures 0
Generating C source output to '.hbmk\win\mingw64\Bridge.c'... Done.
hbmk2: Compilando...
hbmk2: Enlazando... Cliente.exe
Code: Select all
Cliente.exeAttachments
Attachments
Attachments
Code: Select all
@ 10, 662 TEXTBOX txtSearch ;
WIDTH 380 ;
HEIGHT 30 ;
LABEL "Buscar" ;
LABELPOS LEFT ;
LABELWIDTH 62 ;
PLACEHOLDER "funcion, clase, etiqueta html o archivo" ;
MODERN ;
TOOLTIP "Modern textbox: integrated Label, Placeholder and Modern Tooltip." ;
ON CHANGE ModernTitle( "search=" + GetProperty( "MainWin", "txtSearch", "Value" ) )
DEFINE TREE trProject ;
AT nBodyTop, 14 ;
WIDTH nLeftW ;
HEIGHT nTreeH ;
VALUE 1 ;
FONT "Segoe UI" ;
SIZE 10 ;
TOOLTIP "Double-click a document node to view its content in Scintilla." ;
ON CHANGE ModernTitle( "tree item=" + hb_NToS( GetProperty( "MainWin", "trProject", "Value" ) ) ) ;
ON DBLCLICK WorkspaceOpenFromTree() ;
NODEIMAGES { "TreeFolderClosed", "TreeFolderOpen" } ITEMIMAGES { "TreeDoc", "TreeDoc" } ;
ITEMIDS ;
MODERN
NODE "Workspace.ws.es.md" IMAGES { "TreeProject", "TreeProject" } ID 100 BACKCOLOR { 219, 232, 255 } FONTCOLOR { 48, 96, 192 } SIZE 9 BOLD
NODE "Archivo para prueba de extensiones" ID 190 BACKCOLOR { 240, 253, 244 } FONTCOLOR { 22, 101, 52 } SIZE 10 BOLD
NODE "Sources" ID 200 BACKCOLOR { 218, 244, 234 } FONTCOLOR { 16, 144, 96 } SIZE 10 BOLD
TREEITEM "workspace.prg" IMAGES { "TreeCode", "TreeCode" } ID 201 BACKCOLOR { 235, 250, 243 } FONTCOLOR { 16, 144, 96 }
TREEITEM "native_control.c" IMAGES { "TreeCode", "TreeCode" } ID 202 BACKCOLOR { 235, 250, 243 } FONTCOLOR { 16, 144, 96 }
TREEITEM "workspace_panel.cpp" IMAGES { "TreeCode", "TreeCode" } ID 203 BACKCOLOR { 235, 250, 243 } FONTCOLOR { 16, 144, 96 }
TREEITEM "workspace_api.h" IMAGES { "TreeCode", "TreeCode" } ID 204 BACKCOLOR { 235, 250, 243 } FONTCOLOR { 16, 144, 96 }
END NODE
NODE "Web" ID 300 BACKCOLOR { 219, 232, 255 } FONTCOLOR { 48, 96, 192 } SIZE 10 BOLD
TREEITEM "index.html" IMAGES { "TreeWeb", "TreeWeb" } ID 301 BACKCOLOR { 238, 244, 255 } FONTCOLOR { 48, 96, 192 }
TREEITEM "workspace_settings.json" IMAGES { "TreeConfig", "TreeConfig" } ID 302 BACKCOLOR { 238, 244, 255 } FONTCOLOR { 48, 96, 192 }
TREEITEM "workspace.ini" IMAGES { "TreeConfig", "TreeConfig" } ID 303 BACKCOLOR { 238, 244, 255 } FONTCOLOR { 48, 96, 192 }
END NODE
END NODE
NODE "Proyecto" ID 780 BACKCOLOR { 219, 232, 255 } FONTCOLOR { 37, 99, 235 } SIZE 10 BOLD
END NODE
NODE "Conocimiento importado" ID 800 BACKCOLOR { 245, 241, 249 } FONTCOLOR { 124, 58, 237 } SIZE 10 BOLD
END NODE
NODE "Explorador Workspace" ID 850 BACKCOLOR { 239, 246, 255 } FONTCOLOR { 29, 78, 216 } SIZE 10 BOLD
END NODE
NODE "Documentos Workspace Foundation" ID 590 BACKCOLOR { 219, 232, 255 } FONTCOLOR { 48, 96, 192 } SIZE 10 BOLD
NODE "Constitution" ID 600 BACKCOLOR { 235, 229, 242 } FONTCOLOR { 64, 32, 96 } SIZE 10 BOLD
TREEITEM "00_PROJECT_CHARTER.md" IMAGES { "TreeDoc", "TreeDoc" } ID 601 FONTCOLOR { 64, 32, 96 }
TREEITEM "01_VISION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 602 FONTCOLOR { 64, 32, 96 }
TREEITEM "02_WORKSPACE_PHILOSOPHY.md" IMAGES { "TreeDoc", "TreeDoc" } ID 603 FONTCOLOR { 64, 32, 96 }
TREEITEM "03_WORKSPACE_MODEL_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 604 FONTCOLOR { 64, 32, 96 }
TREEITEM "04_WORKSPACE_EVENT_SYSTEM.md" IMAGES { "TreeDoc", "TreeDoc" } ID 605 FONTCOLOR { 64, 32, 96 }
TREEITEM "05_WORKSPACE_SERVICES.md" IMAGES { "TreeDoc", "TreeDoc" } ID 606 FONTCOLOR { 64, 32, 96 }
TREEITEM "06_WORKSPACE_KERNEL.md" IMAGES { "TreeDoc", "TreeDoc" } ID 607 FONTCOLOR { 64, 32, 96 }
TREEITEM "07_SYSTEM_ARCHITECTURE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 608 FONTCOLOR { 64, 32, 96 }
END NODE
NODE "Architecture" ID 700 BACKCOLOR { 235, 229, 242 } FONTCOLOR { 64, 32, 96 } SIZE 10 BOLD
NODE "Workspace Services" ID 710 BACKCOLOR { 245, 241, 249 } FONTCOLOR { 64, 32, 96 } SIZE 9 BOLD
TREEITEM "Workspace.ws.md" IMAGES { "TreeDoc", "TreeDoc" } ID 711 FONTCOLOR { 64, 32, 96 } BOLD
TREEITEM "INFOPOPUP_SERVICE_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 712 FONTCOLOR { 64, 32, 96 }
TREEITEM "MODERN_RENDERING_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 713 FONTCOLOR { 64, 32, 96 }
TREEITEM "WORKSPACE_COMMAND_SEARCH_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 714 FONTCOLOR { 64, 32, 96 }
TREEITEM "WORKSPACE_FILE_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 715 FONTCOLOR { 64, 32, 96 }
TREEITEM "WORKSPACE_VISUAL_LANGUAGE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 716 FONTCOLOR { 64, 32, 96 }
END NODE
NODE "Diagnostics" ID 730 BACKCOLOR { 245, 241, 249 } FONTCOLOR { 64, 32, 96 } SIZE 9 BOLD
TREEITEM "WORKSPACE_DIAGNOSTIC_SERVICE_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 731 FONTCOLOR { 64, 32, 96 } BOLD
TREEITEM "WORKSPACE_DIAGNOSTIC_SERVICE_IMPLEMENTATION_MILESTONE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 732 FONTCOLOR { 64, 32, 96 }
TREEITEM "WORKSPACE_DIAGNOSTIC_KERNEL_INTEGRATION_MILESTONE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 733 FONTCOLOR { 64, 32, 96 }
TREEITEM "WORKSPACE_BUILD_DIAGNOSTIC_COORDINATOR_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 734 FONTCOLOR { 64, 32, 96 } BOLD
TREEITEM "WORKSPACE_BUILD_DIAGNOSTIC_COORDINATOR_IMPLEMENTATION_MILESTONE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 735 FONTCOLOR { 64, 32, 96 }
TREEITEM "INFOPOPUP_DIAGNOSTIC_IMPLEMENTATION_MILESTONE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 736 FONTCOLOR { 64, 32, 96 }
END NODE
NODE "Build Services" ID 720 BACKCOLOR { 245, 241, 249 } FONTCOLOR { 64, 32, 96 } SIZE 9 BOLD
TREEITEM "08_WORKSPACE_BUILD_SERVICE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 721 FONTCOLOR { 64, 32, 96 }
TREEITEM "09_WORKSPACE_BUILD_ARCHITECTURE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 722 FONTCOLOR { 64, 32, 96 }
TREEITEM "10_WORKSPACE_BUILD_ENGINE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 723 FONTCOLOR { 64, 32, 96 }
TREEITEM "11_HARBOUR_TOOLCHAIN_PROVIDER.md" IMAGES { "TreeDoc", "TreeDoc" } ID 724 FONTCOLOR { 64, 32, 96 }
TREEITEM "12_TOOLCHAIN_PROVIDER_ARCHITECTURE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 725 FONTCOLOR { 64, 32, 96 }
TREEITEM "13_BUILD_PLANNER_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 726 FONTCOLOR { 64, 32, 96 }
TREEITEM "14_BUILD_PLAN_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 727 FONTCOLOR { 64, 32, 96 }
TREEITEM "15_BUILD_OPERATION_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 728 FONTCOLOR { 64, 32, 96 }
TREEITEM "16_BUILD_PIPELINE_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 729 FONTCOLOR { 64, 32, 96 }
END NODE
END NODE
END NODE
END NODE
END TREEAttachments
Code: Select all
@ 10, 662 TEXTBOX txtSearch ;
WIDTH 380 ;
HEIGHT 30 ;
LABEL "Buscar" ;
LABELPOS LEFT ;
LABELWIDTH 62 ;
PLACEHOLDER "funcion, clase, etiqueta html o archivo" ;
MODERN ;
TOOLTIP "Modern textbox: integrated Label, Placeholder and Modern Tooltip." ;
ON CHANGE ModernTitle( "search=" + GetProperty( "MainWin", "txtSearch", "Value" ) )
DEFINE TREE trProject ;
AT nBodyTop, 14 ;
WIDTH nLeftW ;
HEIGHT nTreeH ;
VALUE 1 ;
FONT "Segoe UI" ;
SIZE 10 ;
TOOLTIP "Double-click a document node to view its content in Scintilla." ;
ON CHANGE ModernTitle( "tree item=" + hb_NToS( GetProperty( "MainWin", "trProject", "Value" ) ) ) ;
ON DBLCLICK WorkspaceOpenFromTree() ;
NODEIMAGES { "TreeFolderClosed", "TreeFolderOpen" } ITEMIMAGES { "TreeDoc", "TreeDoc" } ;
ITEMIDS ;
MODERN
NODE "Workspace.ws.es.md" IMAGES { "TreeProject", "TreeProject" } ID 100 BACKCOLOR { 219, 232, 255 } FONTCOLOR { 48, 96, 192 } SIZE 9 BOLD
NODE "Archivo para prueba de extensiones" ID 190 BACKCOLOR { 240, 253, 244 } FONTCOLOR { 22, 101, 52 } SIZE 10 BOLD
NODE "Sources" ID 200 BACKCOLOR { 218, 244, 234 } FONTCOLOR { 16, 144, 96 } SIZE 10 BOLD
TREEITEM "workspace.prg" IMAGES { "TreeCode", "TreeCode" } ID 201 BACKCOLOR { 235, 250, 243 } FONTCOLOR { 16, 144, 96 }
TREEITEM "native_control.c" IMAGES { "TreeCode", "TreeCode" } ID 202 BACKCOLOR { 235, 250, 243 } FONTCOLOR { 16, 144, 96 }
TREEITEM "workspace_panel.cpp" IMAGES { "TreeCode", "TreeCode" } ID 203 BACKCOLOR { 235, 250, 243 } FONTCOLOR { 16, 144, 96 }
TREEITEM "workspace_api.h" IMAGES { "TreeCode", "TreeCode" } ID 204 BACKCOLOR { 235, 250, 243 } FONTCOLOR { 16, 144, 96 }
END NODE
NODE "Web" ID 300 BACKCOLOR { 219, 232, 255 } FONTCOLOR { 48, 96, 192 } SIZE 10 BOLD
TREEITEM "index.html" IMAGES { "TreeWeb", "TreeWeb" } ID 301 BACKCOLOR { 238, 244, 255 } FONTCOLOR { 48, 96, 192 }
TREEITEM "workspace_settings.json" IMAGES { "TreeConfig", "TreeConfig" } ID 302 BACKCOLOR { 238, 244, 255 } FONTCOLOR { 48, 96, 192 }
TREEITEM "workspace.ini" IMAGES { "TreeConfig", "TreeConfig" } ID 303 BACKCOLOR { 238, 244, 255 } FONTCOLOR { 48, 96, 192 }
END NODE
END NODE
NODE "Proyecto" ID 780 BACKCOLOR { 219, 232, 255 } FONTCOLOR { 37, 99, 235 } SIZE 10 BOLD
END NODE
NODE "Conocimiento importado" ID 800 BACKCOLOR { 245, 241, 249 } FONTCOLOR { 124, 58, 237 } SIZE 10 BOLD
END NODE
NODE "Explorador Workspace" ID 850 BACKCOLOR { 239, 246, 255 } FONTCOLOR { 29, 78, 216 } SIZE 10 BOLD
END NODE
NODE "Documentos Workspace Foundation" ID 590 BACKCOLOR { 219, 232, 255 } FONTCOLOR { 48, 96, 192 } SIZE 10 BOLD
NODE "Constitution" ID 600 BACKCOLOR { 235, 229, 242 } FONTCOLOR { 64, 32, 96 } SIZE 10 BOLD
TREEITEM "00_PROJECT_CHARTER.md" IMAGES { "TreeDoc", "TreeDoc" } ID 601 FONTCOLOR { 64, 32, 96 }
TREEITEM "01_VISION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 602 FONTCOLOR { 64, 32, 96 }
TREEITEM "02_WORKSPACE_PHILOSOPHY.md" IMAGES { "TreeDoc", "TreeDoc" } ID 603 FONTCOLOR { 64, 32, 96 }
TREEITEM "03_WORKSPACE_MODEL_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 604 FONTCOLOR { 64, 32, 96 }
TREEITEM "04_WORKSPACE_EVENT_SYSTEM.md" IMAGES { "TreeDoc", "TreeDoc" } ID 605 FONTCOLOR { 64, 32, 96 }
TREEITEM "05_WORKSPACE_SERVICES.md" IMAGES { "TreeDoc", "TreeDoc" } ID 606 FONTCOLOR { 64, 32, 96 }
TREEITEM "06_WORKSPACE_KERNEL.md" IMAGES { "TreeDoc", "TreeDoc" } ID 607 FONTCOLOR { 64, 32, 96 }
TREEITEM "07_SYSTEM_ARCHITECTURE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 608 FONTCOLOR { 64, 32, 96 }
END NODE
NODE "Architecture" ID 700 BACKCOLOR { 235, 229, 242 } FONTCOLOR { 64, 32, 96 } SIZE 10 BOLD
NODE "Workspace Services" ID 710 BACKCOLOR { 245, 241, 249 } FONTCOLOR { 64, 32, 96 } SIZE 9 BOLD
TREEITEM "Workspace.ws.md" IMAGES { "TreeDoc", "TreeDoc" } ID 711 FONTCOLOR { 64, 32, 96 } BOLD
TREEITEM "INFOPOPUP_SERVICE_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 712 FONTCOLOR { 64, 32, 96 }
TREEITEM "MODERN_RENDERING_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 713 FONTCOLOR { 64, 32, 96 }
TREEITEM "WORKSPACE_COMMAND_SEARCH_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 714 FONTCOLOR { 64, 32, 96 }
TREEITEM "WORKSPACE_FILE_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 715 FONTCOLOR { 64, 32, 96 }
TREEITEM "WORKSPACE_VISUAL_LANGUAGE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 716 FONTCOLOR { 64, 32, 96 }
END NODE
NODE "Diagnostics" ID 730 BACKCOLOR { 245, 241, 249 } FONTCOLOR { 64, 32, 96 } SIZE 9 BOLD
TREEITEM "WORKSPACE_DIAGNOSTIC_SERVICE_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 731 FONTCOLOR { 64, 32, 96 } BOLD
TREEITEM "WORKSPACE_DIAGNOSTIC_SERVICE_IMPLEMENTATION_MILESTONE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 732 FONTCOLOR { 64, 32, 96 }
TREEITEM "WORKSPACE_DIAGNOSTIC_KERNEL_INTEGRATION_MILESTONE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 733 FONTCOLOR { 64, 32, 96 }
TREEITEM "WORKSPACE_BUILD_DIAGNOSTIC_COORDINATOR_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 734 FONTCOLOR { 64, 32, 96 } BOLD
TREEITEM "WORKSPACE_BUILD_DIAGNOSTIC_COORDINATOR_IMPLEMENTATION_MILESTONE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 735 FONTCOLOR { 64, 32, 96 }
TREEITEM "INFOPOPUP_DIAGNOSTIC_IMPLEMENTATION_MILESTONE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 736 FONTCOLOR { 64, 32, 96 }
END NODE
NODE "Build Services" ID 720 BACKCOLOR { 245, 241, 249 } FONTCOLOR { 64, 32, 96 } SIZE 9 BOLD
TREEITEM "08_WORKSPACE_BUILD_SERVICE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 721 FONTCOLOR { 64, 32, 96 }
TREEITEM "09_WORKSPACE_BUILD_ARCHITECTURE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 722 FONTCOLOR { 64, 32, 96 }
TREEITEM "10_WORKSPACE_BUILD_ENGINE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 723 FONTCOLOR { 64, 32, 96 }
TREEITEM "11_HARBOUR_TOOLCHAIN_PROVIDER.md" IMAGES { "TreeDoc", "TreeDoc" } ID 724 FONTCOLOR { 64, 32, 96 }
TREEITEM "12_TOOLCHAIN_PROVIDER_ARCHITECTURE.md" IMAGES { "TreeDoc", "TreeDoc" } ID 725 FONTCOLOR { 64, 32, 96 }
TREEITEM "13_BUILD_PLANNER_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 726 FONTCOLOR { 64, 32, 96 }
TREEITEM "14_BUILD_PLAN_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 727 FONTCOLOR { 64, 32, 96 }
TREEITEM "15_BUILD_OPERATION_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 728 FONTCOLOR { 64, 32, 96 }
TREEITEM "16_BUILD_PIPELINE_SPECIFICATION.md" IMAGES { "TreeDoc", "TreeDoc" } ID 729 FONTCOLOR { 64, 32, 96 }
END NODE
END NODE
END NODE
END NODE
END TREEAttachments
Attachments
Workspace.es.rar (2976.12 KiB)Attachments
Workspace.es.rar (2976.12 KiB)Attachments
Attachments
Attachments
Attachments
Attachments
Attachments
Attachments
Attachments
Attachments
Attachments
Code: Select all
#define Modern
#include 'hmg.chCode: Select all
#define Modern
#include 'hmg.ch'Attachments
Code: Select all
#define Modern
#include 'hmg.chCode: Select all
#define Modern
#include 'hmg.ch'Attachments
Attachments
Attachments
La diferencia práctica es esta:Proyecto
app.hbp
source\main.prg
source\window.prg
source\native_winapi.c
source\editor_bridge.cpp
Harbour 3.2.1dev (r2607071005)
gcc (x86_64-posix-seh-rev1, Built by MinGW-Builds project) 16.1.0
g++ (x86_64-posix-seh-rev1, Built by MinGW-Builds project) 16.1.0
Attachments
La diferencia práctica es esta:Proyecto
app.hbp
source\main.prg
source\window.prg
source\native_winapi.c
source\editor_bridge.cpp
Harbour 3.2.1dev (r2607071005)
gcc (x86_64-posix-seh-rev1, Built by MinGW-Builds project) 16.1.0
g++ (x86_64-posix-seh-rev1, Built by MinGW-Builds project) 16.1.0
Attachments
Attachments
Attachments
https://github.com/harbour/core/blob/ma ... bmk2.en.mdAn HRB file (.hrb) is a Harbour Portable Binary file. It contains precompiled portable p-code and symbol tables generated by the Harbour Compiler. Think of it as a compiled script or modular component that runs across different operating systems without OS-specific binary code.
Key CharacteristicsPortable Binary: Contains intermediate byte-code (p-code) rather than native machine code.Modular Updates: Allows developers to ship single updated program routines rather than recompiling and sending a full monolithic executable.
Dynamic Execution: Can be loaded, executed, or queried at runtime using Harbour's interpreter tools.
How to Use HRB Files
Creation: Compile a source file into an HRB binary via the command line using hbmk2 -gh file.prg or harbour file.prg /gh.
Execution: Run the portable binary directly using the Harbour runner tool via hbrun file.hrb.
Integration: Main programs can load .hrb files dynamically during execution to call isolated functions or modules.
https://github.com/harbour/core/blob/ma ... bmk2.en.mdAn HRB file (.hrb) is a Harbour Portable Binary file. It contains precompiled portable p-code and symbol tables generated by the Harbour Compiler. Think of it as a compiled script or modular component that runs across different operating systems without OS-specific binary code.
Key CharacteristicsPortable Binary: Contains intermediate byte-code (p-code) rather than native machine code.Modular Updates: Allows developers to ship single updated program routines rather than recompiling and sending a full monolithic executable.
Dynamic Execution: Can be loaded, executed, or queried at runtime using Harbour's interpreter tools.
How to Use HRB Files
Creation: Compile a source file into an HRB binary via the command line using hbmk2 -gh file.prg or harbour file.prg /gh.
Execution: Run the portable binary directly using the Harbour runner tool via hbrun file.hrb.
Integration: Main programs can load .hrb files dynamically during execution to call isolated functions or modules.
Attachments
Attachments