You can subscribe to this list here.
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
(12) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(24) |
Aug
(17) |
Sep
(31) |
Oct
(1) |
Nov
(9) |
Dec
(46) |
2013 |
Jan
(8) |
Feb
(13) |
Mar
(11) |
Apr
(13) |
May
(27) |
Jun
(64) |
Jul
(59) |
Aug
(2) |
Sep
(5) |
Oct
(5) |
Nov
(13) |
Dec
(5) |
2014 |
Jan
(8) |
Feb
(7) |
Mar
|
Apr
(25) |
May
(22) |
Jun
(9) |
Jul
(16) |
Aug
|
Sep
(2) |
Oct
(27) |
Nov
|
Dec
(75) |
2015 |
Jan
(21) |
Feb
(8) |
Mar
(1) |
Apr
(36) |
May
(42) |
Jun
(58) |
Jul
(26) |
Aug
(13) |
Sep
(5) |
Oct
|
Nov
(7) |
Dec
(15) |
2016 |
Jan
(20) |
Feb
(12) |
Mar
|
Apr
|
May
|
Jun
(10) |
Jul
(8) |
Aug
(29) |
Sep
(42) |
Oct
(11) |
Nov
(3) |
Dec
(1) |
2017 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2018 |
Jan
(4) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(14) |
Sep
(13) |
Oct
(13) |
Nov
(32) |
Dec
(47) |
2019 |
Jan
(10) |
Feb
(9) |
Mar
|
Apr
(5) |
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
(7) |
Oct
|
Nov
|
Dec
(7) |
2020 |
Jan
(2) |
Feb
|
Mar
(14) |
Apr
(12) |
May
(13) |
Jun
(10) |
Jul
(6) |
Aug
(11) |
Sep
(14) |
Oct
(9) |
Nov
(10) |
Dec
(14) |
2021 |
Jan
(11) |
Feb
(16) |
Mar
(15) |
Apr
(20) |
May
(13) |
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
(14) |
Nov
(4) |
Dec
(5) |
2022 |
Jan
(14) |
Feb
(12) |
Mar
(2) |
Apr
(2) |
May
(7) |
Jun
(16) |
Jul
(8) |
Aug
(12) |
Sep
(10) |
Oct
(14) |
Nov
(23) |
Dec
(17) |
2023 |
Jan
(9) |
Feb
|
Mar
|
Apr
(4) |
May
(8) |
Jun
|
Jul
(29) |
Aug
(43) |
Sep
(32) |
Oct
(28) |
Nov
(27) |
Dec
(27) |
2024 |
Jan
(5) |
Feb
(11) |
Mar
(2) |
Apr
|
May
(3) |
Jun
|
Jul
(3) |
Aug
(10) |
Sep
(7) |
Oct
(6) |
Nov
(10) |
Dec
(7) |
2025 |
Jan
(19) |
Feb
(14) |
Mar
(12) |
Apr
(21) |
May
(3) |
Jun
(7) |
Jul
(2) |
Aug
(8) |
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1
|
2
(3) |
3
(8) |
4
(8) |
5
|
6
(1) |
7
(1) |
8
|
9
(2) |
10
|
11
|
12
|
13
|
14
|
15
|
16
(1) |
17
|
18
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
30
|
31
|
|
|
|
|
From: <LF...@us...> - 2012-07-16 17:19:55
|
Revision: 1859 http://hwgui.svn.sourceforge.net/hwgui/?rev=1859&view=rev Author: LFBASSO Date: 2012-07-16 17:19:49 +0000 (Mon, 16 Jul 2012) Log Message: ----------- 2012-07-164 14:10 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/hcheck.prg * METHOD OnEvent ! minor fix * source/hwindow.prg * STATIC FUNCTION onEraseBkOnEvent ! minor fix Modified Paths: -------------- trunk/hwgui/source/hcheck.prg trunk/hwgui/source/hwindow.prg Modified: trunk/hwgui/source/hcheck.prg =================================================================== --- trunk/hwgui/source/hcheck.prg 2012-07-09 15:38:25 UTC (rev 1858) +++ trunk/hwgui/source/hcheck.prg 2012-07-16 17:19:49 UTC (rev 1859) @@ -144,13 +144,13 @@ ELSEIF msg == WM_KEYUP ProcKeyList( Self, wParam ) // working in MDICHILD AND DIALOG - ELSEIF msg = WM_GETDLGCODE .AND. lParam != 0 + ELSEIF msg = WM_GETDLGCODE .AND. !EMPTY( lParam ) IF wParam = VK_RETURN .OR. wParam = VK_TAB RETURN -1 ELSEIF wParam = VK_ESCAPE .AND. ; ( oCtrl := ::GetParentForm:FindControl( IDCANCEL ) ) != Nil .AND. ! oCtrl:IsEnabled() RETURN DLGC_WANTMESSAGE - ELSEIF GETDLGMESSAGE( lParam ) = WM_KEYDOWN .AND.wParam != VK_ESCAPE + ELSEIF GETDLGMESSAGE( lParam ) = WM_KEYDOWN .AND. wParam != VK_ESCAPE ELSEIF GETDLGMESSAGE( lParam ) = WM_CHAR .OR.wParam = VK_ESCAPE .OR.; GETDLGMESSAGE( lParam ) = WM_SYSCHAR RETURN -1 Modified: trunk/hwgui/source/hwindow.prg =================================================================== --- trunk/hwgui/source/hwindow.prg 2012-07-09 15:38:25 UTC (rev 1858) +++ trunk/hwgui/source/hwindow.prg 2012-07-16 17:19:49 UTC (rev 1859) @@ -896,7 +896,7 @@ IF oWnd:brush != Nil IF ValType( oWnd:brush ) != "N" FillRect( wParam, aCoors[ 1 ], aCoors[ 2 ], aCoors[ 3 ] + 1, aCoors[ 4 ] + 1, oWnd:brush:handle ) - IF SELFFOCUS( oWnd:handle, oWnd:Screen:Handle ) + IF !Empty( oWnd:Screen ) .AND. SELFFOCUS( oWnd:handle, oWnd:Screen:Handle ) SetWindowPos( oWnd:Handle, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE + SWP_NOMOVE + SWP_NOSIZE + SWP_NOZORDER +; SWP_NOOWNERZORDER + SWP_FRAMECHANGED) ENDIF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <LF...@us...> - 2012-07-09 15:38:43
|
Revision: 1858 http://hwgui.svn.sourceforge.net/hwgui/?rev=1858&view=rev Author: LFBASSO Date: 2012-07-09 15:38:25 +0000 (Mon, 09 Jul 2012) Log Message: ----------- 2012-07-09 12:30 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/hwindow.prg * FUNCTION onMove ! fixed visibility WIN_MDICHILD minimized Modified Paths: -------------- trunk/hwgui/Changelog trunk/hwgui/source/hwindow.prg Modified: trunk/hwgui/Changelog =================================================================== --- trunk/hwgui/Changelog 2012-07-09 13:39:38 UTC (rev 1857) +++ trunk/hwgui/Changelog 2012-07-09 15:38:25 UTC (rev 1858) @@ -8,6 +8,11 @@ 2002-12-01 23:12 UTC+0100 Foo Bar <fo...@fo...> */ +2012-07-09 12:30 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> + * source/hwindow.prg + * FUNCTION onMove + ! fixed visibility WIN_MDICHILD minimized + 2012-07-09 10:40 Luiz Rafael Culik (luiz at xharbour.com) * source/shellapi.c ! pacified warnings Modified: trunk/hwgui/source/hwindow.prg =================================================================== --- trunk/hwgui/source/hwindow.prg 2012-07-09 13:39:38 UTC (rev 1857) +++ trunk/hwgui/source/hwindow.prg 2012-07-09 15:38:25 UTC (rev 1858) @@ -611,8 +611,8 @@ ELSEIF msg = WM_SETFOCUS .AND. nFocus != 0 SETFOCUS( nFocus ) *-::nFocus := 0 - ELSEIF msg = WM_DESTROY .AND. ::lModal .AND. ::Screen:Handle != ::handle - IF ! EMPTY( ::hActive ) .AND. ::hActive != ::Screen:Handle + ELSEIF msg = WM_DESTROY .AND. ::lModal .AND. ! SelfFocus( ::Screen:Handle, ::handle ) + IF ! EMPTY( ::hActive ) .AND. ! SelfFocus( ::hActive, ::Screen:Handle ) PostMessage( nFocus, WM_SETFOCUS, 0, 0 ) PostMessage( ::hActive , WM_SETFOCUS, 0, 0 ) ENDIF @@ -875,7 +875,9 @@ oWnd:aRectSave[ 2 ] := oWnd:nTop ENDIF ENDIF - + IF oWnd:isMinimized() .AND. !Empty( oWnd:Screen ) + SetWindowPos( oWnd:Screen:HANDLE, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE + SWP_NOOWNERZORDER + SWP_NOSIZE + SWP_NOMOVE ) + ENDIF RETURN - 1 STATIC FUNCTION onEraseBk( oWnd, wParam ) @@ -890,7 +892,6 @@ ENDIF Return 1 ELSEIF oWnd:type != WND_MDI //.AND. oWnd:type != WND_MAIN - aCoors := GetClientRect( oWnd:handle ) IF oWnd:brush != Nil IF ValType( oWnd:brush ) != "N" @@ -905,6 +906,7 @@ FillRect( wParam, aCoors[ 1 ], aCoors[ 2 ], aCoors[ 3 ] + 1, aCoors[ 4 ] + 1, COLOR_3DFACE + 1 ) RETURN 1 ENDIF + ENDIF RETURN - 1 @@ -938,6 +940,9 @@ oWnd:Hide() RETURN 0 ENDIF + SetWindowPos( oWnd:Handle, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE + SWP_NOMOVE + SWP_NOSIZE + SWP_NOZORDER +; + SWP_NOOWNERZORDER + SWP_FRAMECHANGED) + ELSEIF ( wParam == SC_MAXIMIZE .OR. wparam == SC_MAXIMIZE2 ) .AND. ; oWnd:type == WND_MDICHILD .AND. ( oWnd:lChild .OR. oWnd:lModal ) IF oWnd:WindowState == SW_SHOWMINIMIZED @@ -1103,11 +1108,11 @@ STATIC FUNCTION onMdiNcActivate( oWnd, wParam ) IF ! Empty( oWnd:Screen ) - IF wParam = 1 .AND. oWnd:Screen:handle == oWnd:handle + IF wParam = 1 .AND. SelfFocus( oWnd:Screen:handle, oWnd:handle ) SetWindowPos( oWnd:Screen:HANDLE, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE + SWP_NOOWNERZORDER + SWP_NOSIZE + SWP_NOMOVE ) RETURN 1 ENDIF - IF wParam == 1 .AND. oWnd:Screen:Handle != oWnd:HANDLE + IF wParam == 1 .AND. ! SelfFocus( oWnd:Screen:Handle, oWnd:HANDLE ) // triggered ON GETFOCUS MDI CHILD MAXIMIZED IF ISBLOCK( oWnd:bSetForm ) EVAL( oWnd:bSetForm, oWnd ) @@ -1148,11 +1153,11 @@ ENDIF IF lScreen .AND. ( Empty( lParam ) .OR. ; - lParam = oWnd:Screen:Handle ) .AND. !lConf //wParam != oWnd:Handle + SelfFocus( lParam, oWnd:Screen:Handle ) ) .AND. !lConf //wParam != oWnd:Handle *-SetWindowPos( oWnd:Screen:Handle, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE + SWP_NOOWNERZORDER + SWP_NOSIZE + SWP_NOMOVE ) RETURN 0 ELSEIF lConf //oWnd:Handle = wParam - IF oWnd:Screen:handle != wParam .AND. oWnd:bLostFocus != Nil //.AND.wParam == 0 + IF ! SelfFocus( oWnd:Screen:handle, wParam ) .AND. oWnd:bLostFocus != Nil //.AND.wParam == 0 oWnd:lSuspendMsgsHandling := .t. //IF oWnd:Screen:handle = lParam // SetWindowPos( oWnd:Screen:Handle, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE + SWP_NOOWNERZORDER + SWP_NOSIZE + SWP_NOMOVE ) @@ -1165,7 +1170,7 @@ AEVAL( aWndMain,{| w | IIF( w:Type >= WND_MDICHILD .AND.; PtrtoUlong( w:Handle ) != PtrtoUlong( wParam ), EnableWindow( w:Handle, .T. ), ) }) ENDIF - ELSEIF oWnd:Handle = lParam //.AND. ownd:screen:handle != WPARAM + ELSEIF SelfFocus( oWnd:Handle, lParam ) //.AND. ownd:screen:handle != WPARAM IF ISBLOCK( oWnd:bSetForm ) EVAL( oWnd:bSetForm, oWnd ) ENDIF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lc...@us...> - 2012-07-09 13:39:49
|
Revision: 1857 http://hwgui.svn.sourceforge.net/hwgui/?rev=1857&view=rev Author: lculik Date: 2012-07-09 13:39:38 +0000 (Mon, 09 Jul 2012) Log Message: ----------- 2012-07-09 10:40 Luiz Rafael Culik (luiz at xharbour.com) * source/shellapi.c ! pacified warnings Modified Paths: -------------- trunk/hwgui/Changelog trunk/hwgui/source/shellapi.c Modified: trunk/hwgui/Changelog =================================================================== --- trunk/hwgui/Changelog 2012-07-06 11:34:55 UTC (rev 1856) +++ trunk/hwgui/Changelog 2012-07-09 13:39:38 UTC (rev 1857) @@ -8,6 +8,10 @@ 2002-12-01 23:12 UTC+0100 Foo Bar <fo...@fo...> */ +2012-07-09 10:40 Luiz Rafael Culik (luiz at xharbour.com) + * source/shellapi.c + ! pacified warnings + 2012-07-06 08:30 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/shellapi.c + static int ( CALLBACK BrowseCallbackProc ) Modified: trunk/hwgui/source/shellapi.c =================================================================== --- trunk/hwgui/source/shellapi.c 2012-07-06 11:34:55 UTC (rev 1856) +++ trunk/hwgui/source/shellapi.c 2012-07-09 13:39:38 UTC (rev 1857) @@ -36,7 +36,7 @@ { case BFFM_INITIALIZED: { - if ( NULL != lpData ) + if ( lpData != (LPARAM)NULL ) { SendMessage( hwnd, BFFM_SETSELECTION, lParam, lpData ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: 網緹資訊•廖文勝(WenSheng) <ss...@ma...> - 2012-07-07 06:58:15
|
I found solution for MDI / MDICHILD and to paint background image, Do you want test and upgrade? 日期(On) Wed, 4 Jul 2012 13:29:47 -0300 "Basso, Luis Fernando" <lf...@vi...> 寫信(write): > MDI MAIN does not allow image or color in your background, only the standard > gray. > even using PAINT > Then a window was created MDIChild which is the background to enable the use > of color and backgroud > > > > -----Mensagem Original----- > From: ss...@ma... > Sent: Wednesday, July 04, 2012 12:50 PM > To: hwg...@li... > Subject: Re: [Hwgui-commits] SF.net SVN: hwgui:[1854] trunk/hwgui > > > > > > only work in this way > > ACTIVATE WINDOW oWnd MAXIMIZED ON ACTIVATE { || oWnd:screen:hide()} > > > > is not possible BACKGROUND BITMAP oBmp OR COLOR > > > Why do you want add :Screen on CLASS about hMainWindow ? > If no :Screen we can use ON PAINT to redraw background image. > Let me to can control background image and don't want :Screen... > May be is best solution!! > > > > > > > > > -----Mensagem Original----- > > From: ss...@ma... > > Sent: Wednesday, July 04, 2012 11:56 AM > > To: hwg...@li... > > Subject: Re: [Hwgui-commits] SF.net SVN: hwgui:[1854] trunk/hwgui > > > > > > Hi LFBASSO !! > > > > Can you help me to fix MDI problem about background image and > > MDICHILD minimize ? > > > > Run program screen: > > Step 1: Show MAIN MDI Window > > http://img694.imageshack.us/img694/7475/31841158.jpg > > > > Step 2: Press menu and click [A]MDI Child Window > > http://img824.imageshack.us/img824/2721/31441180.jpg > > > > Step 3: Show MDICHILD Window and press minimize button > > http://img607.imageshack.us/img607/726/99047849.jpg > > > > Step 4: Where is my MDICHILD window? > > http://img706.imageshack.us/img706/3329/17529374.jpg > > > > > > sample code: > > //---------------------------------------------------------------- > > #include "hbclass.ch" > > #include "guilib.ch" > > #include "windows.ch" > > > > Func main() > > Local oWnd, oMenu, oBmp > > oBmp := HBitmap():AddFile( 'hwgui.bmp' ) > > INIT WINDOW oWnd MDI AT 0,0 SIZE 800, 600; > > COLOR 16744703; > > TITLE "Test MDI Windows"; > > BACKGROUND BITMAP oBmp > > // > > MENU OF oWnd > > MENU TITLE "[&A]Test" > > MENUITEM "[&A]MDI Child Window" ACTION Test1(oWnd) > > MENUITEM "[&B]MDI Child - ActiveX TEST" ACTION NIL > > ENDMENU > > ENDMENU > > // > > ACTIVATE WINDOW oWnd MAXIMIZED > > Return NIL > > > > Func Test1(oWnd) > > Local oChild > > INIT WINDOW oChild MDICHILD OF oWnd TITLE 'MDICHILD Window'; > > AT 200,0 SIZE 500,400; > > STYLE WS_VISIBLE + WS_OVERLAPPEDWINDOW > > @ 10, 50 SAY "TEST 中文字" OF oChild SIZE 260, 22 > > ACTIVATE WINDOW oChild > > RETURN NIL > > //---------------------------------------------------------------- > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Hwgui-commits mailing list > Hwg...@li... > https://lists.sourceforge.net/lists/listinfo/hwgui-commits > > __________ Information from ESET NOD32 Antivirus, version of virus signature database 7271 (20120704) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > Wang Ti information CO. of Taiwan http://www.zzz.com.tw/ mailto:ss...@ma... Yahoo: ssbbstw MSN:ss...@ho... Skype:ssbbstw |
From: <LF...@us...> - 2012-07-06 11:35:05
|
Revision: 1856 http://hwgui.svn.sourceforge.net/hwgui/?rev=1856&view=rev Author: LFBASSO Date: 2012-07-06 11:34:55 +0000 (Fri, 06 Jul 2012) Log Message: ----------- 2012-07-06 08:30 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/shellapi.c + static int ( CALLBACK BrowseCallbackProc ) * HB_FUNC( SELECTFOLDER ) ! add new parameter FolderName provides a way to specify an initial directory then ex: SELECTFOLDER( "Title window","c:\windows") Modified Paths: -------------- trunk/hwgui/Changelog trunk/hwgui/source/shellapi.c Modified: trunk/hwgui/Changelog =================================================================== --- trunk/hwgui/Changelog 2012-07-04 22:30:57 UTC (rev 1855) +++ trunk/hwgui/Changelog 2012-07-06 11:34:55 UTC (rev 1856) @@ -8,6 +8,13 @@ 2002-12-01 23:12 UTC+0100 Foo Bar <fo...@fo...> */ +2012-07-06 08:30 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> + * source/shellapi.c + + static int ( CALLBACK BrowseCallbackProc ) + * HB_FUNC( SELECTFOLDER ) + ! add new parameter FolderName provides a way to specify an initial directory + then ex: SELECTFOLDER( "Title window","c:\windows") + 2012-07-04 21:10 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/hedit.prg * METHOD Valid Modified: trunk/hwgui/source/shellapi.c =================================================================== --- trunk/hwgui/source/shellapi.c 2012-07-04 22:30:57 UTC (rev 1855) +++ trunk/hwgui/source/shellapi.c 2012-07-06 11:34:55 UTC (rev 1856) @@ -27,6 +27,24 @@ #define BIF_EDITBOX 0x0010 // Add an editbox to the dialog #endif +static int ( CALLBACK BrowseCallbackProc ) ( HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData ) +{ + // If the BFFM_INITIALIZED message is received + // set the path to the start path. + lParam = TRUE; + switch ( uMsg ) + { + case BFFM_INITIALIZED: + { + if ( NULL != lpData ) + { + SendMessage( hwnd, BFFM_SETSELECTION, lParam, lpData ); + } + } + } + return 0; // The function should always return 0. +} + /* * SelectFolder( cTitle ) */ @@ -38,14 +56,17 @@ LPCTSTR lpResult = NULL; LPITEMIDLIST pidlBrowse; // PIDL selected by user void * hTitle; + void * hFolderName; + LPCTSTR lpFolderName; + lpFolderName = HB_PARSTR( 2, &hFolderName, NULL ) ; bi.hwndOwner = GetActiveWindow(); - bi.pidlRoot = NULL; + bi.pidlRoot = NULL ; bi.pszDisplayName = lpBuffer; bi.lpszTitle = HB_PARSTRDEF( 1, &hTitle, NULL ); - bi.ulFlags = BIF_USENEWUI; - bi.lpfn = NULL; - bi.lParam = 0; + bi.ulFlags = BIF_USENEWUI | BIF_NEWDIALOGSTYLE; + bi.lpfn = BrowseCallbackProc ; // = NULL; + bi.lParam = lpFolderName ? ( LPARAM ) lpFolderName : 0 ; bi.iImage = 0; // Browse for a folder and return its PIDL. @@ -58,6 +79,7 @@ } HB_RETSTR( lpResult ); hb_strfree( hTitle ); + hb_strfree( hFolderName ); } /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <LF...@us...> - 2012-07-04 22:31:03
|
Revision: 1855 http://hwgui.svn.sourceforge.net/hwgui/?rev=1855&view=rev Author: LFBASSO Date: 2012-07-04 22:30:57 +0000 (Wed, 04 Jul 2012) Log Message: ----------- Modified Paths: -------------- trunk/hwgui/Changelog trunk/hwgui/source/hedit.prg Modified: trunk/hwgui/Changelog =================================================================== --- trunk/hwgui/Changelog 2012-07-04 14:24:04 UTC (rev 1854) +++ trunk/hwgui/Changelog 2012-07-04 22:30:57 UTC (rev 1855) @@ -7,6 +7,12 @@ For example: 2002-12-01 23:12 UTC+0100 Foo Bar <fo...@fo...> */ + +2012-07-04 21:10 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> + * source/hedit.prg + * METHOD Valid + ! changed CSetCent( ) to __SetCentury() + 2012-07-04 11:10 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/hedit.prg * METHOD Valid Modified: trunk/hwgui/source/hedit.prg =================================================================== --- trunk/hwgui/source/hedit.prg 2012-07-04 14:24:04 UTC (rev 1854) +++ trunk/hwgui/source/hedit.prg 2012-07-04 22:30:57 UTC (rev 1855) @@ -1167,7 +1167,7 @@ RETURN .T. ENDIF vari := CToD( vari ) - IF CSetCent( ) .AND. LEN( Trim ( ::title ) ) < 10 + IF __SetCentury() .AND. LEN( Trim ( ::title ) ) < 10 ::title := DTOC( vari ) SetDlgItemText( ::oParent:handle, ::id, ::title ) ENDIF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ss...@ma...> - 2012-07-04 15:51:07
|
> > only work in this way > ACTIVATE WINDOW oWnd MAXIMIZED ON ACTIVATE { || oWnd:screen:hide()} > > is not possible BACKGROUND BITMAP oBmp OR COLOR Why do you want add :Screen on CLASS about hMainWindow ? If no :Screen we can use ON PAINT to redraw background image. Let me to can control background image and don't want :Screen... May be is best solution!! > > > > -----Mensagem Original----- > From: ss...@ma... > Sent: Wednesday, July 04, 2012 11:56 AM > To: hwg...@li... > Subject: Re: [Hwgui-commits] SF.net SVN: hwgui:[1854] trunk/hwgui > > > Hi LFBASSO !! > > Can you help me to fix MDI problem about background image and > MDICHILD minimize ? > > Run program screen: > Step 1: Show MAIN MDI Window > http://img694.imageshack.us/img694/7475/31841158.jpg > > Step 2: Press menu and click [A]MDI Child Window > http://img824.imageshack.us/img824/2721/31441180.jpg > > Step 3: Show MDICHILD Window and press minimize button > http://img607.imageshack.us/img607/726/99047849.jpg > > Step 4: Where is my MDICHILD window? > http://img706.imageshack.us/img706/3329/17529374.jpg > > > sample code: > //---------------------------------------------------------------- > #include "hbclass.ch" > #include "guilib.ch" > #include "windows.ch" > > Func main() > Local oWnd, oMenu, oBmp > oBmp := HBitmap():AddFile( 'hwgui.bmp' ) > INIT WINDOW oWnd MDI AT 0,0 SIZE 800, 600; > COLOR 16744703; > TITLE "Test MDI Windows"; > BACKGROUND BITMAP oBmp > // > MENU OF oWnd > MENU TITLE "[&A]Test" > MENUITEM "[&A]MDI Child Window" ACTION Test1(oWnd) > MENUITEM "[&B]MDI Child - ActiveX TEST" ACTION NIL > ENDMENU > ENDMENU > // > ACTIVATE WINDOW oWnd MAXIMIZED > Return NIL > > Func Test1(oWnd) > Local oChild > INIT WINDOW oChild MDICHILD OF oWnd TITLE 'MDICHILD Window'; > AT 200,0 SIZE 500,400; > STYLE WS_VISIBLE + WS_OVERLAPPEDWINDOW > @ 10, 50 SAY "TEST 中文字" OF oChild SIZE 260, 22 > ACTIVATE WINDOW oChild > RETURN NIL > //---------------------------------------------------------------- > |
From: Basso, L. F. <lf...@vi...> - 2012-07-04 15:30:54
|
only work in this way ACTIVATE WINDOW oWnd MAXIMIZED ON ACTIVATE { || oWnd:screen:hide()} is not possible BACKGROUND BITMAP oBmp OR COLOR -----Mensagem Original----- From: ss...@ma... Sent: Wednesday, July 04, 2012 11:56 AM To: hwg...@li... Subject: Re: [Hwgui-commits] SF.net SVN: hwgui:[1854] trunk/hwgui Hi LFBASSO !! Can you help me to fix MDI problem about background image and MDICHILD minimize ? Run program screen: Step 1: Show MAIN MDI Window http://img694.imageshack.us/img694/7475/31841158.jpg Step 2: Press menu and click [A]MDI Child Window http://img824.imageshack.us/img824/2721/31441180.jpg Step 3: Show MDICHILD Window and press minimize button http://img607.imageshack.us/img607/726/99047849.jpg Step 4: Where is my MDICHILD window? http://img706.imageshack.us/img706/3329/17529374.jpg sample code: //---------------------------------------------------------------- #include "hbclass.ch" #include "guilib.ch" #include "windows.ch" Func main() Local oWnd, oMenu, oBmp oBmp := HBitmap():AddFile( 'hwgui.bmp' ) INIT WINDOW oWnd MDI AT 0,0 SIZE 800, 600; COLOR 16744703; TITLE "Test MDI Windows"; BACKGROUND BITMAP oBmp // MENU OF oWnd MENU TITLE "[&A]Test" MENUITEM "[&A]MDI Child Window" ACTION Test1(oWnd) MENUITEM "[&B]MDI Child - ActiveX TEST" ACTION NIL ENDMENU ENDMENU // ACTIVATE WINDOW oWnd MAXIMIZED Return NIL Func Test1(oWnd) Local oChild INIT WINDOW oChild MDICHILD OF oWnd TITLE 'MDICHILD Window'; AT 200,0 SIZE 500,400; STYLE WS_VISIBLE + WS_OVERLAPPEDWINDOW @ 10, 50 SAY "TEST 中文字" OF oChild SIZE 260, 22 ACTIVATE WINDOW oChild RETURN NIL //---------------------------------------------------------------- |
From: <ss...@ma...> - 2012-07-04 14:56:51
|
Hi LFBASSO !! Can you help me to fix MDI problem about background image and MDICHILD minimize ? Run program screen: Step 1: Show MAIN MDI Window http://img694.imageshack.us/img694/7475/31841158.jpg Step 2: Press menu and click [A]MDI Child Window http://img824.imageshack.us/img824/2721/31441180.jpg Step 3: Show MDICHILD Window and press minimize button http://img607.imageshack.us/img607/726/99047849.jpg Step 4: Where is my MDICHILD window? http://img706.imageshack.us/img706/3329/17529374.jpg sample code: //---------------------------------------------------------------- #include "hbclass.ch" #include "guilib.ch" #include "windows.ch" Func main() Local oWnd, oMenu, oBmp oBmp := HBitmap():AddFile( 'hwgui.bmp' ) INIT WINDOW oWnd MDI AT 0,0 SIZE 800, 600; COLOR 16744703; TITLE "Test MDI Windows"; BACKGROUND BITMAP oBmp // MENU OF oWnd MENU TITLE "[&A]Test" MENUITEM "[&A]MDI Child Window" ACTION Test1(oWnd) MENUITEM "[&B]MDI Child - ActiveX TEST" ACTION NIL ENDMENU ENDMENU // ACTIVATE WINDOW oWnd MAXIMIZED Return NIL Func Test1(oWnd) Local oChild INIT WINDOW oChild MDICHILD OF oWnd TITLE 'MDICHILD Window'; AT 200,0 SIZE 500,400; STYLE WS_VISIBLE + WS_OVERLAPPEDWINDOW @ 10, 50 SAY "TEST 中文字" OF oChild SIZE 260, 22 ACTIVATE WINDOW oChild RETURN NIL //---------------------------------------------------------------- LF...@us... 寫信(write): > Revision: 1854 > http://hwgui.svn.sourceforge.net/hwgui/?rev=1854&view=rev > Author: LFBASSO > Date: 2012-07-04 14:24:04 +0000 (Wed, 04 Jul 2012) > Log Message: > ----------- > > > Modified Paths: > -------------- > trunk/hwgui/Changelog > trunk/hwgui/source/hedit.prg > > Modified: trunk/hwgui/Changelog > =================================================================== > --- trunk/hwgui/Changelog 2012-07-04 13:48:38 UTC (rev 1853) > +++ trunk/hwgui/Changelog 2012-07-04 14:24:04 UTC (rev 1854) > @@ -7,6 +7,10 @@ > For example: > 2002-12-01 23:12 UTC+0100 Foo Bar <fo...@fo...> > */ > +2012-07-04 11:10 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> > + * source/hedit.prg > + * METHOD Valid > + ! fixed show to value type = "D" and SET CENTURY ON > > 2012-07-04 08:10 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> > * source/hhyper.prg > > Modified: trunk/hwgui/source/hedit.prg > =================================================================== > --- trunk/hwgui/source/hedit.prg 2012-07-04 13:48:38 UTC (rev 1853) > +++ trunk/hwgui/source/hedit.prg 2012-07-04 14:24:04 UTC (rev 1854) > @@ -1168,7 +1168,7 @@ > ENDIF > vari := CToD( vari ) > IF CSetCent( ) .AND. LEN( Trim ( ::title ) ) < 10 > - ::title := DTOC( vari ) .AND. LEN( ::title ) = 8 > + ::title := DTOC( vari ) > SetDlgItemText( ::oParent:handle, ::id, ::title ) > ENDIF > ELSEIF ::cType == "N" > > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. > > |
From: <LF...@us...> - 2012-07-04 14:24:15
|
Revision: 1854 http://hwgui.svn.sourceforge.net/hwgui/?rev=1854&view=rev Author: LFBASSO Date: 2012-07-04 14:24:04 +0000 (Wed, 04 Jul 2012) Log Message: ----------- Modified Paths: -------------- trunk/hwgui/Changelog trunk/hwgui/source/hedit.prg Modified: trunk/hwgui/Changelog =================================================================== --- trunk/hwgui/Changelog 2012-07-04 13:48:38 UTC (rev 1853) +++ trunk/hwgui/Changelog 2012-07-04 14:24:04 UTC (rev 1854) @@ -7,6 +7,10 @@ For example: 2002-12-01 23:12 UTC+0100 Foo Bar <fo...@fo...> */ +2012-07-04 11:10 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> + * source/hedit.prg + * METHOD Valid + ! fixed show to value type = "D" and SET CENTURY ON 2012-07-04 08:10 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/hhyper.prg Modified: trunk/hwgui/source/hedit.prg =================================================================== --- trunk/hwgui/source/hedit.prg 2012-07-04 13:48:38 UTC (rev 1853) +++ trunk/hwgui/source/hedit.prg 2012-07-04 14:24:04 UTC (rev 1854) @@ -1168,7 +1168,7 @@ ENDIF vari := CToD( vari ) IF CSetCent( ) .AND. LEN( Trim ( ::title ) ) < 10 - ::title := DTOC( vari ) .AND. LEN( ::title ) = 8 + ::title := DTOC( vari ) SetDlgItemText( ::oParent:handle, ::id, ::title ) ENDIF ELSEIF ::cType == "N" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <LF...@us...> - 2012-07-04 13:48:47
|
Revision: 1853 http://hwgui.svn.sourceforge.net/hwgui/?rev=1853&view=rev Author: LFBASSO Date: 2012-07-04 13:48:38 +0000 (Wed, 04 Jul 2012) Log Message: ----------- Modified Paths: -------------- trunk/hwgui/source/hhyper.prg Modified: trunk/hwgui/source/hhyper.prg =================================================================== --- trunk/hwgui/source/hhyper.prg 2012-07-04 12:21:01 UTC (rev 1852) +++ trunk/hwgui/source/hhyper.prg 2012-07-04 13:48:38 UTC (rev 1853) @@ -367,7 +367,7 @@ FillRect( dc, rcclient[ 1 ], rcclient[ 2 ], rcclient[ 3 ], rcclient[ 4 ] ) //, ::brush:handle ) ENDIF dwFlags := DT_LEFT + DT_WORDBREAK - dwstyle := ::style + //dwstyle := ::style dwFlags += ( DT_VCENTER + DT_END_ELLIPSIS ) //::dc:SelectObject( ::oFont:handle ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <LF...@us...> - 2012-07-04 12:21:08
|
Revision: 1852 http://hwgui.svn.sourceforge.net/hwgui/?rev=1852&view=rev Author: LFBASSO Date: 2012-07-04 12:21:01 +0000 (Wed, 04 Jul 2012) Log Message: ----------- Modified Paths: -------------- trunk/hwgui/Changelog trunk/hwgui/source/hhyper.prg Modified: trunk/hwgui/Changelog =================================================================== --- trunk/hwgui/Changelog 2012-07-04 11:10:52 UTC (rev 1851) +++ trunk/hwgui/Changelog 2012-07-04 12:21:01 UTC (rev 1852) @@ -9,6 +9,8 @@ */ 2012-07-04 08:10 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> + * source/hhyper.prg + ! minor fixes in variables * source/hpanel.prg * METHOD Activate() * METHOD onEvent() Modified: trunk/hwgui/source/hhyper.prg =================================================================== --- trunk/hwgui/source/hhyper.prg 2012-07-04 11:10:52 UTC (rev 1851) +++ trunk/hwgui/source/hhyper.prg 2012-07-04 12:21:01 UTC (rev 1852) @@ -86,7 +86,7 @@ ::hbitmap := hbitmap Super:New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, cCaption, oFont, bInit, ; - bSize, bPaint, ctooltip, tcolor, bcolor, lTransp ) + bSize, bPaint, ctooltip, tcolor, bcolor, lTransp, bClick ) DEFAULT vColor TO RGB( 5, 34, 143 ) DEFAULT lColor TO RGB( 0, 0, 255 ) @@ -339,8 +339,8 @@ LOCAL aBmpSize := IIF( ! EMPTY( ::hbitmap ), GetBitmapSize( ::hbitmap ),{0,0} ) LOCAL itemRect := copyrect( { drawInfo[ 4 ], drawInfo[ 5 ], drawInfo[ 6 ], drawInfo[ 7 ] } ) LOCAL captionRect := { drawInfo[ 4 ] , drawInfo[ 5 ], drawInfo[ 6 ] , drawInfo[ 7 ] } + LOCAL bmpRect - IF EMPTY( ::oParent:handle ) RETURN Nil ENDIF @@ -366,7 +366,7 @@ SetBkColor( DC, IIF( ::bColor = NIL, GetSysColor( COLOR_3DFACE ), ::bcolor ) ) FillRect( dc, rcclient[ 1 ], rcclient[ 2 ], rcclient[ 3 ], rcclient[ 4 ] ) //, ::brush:handle ) ENDIF - dwFlags := DT_LEFT | DT_WORDBREAK + dwFlags := DT_LEFT + DT_WORDBREAK dwstyle := ::style dwFlags += ( DT_VCENTER + DT_END_ELLIPSIS ) @@ -399,8 +399,8 @@ RETURN NIL -METHOD Resize( x, y ) CLASS HStaticLink - LOCAL aCoors := GetClientRect( ::handle ) +METHOD Resize( ) CLASS HStaticLink + //LOCAL aCoors := GetClientRect( ::handle ) LOCAL aBmpSize, aTxtSize aBmpSize := IIF( ! EMPTY( ::hbitmap ), GetBitmapSize( ::hbitmap ), { 0,0 } ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <LF...@us...> - 2012-07-04 11:11:03
|
Revision: 1851 http://hwgui.svn.sourceforge.net/hwgui/?rev=1851&view=rev Author: LFBASSO Date: 2012-07-04 11:10:52 +0000 (Wed, 04 Jul 2012) Log Message: ----------- 2012-07-04 08:10 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/hpanel.prg * METHOD Activate() * METHOD onEvent() * METHOD RESIZEOFFSET() ! minor fixes in variables Modified Paths: -------------- trunk/hwgui/Changelog trunk/hwgui/source/hpanel.prg Modified: trunk/hwgui/Changelog =================================================================== --- trunk/hwgui/Changelog 2012-07-03 16:11:23 UTC (rev 1850) +++ trunk/hwgui/Changelog 2012-07-04 11:10:52 UTC (rev 1851) @@ -8,6 +8,13 @@ 2002-12-01 23:12 UTC+0100 Foo Bar <fo...@fo...> */ +2012-07-04 08:10 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> + * source/hpanel.prg + * METHOD Activate() + * METHOD onEvent() + * METHOD RESIZEOFFSET() + ! minor fixes in variables + 2012-07-03 13:20 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/htree.prg * METHOD Top() Modified: trunk/hwgui/source/hpanel.prg =================================================================== --- trunk/hwgui/source/hpanel.prg 2012-07-03 16:11:23 UTC (rev 1850) +++ trunk/hwgui/source/hpanel.prg 2012-07-04 11:10:52 UTC (rev 1851) @@ -36,7 +36,7 @@ METHOD Show() METHOD Release() METHOD Resize() - METHOD ResizeOffSet( nMode , lRelease ) + METHOD ResizeOffSet( nMode ) ENDCLASS @@ -95,7 +95,6 @@ METHOD Activate() CLASS HPanel LOCAL handle := ::oParent:handle - LOCAL aCoors, nWidth, nHeight IF !Empty( handle ) ::handle := CreatePanel( handle, ::id, ; @@ -143,12 +142,13 @@ RETURN Nil METHOD onEvent( msg, wParam, lParam ) CLASS HPanel + LOCAL nret IF msg == WM_PAINT ::Paint() *-RedrawWindow( ::handle, RDW_NOERASE + RDW_FRAME + RDW_INVALIDATE ) ELSEIF msg == WM_NCPAINT - RedrawWindow( ::handle, RDW_NOERASE + RDW_FRAME + RDW_INVALIDATE ) + *- RedrawWindow( ::handle, RDW_NOERASE + RDW_FRAME + RDW_INVALIDATE + RDW_INTERNALPAINT ) ELSEIF msg == WM_ERASEBKGND IF ::backstyle = OPAQUE RETURN nrePaint @@ -270,7 +270,7 @@ METHOD Release() CLASS HPanel InvalidateRect(::oParent:handle, 1, ::nLeft, ::nTop, ::nLeft + ::nWidth, ::nTop + ::nHeight) - ::ResizeOffSet( 3, .T. ) + ::ResizeOffSet( 3 ) /* IF __ObjHasMsg( ::oParent, "AOFFSET" ) .AND. ::oParent:type == WND_MDI IF (::nWidth > ::nHeight .OR. ::nWidth == 0 ).AND. ::oParent:aOffset[2] > 0 @@ -388,7 +388,7 @@ RETURN Nil /* nMode => nMode = 0 INIT / nMode = 1 RESIZE / nMode = 2 SHOW / nMode = 3 HIDE */ -METHOD ResizeOffSet( nMode , lRelease ) CLASS HPanel +METHOD ResizeOffSet( nMode ) CLASS HPanel LOCAL aCoors := GetWindowRect( ::handle ) LOCAL nHeight := aCoors[ 4 ] - aCoors[ 2 ] LOCAL nWidth := aCoors[ 3 ] - aCoors[ 1 ] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Maurizio la C. <m.l...@gm...> - 2012-07-03 22:48:45
|
It's the equivalent function to Set( SET_CENTURY). I suggest to use the standard clipper way. Il giorno 04/lug/2012 00:44, 網緹資訊•廖文勝(WenSheng) <ss...@ma...> ha scritto: > > > Revision: 1847 > > * source/hedit.prg > > * METHOD Valid > > ! fixed show to value type = "D" and SET CENTURY ON > > > Please problem!! > > line 1170: > //---------------------------------------- > IF CSetCent( ) .AND. LEN( Trim ( ::title ) ) < 10 > ::title := DTOC( vari ) .AND. LEN( ::title ) = 8 > SetDlgItemText( ::oParent:handle, ::id, ::title ) > ENDIF > //---------------------------------------- > > What is 'CSetCent( )' ? > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Hwgui-commits mailing list > Hwg...@li... > https://lists.sourceforge.net/lists/listinfo/hwgui-commits > |
From: 網緹資訊•廖文勝(WenSheng) <ss...@ma...> - 2012-07-03 22:44:28
|
> Revision: 1847 > * source/hedit.prg > * METHOD Valid > ! fixed show to value type = "D" and SET CENTURY ON Please problem!! line 1170: //---------------------------------------- IF CSetCent( ) .AND. LEN( Trim ( ::title ) ) < 10 ::title := DTOC( vari ) .AND. LEN( ::title ) = 8 SetDlgItemText( ::oParent:handle, ::id, ::title ) ENDIF //---------------------------------------- What is 'CSetCent( )' ? |
From: <LF...@us...> - 2012-07-03 16:11:30
|
Revision: 1850 http://hwgui.svn.sourceforge.net/hwgui/?rev=1850&view=rev Author: LFBASSO Date: 2012-07-03 16:11:23 +0000 (Tue, 03 Jul 2012) Log Message: ----------- 2012-07-03 13:20 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/htree.prg * METHOD Top() * METHOD Bottom() ! minor fixes Modified Paths: -------------- trunk/hwgui/Changelog trunk/hwgui/source/htree.prg Modified: trunk/hwgui/Changelog =================================================================== --- trunk/hwgui/Changelog 2012-07-03 14:02:23 UTC (rev 1849) +++ trunk/hwgui/Changelog 2012-07-03 16:11:23 UTC (rev 1850) @@ -8,6 +8,12 @@ 2002-12-01 23:12 UTC+0100 Foo Bar <fo...@fo...> */ +2012-07-03 13:20 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> + * source/htree.prg + * METHOD Top() + * METHOD Bottom() + ! minor fixes + 2012-07-02 17:05 UTC-0300 Alexey Myronenko <m.oleksa at ukr.net> * Removed by Luis Fernando Basso: * LOCAL nPosVert := GetScrollPos( ::handle, SB_VERT ) @@ -96,7 +102,7 @@ ! fix in redraw * source/hpanel.prg + METHOD ResizeOffSet( nMode , lRelease ) - * METHOD Hide() + * METHOD Hide() * METHOD Show() * METHOD Release() * METHOD Resize() Modified: trunk/hwgui/source/htree.prg =================================================================== --- trunk/hwgui/source/htree.prg 2012-07-03 14:02:23 UTC (rev 1849) +++ trunk/hwgui/source/htree.prg 2012-07-03 16:11:23 UTC (rev 1850) @@ -310,8 +310,8 @@ METHOD ItemHeight( nHeight ) SETGET METHOD SearchString( cText, iNivel, oNode, inodo ) METHOD Selecteds( oItem, aSels ) - METHOD Top() INLINE ::select( ::aItems[ 1 ] ), SendMessage( ::Handle, WM_VSCROLL, MAKEWPARAM( 0, SB_TOP ), Nil ) - METHOD Bottom() INLINE ::select( ::aItems[ LEN( ::aItems ) ] ), SendMessage( ::Handle, WM_VSCROLL, MAKEWPARAM( 0, SB_BOTTOM ), Nil ) + METHOD Top() INLINE IIF( !Empty( ::aItems ), ( ::Select( ::aItems[ 1 ] ), SendMessage( ::Handle, WM_VSCROLL, MAKEWPARAM( 0, SB_TOP ), Nil ) ), ) + METHOD Bottom() INLINE IIF( !Empty( ::aItems ), ( ::Select( ::aItems[ LEN( ::aItems ) ] ), SendMessage( ::Handle, WM_VSCROLL, MAKEWPARAM( 0, SB_BOTTOM ), Nil ) ),) ENDCLASS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <om...@us...> - 2012-07-03 14:02:34
|
Revision: 1849 http://hwgui.svn.sourceforge.net/hwgui/?rev=1849&view=rev Author: omm Date: 2012-07-03 14:02:23 +0000 (Tue, 03 Jul 2012) Log Message: ----------- 2012-07-02 17:05 UTC-0300 Alexey Myronenko <m.oleksa at ukr.net> Modified Paths: -------------- trunk/hwgui/Changelog Modified: trunk/hwgui/Changelog =================================================================== --- trunk/hwgui/Changelog 2012-07-03 11:46:41 UTC (rev 1848) +++ trunk/hwgui/Changelog 2012-07-03 14:02:23 UTC (rev 1849) @@ -8,94 +8,99 @@ 2002-12-01 23:12 UTC+0100 Foo Bar <fo...@fo...> */ +2012-07-02 17:05 UTC-0300 Alexey Myronenko <m.oleksa at ukr.net> + * Removed by Luis Fernando Basso: + * LOCAL nPosVert := GetScrollPos( ::handle, SB_VERT ) + * LOCAL nPosHorz := GetScrollPos( ::handle, SB_HORZ ) 2012-07-02 14:50 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/guilib.ch - * #xcommand @ <x>,<y> GET + * #xcommand @ <x>,<y> GET + [ ON SIZE <bSize> ] ; * #xcommand @ <x>,<y> SAY [ <oSay> CAPTION ] <caption> ; [ OF <oWnd> ] ; LINK <cLink> ; - + [ ON CLICK <bClick> ] ; + + [ ON CLICK <bClick> ] ; [ STYLE <nStyle> ] ; [ BITMAP <hbit> ] ; - * #xcommand @ <x>,<y> TOOLBAR [ <oTool> ] + * #xcommand @ <x>,<y> TOOLBAR [ <oTool> ] + [ ON SIZE <bSize> ] ; * source/guimain.prg * FUNCTION FindSelf( hCtrl ) - ! minor fix. - * source/hcwindow.prg - + METHOD RedefineScrollbars() - * METHOD ScrollHV - * METHOD SetupScrollbars() - * METHOD ResetScrollbars() - * FUNCTION onSize - ! fixes for scrooling of objects in containers - * source/hdatepic.prg + ! minor fix. + * source/hcwindow.prg + + METHOD RedefineScrollbars() + * METHOD ScrollHV + * METHOD SetupScrollbars() + * METHOD ResetScrollbars() + * FUNCTION onSize + ! fixes for scrooling of objects in containers + * source/hdatepic.prg * METHOD Value - * METHOD Valid - ! minor fix + * METHOD Valid + ! minor fix * source/hedit.prg - * METHOD Valid - ! fixed show to value type = "D" and SET CENTURY ON + * METHOD Valid + ! fixed show to value type = "D" and SET CENTURY ON * source/hcontrol.prg - * CLASS HControl - * METHOD Disable() - * METHOD SetFocus - ! minor Fix - * METHOD onAnchor( x, y, w, h ) - ! Minor Fix - * source/hhyper.prg + * CLASS HControl + * METHOD Disable() + * METHOD SetFocus + ! minor Fix + * METHOD onAnchor( x, y, w, h ) + ! Minor Fix + * source/hhyper.prg + DATA allMouseOver INIT .F. + DATA hBitmap - + DATA iStyle INIT ST_ALIGN_HORIZ + + DATA iStyle INIT ST_ALIGN_HORIZ + DATA lAllUnderline INIT .T. + DATA oFontUnder + DATA llost INIT .F. + DATA lOverTitle INIT .F. + DATA nWidthOver * METHOD New( ) - ! add parameters hbitmap, bClick - + METHOD Resize( ) + ! add parameters hbitmap, bClick + + METHOD Resize( ) * METHOD INIT() - * METHOD OnClicked() + * METHOD OnClicked() ! changed onclick event now accepts a block of code - * METHOD PAint( lpDis ) - ! add suport to images - * source/hwindow.prg - * CLASS HMainWindow - * METHOD Activate( () - ! add triggering event INIT of the objects - * STATIC FUNCTION onEraseBk - ! minor fix + * METHOD PAint( lpDis ) + ! add suport to images + * source/hwindow.prg + * CLASS HMainWindow + * METHOD Activate( () + ! add triggering event INIT of the objects + * STATIC FUNCTION onEraseBk + ! minor fix + 2012-07-02 13:50 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/draw.c + void TransparentBmp - * HB_FUNC( DRAWTRANSPARENTBITMAP ) - changed transparency method of using the function TransparentBmp + * HB_FUNC( DRAWTRANSPARENTBITMAP ) + changed transparency method of using the function TransparentBmp * source/nice.c + void Gradient - * HB_FUNC( GRADIENT ) - * source/misc.c - * HB_FUNC( SETSCROLLINFO ) - ! changed si.nMin = 1 to si.nMin = 0; - + * HB_FUNC( GRADIENT ) + * source/misc.c + * HB_FUNC( SETSCROLLINFO ) + ! changed si.nMin = 1 to si.nMin = 0; + 2012-07-02 13:20 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/htree.prg + DATA bKeyDown - + METHOD Top() + + METHOD Top() + METHOD Bottom() * Method Notify() - * add Notify TVN_KEYDOWN handling keyDown event passing three parameters ; ::oItem, nKeyDown, Self + * add Notify TVN_KEYDOWN handling keyDown event passing three parameters ; ::oItem, nKeyDown, Self * source/hsplit.prg * METHOD Paint() - * METHOD DragAll() - ! fix in redraw + * METHOD DragAll() + ! fix in redraw * source/hpanel.prg + METHOD ResizeOffSet( nMode , lRelease ) - * METHOD Hide() + * METHOD Hide() * METHOD Show() * METHOD Release() * METHOD Resize() - ! fixes in redraw and reposition in MDI_MAIN + ! fixes in redraw and reposition in MDI_MAIN 2012-06-06 15:10 UTC+0300 Alexander Kresin <al...@be...> * source/xml/hxmldoc.prg This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Basso, L. F. <lf...@vi...> - 2012-07-03 12:09:47
|
hi here work fine INIT WINDOW oWnd MAIN MDI AT 0,0 SIZE 800, 600; COLOR 16744703; TITLE "Test MDI Windows" ; BACKGROUND BITMAP HBitmap():AddFile('C:\xharbourcvs\hwgui\utils\designer\hwgui.jpg') -----Mensagem Original----- From: ss...@ma... Sent: Monday, July 02, 2012 11:38 PM To: hwg...@li... ; Basso, Luis Fernando Subject: Re: [Hwgui-commits] SF.net SVN: hwgui:[1847] trunk/hwgui Hi~~ This is not solution, I need background image, If no background image on MDI window, My program is so ugly. and window minimize can't to view and click still. > hi > INIT WINDOW oWnd MAIN MDI AT 0,0 SIZE 800, 600; > COLOR HBrush():Add(16744703):handle; > TITLE "Test MDI Windows"; > STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_VISIBLE ); > ON PAINT {|o,w| PaintWindow(o,w) } > > change to > INIT WINDOW oWnd MAIN MDI AT 0,0 SIZE 800, 600; > COLOR 16744703; > TITLE "Test MDI Windows" > // STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_VISIBLE ); > // ON PAINT {|o,w| PaintWindow(o,w) } > > here work fine with MDI CHILD > > > Luis Fernando Basso > lf...@vi... > > |
From: <LF...@us...> - 2012-07-03 11:46:52
|
Revision: 1848 http://hwgui.svn.sourceforge.net/hwgui/?rev=1848&view=rev Author: LFBASSO Date: 2012-07-03 11:46:41 +0000 (Tue, 03 Jul 2012) Log Message: ----------- Modified Paths: -------------- trunk/hwgui/source/hcwindow.prg Modified: trunk/hwgui/source/hcwindow.prg =================================================================== --- trunk/hwgui/source/hcwindow.prg 2012-07-02 17:52:47 UTC (rev 1847) +++ trunk/hwgui/source/hcwindow.prg 2012-07-03 11:46:41 UTC (rev 1848) @@ -530,8 +530,6 @@ RETURN Nil METHOD RedefineScrollbars() CLASS HCustomWindow - LOCAL nPosVert := GetScrollPos( ::handle, SB_VERT ) - LOCAL nPosHorz := GetScrollPos( ::handle, SB_HORZ ) ::rect := GetClientRect( ::handle ) IF ::nScrollBars > - 1 .AND. ::bScroll = Nil This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ss...@ma...> - 2012-07-03 02:38:44
|
Hi~~ This is not solution, I need background image, If no background image on MDI window, My program is so ugly. and window minimize can't to view and click still. > hi > INIT WINDOW oWnd MAIN MDI AT 0,0 SIZE 800, 600; > COLOR HBrush():Add(16744703):handle; > TITLE "Test MDI Windows"; > STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_VISIBLE ); > ON PAINT {|o,w| PaintWindow(o,w) } > > change to > INIT WINDOW oWnd MAIN MDI AT 0,0 SIZE 800, 600; > COLOR 16744703; > TITLE "Test MDI Windows" > // STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_VISIBLE ); > // ON PAINT {|o,w| PaintWindow(o,w) } > > here work fine with MDI CHILD > > > Luis Fernando Basso > lf...@vi... > > > Please solution MDICHILD window problem, I need it very much. > > > Revision: 1847 > > http://hwgui.svn.sourceforge.net/hwgui/?rev=1847&view=rev > > Author: LFBASSO > > Date: 2012-07-02 17:52:47 +0000 (Mon, 02 Jul 2012) > > Log Message: > > ----------- > > 2012-07-02 14:50 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> > > * source/guilib.ch > > * #xcommand @ <x>,<y> GET > > + [ ON SIZE <bSize> ] ; > > * #xcommand @ <x>,<y> SAY [ <oSay> CAPTION ] <caption> ; [ OF <oWnd> ] > > ; LINK <cLink> ; > > + [ ON CLICK <bClick> ] ; > > [ STYLE <nStyle> ] ; > > [ BITMAP <hbit> ] ; > > * #xcommand @ <x>,<y> TOOLBAR [ <oTool> ] > > + [ ON SIZE <bSize> ] ; > > * source/guimain.prg > > * FUNCTION FindSelf( hCtrl ) > > ! minor fix. > > * source/hcwindow.prg > > + METHOD RedefineScrollbars() > > * METHOD ScrollHV > > * METHOD SetupScrollbars() > > * METHOD ResetScrollbars() > > * FUNCTION onSize > > ! fixes for scrooling of objects in containers > > * source/hdatepic.prg > > * METHOD Value > > * METHOD Valid > > ! minor fix > > * source/hedit.prg > > * METHOD Valid > > ! fixed show to value type = "D" and SET CENTURY ON > > * source/hcontrol.prg > > * CLASS HControl > > * METHOD Disable() > > * METHOD SetFocus > > ! minor Fix > > * METHOD onAnchor( x, y, w, h ) > > ! Minor Fix > > * source/hhyper.prg > > + DATA allMouseOver INIT .F. > > + DATA hBitmap > > + DATA iStyle INIT ST_ALIGN_HORIZ > > + DATA lAllUnderline INIT .T. > > + DATA oFontUnder > > + DATA llost INIT .F. > > + DATA lOverTitle INIT .F. > > + DATA nWidthOver > > * METHOD New( ) > > ! add parameters hbitmap, bClick > > + METHOD Resize( ) > > * METHOD INIT() > > * METHOD OnClicked() > > ! changed onclick event now accepts a block of code > > * METHOD PAint( lpDis ) > > ! add suport to images > > * source/hwindow.prg > > * CLASS HMainWindow > > * METHOD Activate( () > > ! add triggering event INIT of the objects > > * STATIC FUNCTION onEraseBk > > ! minor fix > > > > Modified Paths: > > -------------- > > trunk/hwgui/Changelog > > trunk/hwgui/include/guilib.ch > > trunk/hwgui/source/guimain.prg > > trunk/hwgui/source/hcontrol.prg > > trunk/hwgui/source/hcwindow.prg > > trunk/hwgui/source/hdatepic.prg > > trunk/hwgui/source/hedit.prg > > trunk/hwgui/source/hhyper.prg > > trunk/hwgui/source/hwindow.prg > > |
From: <ss...@ma...> - 2012-07-03 00:37:17
|
Please solution MDICHILD window problem, I need it very much. > Revision: 1847 > http://hwgui.svn.sourceforge.net/hwgui/?rev=1847&view=rev > Author: LFBASSO > Date: 2012-07-02 17:52:47 +0000 (Mon, 02 Jul 2012) > Log Message: > ----------- > 2012-07-02 14:50 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> > * source/guilib.ch > * #xcommand @ <x>,<y> GET > + [ ON SIZE <bSize> ] ; > * #xcommand @ <x>,<y> SAY [ <oSay> CAPTION ] <caption> ; [ OF <oWnd> ] ; LINK <cLink> ; > + [ ON CLICK <bClick> ] ; > [ STYLE <nStyle> ] ; > [ BITMAP <hbit> ] ; > * #xcommand @ <x>,<y> TOOLBAR [ <oTool> ] > + [ ON SIZE <bSize> ] ; > * source/guimain.prg > * FUNCTION FindSelf( hCtrl ) > ! minor fix. > * source/hcwindow.prg > + METHOD RedefineScrollbars() > * METHOD ScrollHV > * METHOD SetupScrollbars() > * METHOD ResetScrollbars() > * FUNCTION onSize > ! fixes for scrooling of objects in containers > * source/hdatepic.prg > * METHOD Value > * METHOD Valid > ! minor fix > * source/hedit.prg > * METHOD Valid > ! fixed show to value type = "D" and SET CENTURY ON > * source/hcontrol.prg > * CLASS HControl > * METHOD Disable() > * METHOD SetFocus > ! minor Fix > * METHOD onAnchor( x, y, w, h ) > ! Minor Fix > * source/hhyper.prg > + DATA allMouseOver INIT .F. > + DATA hBitmap > + DATA iStyle INIT ST_ALIGN_HORIZ > + DATA lAllUnderline INIT .T. > + DATA oFontUnder > + DATA llost INIT .F. > + DATA lOverTitle INIT .F. > + DATA nWidthOver > * METHOD New( ) > ! add parameters hbitmap, bClick > + METHOD Resize( ) > * METHOD INIT() > * METHOD OnClicked() > ! changed onclick event now accepts a block of code > * METHOD PAint( lpDis ) > ! add suport to images > * source/hwindow.prg > * CLASS HMainWindow > * METHOD Activate( () > ! add triggering event INIT of the objects > * STATIC FUNCTION onEraseBk > ! minor fix > > Modified Paths: > -------------- > trunk/hwgui/Changelog > trunk/hwgui/include/guilib.ch > trunk/hwgui/source/guimain.prg > trunk/hwgui/source/hcontrol.prg > trunk/hwgui/source/hcwindow.prg > trunk/hwgui/source/hdatepic.prg > trunk/hwgui/source/hedit.prg > trunk/hwgui/source/hhyper.prg > trunk/hwgui/source/hwindow.prg > > Modified: trunk/hwgui/Changelog > =================================================================== > --- trunk/hwgui/Changelog 2012-07-02 16:52:31 UTC (rev 1846) > +++ trunk/hwgui/Changelog 2012-07-02 17:52:47 UTC (rev 1847) > @@ -9,6 +9,63 @@ > */ > > > +2012-07-02 14:50 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> > + * source/guilib.ch > + * #xcommand @ <x>,<y> GET > + + [ ON SIZE <bSize> ] ; > + * #xcommand @ <x>,<y> SAY [ <oSay> CAPTION ] <caption> ; [ OF <oWnd> ] ; LINK <cLink> ; > + + [ ON CLICK <bClick> ] ; > + [ STYLE <nStyle> ] ; > + [ BITMAP <hbit> ] ; > + * #xcommand @ <x>,<y> TOOLBAR [ <oTool> ] > + + [ ON SIZE <bSize> ] ; > + * source/guimain.prg > + * FUNCTION FindSelf( hCtrl ) > + ! minor fix. > + * source/hcwindow.prg > + + METHOD RedefineScrollbars() > + * METHOD ScrollHV > + * METHOD SetupScrollbars() > + * METHOD ResetScrollbars() > + * FUNCTION onSize > + ! fixes for scrooling of objects in containers > + * source/hdatepic.prg > + * METHOD Value > + * METHOD Valid > + ! minor fix > + * source/hedit.prg > + * METHOD Valid > + ! fixed show to value type = "D" and SET CENTURY ON > + * source/hcontrol.prg > + * CLASS HControl > + * METHOD Disable() > + * METHOD SetFocus > + ! minor Fix > + * METHOD onAnchor( x, y, w, h ) > + ! Minor Fix > + * source/hhyper.prg > + + DATA allMouseOver INIT .F. > + + DATA hBitmap > + + DATA iStyle INIT ST_ALIGN_HORIZ > + + DATA lAllUnderline INIT .T. > + + DATA oFontUnder > + + DATA llost INIT .F. > + + DATA lOverTitle INIT .F. > + + DATA nWidthOver > + * METHOD New( ) > + ! add parameters hbitmap, bClick > + + METHOD Resize( ) > + * METHOD INIT() > + * METHOD OnClicked() > + ! changed onclick event now accepts a block of code > + * METHOD PAint( lpDis ) > + ! add suport to images > + * source/hwindow.prg > + * CLASS HMainWindow > + * METHOD Activate( () > + ! add triggering event INIT of the objects > + * STATIC FUNCTION onEraseBk > + ! minor fix > 2012-07-02 13:50 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> > * source/draw.c > + void TransparentBmp > > Modified: trunk/hwgui/include/guilib.ch > =================================================================== > --- trunk/hwgui/include/guilib.ch 2012-07-02 16:52:31 UTC (rev 1846) > +++ trunk/hwgui/include/guilib.ch 2012-07-02 17:52:47 UTC (rev 1847) > @@ -43,8 +43,8 @@ > #define ANCHOR_HORFIX 256 // Anchors center of control relative to left and right borders but remains fixed in size. > #define ANCHOR_VERTFIX 512 // Anchors center of control relative to top and bottom borders but remains fixed in size. > > -#define HORZ_PTS 7 //8 > -#define VERT_PTS 3.5 //4 > +#define HORZ_PTS 9 > +#define VERT_PTS 12 > > #ifdef __XHARBOUR__ > #ifndef HB_SYMBOL_UNUSED > @@ -1155,6 +1155,7 @@ > [<lnoborder: NOBORDER>] ; > [ FONT <oFont> ] ; > [ ON INIT <bInit> ] ; > + [ ON SIZE <bSize> ] ; > [ TOOLTIP <ctoolt> ] ; > [ ON KEYDOWN <bKeyDown> ]; > [ ON CHANGE <bChange> ] ; > @@ -1162,7 +1163,7 @@ > => ; > [<oEdit> := ] HEdit():New( <oWnd>,<nId>,<vari>, ; > {|v|Iif(v==Nil,<vari>,<vari>:=v)}, ; > - <nStyle>,<x>,<y>,<width>,<height>,<oFont>,<bInit>,,, ; > + <nStyle>,<x>,<y>,<width>,<height>,<oFont>,<bInit>,<bSize> ,, ; > <bGfocus>,<bLfocus>,<ctoolt>,<color>,<bcolor>,<cPicture>,; > <.lnoborder.>,<nMaxLength>,<.lPassword.>,<bKeyDown>,<bChange>,<bOther>);; > [ <oEdit>:name := <(oEdit)> ] > @@ -1658,16 +1659,18 @@ > [ ON INIT <bInit> ] ; > [ ON SIZE <bSize> ] ; > [ ON PAINT <bDraw> ] ; > + [ ON CLICK <bClick> ] ; > [ STYLE <nStyle> ] ; > [ FONT <oFont> ] ; > [ TOOLTIP <ctoolt> ] ; > + [ BITMAP <hbit> ] ; > [ VISITCOLOR <vcolor> ] ; > [ LINKCOLOR <lcolor> ] ; > [ HOVERCOLOR <hcolor> ] ; > => ; > [<oSay> := ] HStaticLink():New( <oWnd>, <nId>, <nStyle>, <x>, <y>, <width>, ; > <height>, <caption>, <oFont>, <bInit>, <bSize>, <bDraw>, <ctoolt>, ; > - <color>, <bcolor>, <.lTransp.>, <cLink>, <vcolor>, <lcolor>, <hcolor> );; > + <color>, <bcolor>, <.lTransp.>, <cLink>, <vcolor>, <lcolor>, <hcolor>,<hbit>, <bClick> );; > [ <oSay>:name := <(oSay)> ] > > #xcommand REDEFINE SAY [ <oSay> CAPTION ] <cCaption> ; > @@ -1708,9 +1711,10 @@ > [ SIZE <width>, <height> ] ; > [ BUTTONWIDTH <btnwidth> ] ; > [ INDENT <nIndent> ] ; > - [ BITMAPSIZE <nSize> ] ; > + [ BITMAPSIZE <nSize> ] ; > [ FONT <oFont> ] ; > [ ON INIT <bInit> ] ; > + [ ON SIZE <bSize> ] ; > [<lTransp: TRANSPARENT>] ; > [<lVertical: VERTICAL>] ; > [ STYLE <nStyle> ] ; > @@ -1718,7 +1722,7 @@ > [ ITEMS <aItems> ] ; > => ; > [<oTool> := ] Htoolbar():New( <oWnd>,<nId>,<nStyle>,<x>,<y>,<width>, <height>,<btnwidth>,<oFont>,; > - <bInit>,,,,,,<.lTransp.>,<.lVertical.>,<aItems>,<nSize>,<nIndent>,<nIDB>) ;; > + <bInit>,<bSize>,,,,,<.lTransp.>,<.lVertical.>,<aItems>,<nSize>,<nIndent>,<nIDB>) ;; > [ <oTool>:name := <(oTool)> ] > > #xcommand REDEFINE TOOLBAR <oSay> ; > > Modified: trunk/hwgui/source/guimain.prg > =================================================================== > --- trunk/hwgui/source/guimain.prg 2012-07-02 16:52:31 UTC (rev 1846) > +++ trunk/hwgui/source/guimain.prg 2012-07-02 17:52:47 UTC (rev 1847) > @@ -103,7 +103,7 @@ > IF oParent == Nil > oParent := GetAncestor( hCtrl, GA_PARENT ) > ENDIF > - IF oParent != Nil > + IF oParent != Nil .AND. VALTYPE( oParent ) != "N" > RETURN oParent:FindControl( , hCtrl ) > ENDIF > RETURN Nil > > Modified: trunk/hwgui/source/hcontrol.prg > =================================================================== > --- trunk/hwgui/source/hcontrol.prg 2012-07-02 16:52:31 UTC (rev 1846) > +++ trunk/hwgui/source/hcontrol.prg 2012-07-02 17:52:47 UTC (rev 1847) > @@ -67,7 +67,8 @@ > METHOD Show( nShow ) INLINE ::Super:Show( nShow ), IIF( ::oParent:lGetSkipLostFocus,; > PostMessage( GetActiveWindow() , WM_NEXTDLGCTL, IIF( ::oParent:FindControl(, GetFocus() ) != NIL, 0, ::handle ), 1 ) , .T. ) > METHOD Hide() INLINE ( ::oParent:lGetSkipLostFocus := .F., ::Super:Hide() ) > - METHOD Disable() INLINE EnableWindow( ::handle, .F. ) > + //METHOD Disable() INLINE EnableWindow( ::handle, .F. ) > + METHOD Disable() INLINE ( IIF( SELFFOCUS( ::Handle ), SendMessage( GetActiveWindow(), WM_NEXTDLGCTL, 0, 0 ) , ), EnableWindow( ::handle, .F. ) ) > METHOD Enable() > METHOD IsEnabled() INLINE IsWindowEnabled( ::Handle ) > METHOD Enabled( lEnabled ) SETGET > @@ -208,7 +209,10 @@ > LOCAL lSuspend := ::oParent:lSuspendMsgsHandling > > IF ! IsWindowEnabled( ::Handle ) > - GetSkip( ::oParent, ::handle, , 1 ) > + ::oParent:lSuspendMsgsHandling := .T. > + // GetSkip( ::oParent, ::handle, , 1 ) > + SendMessage( GetActiveWindow(), WM_NEXTDLGCTL, 0, 0 ) > + ::oParent:lSuspendMsgsHandling := lSuspend > ELSE > ::oParent:lSuspendMsgsHandling := ! Empty( lValid ) > IF ::GetParentForm():Type < WND_DLG_RESOURCE > @@ -218,6 +222,10 @@ > ENDIF > ::oParent:lSuspendMsgsHandling := lSuspend > ENDIF > + IF ::GetParentForm():Type < WND_DLG_RESOURCE > + ::GetParentForm():nFocus := ::Handle > + ENDIF > + > RETURN Nil > > METHOD Enable() CLASS HControl > @@ -469,37 +477,46 @@ > // REDRAW AND INVALIDATE SCREEN > IF ( x1 != X9 .OR. y1 != y9 .OR. w1 != w9 .OR. h1 != h9 ) > IF isWindowVisible( ::handle ) > - IF ( x1 != x9 .or. y1 != y9 ) .AND. x9 < ::oParent:nWidth > - InvalidateRect( ::oParent:handle, 1, MAX( x9 - 1, 0 ), MAX( y9 - 1, 0 ), x9 + w9 + nCxv, y9 + h9 + nCyh ) > - ELSE > - IF w1 < w9 > - InvalidateRect( ::oParent:handle, 1, x1 + w1 - nCxv, MAX( y1 - 2, 0 ), x1 + w9 + 2 , y9 + h9 + 2 ) > - ENDIF > - IF h1 < h9 > - InvalidateRect( ::oParent:handle, 1, MAX( x1 - 5, 0 ) , y1 + h1 - nCyh, x1 + w9 + 2 , y1 + h9 + 2 ) > - ENDIF > - ENDIF > + IF HWG_BITAND( ::Style, WS_CLIPCHILDREN ) = 0 .AND. ( w1 > w9 .OR. h1 > H9 ) > + IF ( x1 != x9 .or. y1 != y9 ) .AND. x9 < ::oParent:nWidth > + InvalidateRect( ::oParent:handle, 1, MAX( x9 - 1, 0 ), MAX( y9 - 1, 0 ), ; > + x9 + w9 + nCxv, y9 + h9 + nCyh ) > + ELSE > + IF w1 < w9 > + InvalidateRect( ::oParent:handle, 1, x1 + w1 - nCxv, MAX( y1 - 2, 0 ), ; > + x1 + w9 + 2 , y9 + h9 + 2 ) > + ENDIF > + IF h1 < h9 > + InvalidateRect( ::oParent:handle, 0, MAX( x1 - 5, 0 ) , y1 + h1 - nCyh, ; > + x1 + w9 + 2 , y1 + h9 + 2 ) > + ENDIF > + ENDIF > > - ::Move( x1, y1, w1, h1, 0 ) > - //SetWindowPos( ::Handle, Nil, x1, y1, w1, h1, SWP_NOACTIVATE + SWP_NOZORDER + SWP_NOREDRAW ) > + ::Move( x1, y1, w1, h1, 0 ) //HWG_BITAND( ::Style, WS_CLIPCHILDREN ) ) > > - IF ( ( x1 != x9 .OR. y1 != y9 ) .AND. ( ISBLOCK( ::bPaint ) .OR. x9 + w9 > ::oParent:nWidth ) ) .OR. ( ::backstyle = TRANSPARENT .AND. ; > - ( ::Title != Nil .AND. ! Empty( ::Title ) ) ) .OR. __ObjHasMsg( Self,"oImage" ) > - IF __ObjHasMsg( Self, "oImage" ) .OR. ::backstyle = TRANSPARENT //.OR. w9 != w1 > - InvalidateRect( ::oParent:handle, 0, MAX( x1 - 1, 0 ), MAX( y1 - 1, 0 ), x1 + w1 + 1 , y1 + h1 + 1 ) > - ELSE > - RedrawWindow( ::handle, RDW_NOERASE + RDW_INVALIDATE + RDW_INTERNALPAINT ) > - ENDIF > + IF ( ( x1 != x9 .OR. y1 != y9 ) .AND. ( ISBLOCK( ::bPaint ) .OR. ; > + x9 + w9 > ::oParent:nWidth ) ) .OR. ( ::backstyle = TRANSPARENT .AND. ; > + ( ::Title != Nil .AND. ! Empty( ::Title ) ) ) .OR. __ObjHasMsg( Self,"oImage" ) > + IF __ObjHasMsg( Self, "oImage" ) .OR. ::backstyle = TRANSPARENT //.OR. w9 != w1 > + InvalidateRect( ::oParent:handle, 0, MAX( x1 - 1, 0 ), MAX( y1 - 1, 0 ), x1 + w1 + 1 , y1 + h1 + 1 ) > + ELSE > + RedrawWindow( ::handle, RDW_NOERASE + RDW_INVALIDATE + RDW_INTERNALPAINT ) > + ENDIF > + ELSE > + IF LEN( ::aControls ) = 0 .AND. ::Title != Nil > + InvalidateRect( ::handle, 0 ) > + ENDIF > + IF w1 > w9 > + InvalidateRect( ::oParent:handle, 0 , MAX( x1 + w9 - ( w1 - w9 + nCxv ), 0 ) ,; > + MAX( y1 , 0 ) , x1 + w1 + 1 , y1 + h1 ) > + ENDIF > + IF h1 > h9 > + InvalidateRect( ::oParent:handle, 1 , MAX( x1 , 0) , ; > + MAX( y1 + h9 - ( h1 - h9 + nCyh ), 0 ) , x1 + w1 + 1 , y1 + h1 ) > + ENDIF > + ENDIF > ELSE > - IF LEN( ::aControls ) = 0 .AND. ::Title != Nil > - InvalidateRect( ::handle, 0 ) > - ENDIF > - IF w1 > w9 > - InvalidateRect( ::oParent:handle, 0 , MAX( x1 + w9 - ( w1 - w9 + nCxv ), 0 ) , MAX( y1 , 0 ) , x1 + w1 + 1 , y1 + h1 ) > - ENDIF > - IF h1 > h9 > - InvalidateRect( ::oParent:handle, 0 , MAX( x1 , 0) , MAX( y1 + h9 - ( h1 - h9 + nCyh ), 0 ) , x1 + w1 + 1 , y1 + h1 ) > - ENDIF > + ::Move( x1, y1, w1, h1, 1 ) > ENDIF > IF ( ::winClass == "ToolbarWindow32" .OR. ::winClass == "msctls_statusbar32" ) > ::Resize( nXincRelative, 1 ) > > Modified: trunk/hwgui/source/hcwindow.prg > =================================================================== > --- trunk/hwgui/source/hcwindow.prg 2012-07-02 16:52:31 UTC (rev 1846) > +++ trunk/hwgui/source/hcwindow.prg 2012-07-02 17:52:47 UTC (rev 1847) > @@ -131,6 +131,7 @@ > METHOD ScrollHV( oForm, msg, wParam, lParam ) > METHOD ResetScrollbars() > METHOD SetupScrollbars() > + METHOD RedefineScrollbars() > METHOD SetTextClass ( x ) HIDDEN > METHOD GetParentForm( oCtrl ) > METHOD ActiveControl() INLINE ::FindControl( , GetFocus() ) > @@ -419,7 +420,7 @@ > RETURN .T. > > METHOD ScrollHV( oForm, msg,wParam,lParam ) CLASS HCustomWindow > - Local nDelta, nSBCode , nPos, nInc, nInc2 := 0 > + Local nDelta, nSBCode , nPos, nInc > > HB_SYMBOL_UNUSED(lParam) > > @@ -446,7 +447,6 @@ > nInc := max( 1, oForm:nVertInc) > Case nSBCode = SB_THUMBTRACK > nPos := hiword( wParam ) > - nInc2 := IIF( nPos > oForm:nVscrollPos, 0.125, - 0.125 ) > nInc := nPos - oForm:nVscrollPos > OTHERWISE > nInc := 0 > @@ -462,20 +462,19 @@ > Case SB_LINEDOWN > nInc := Int( oForm:nVertInc * 0.05 + 0.49); EXIT > Case SB_PAGEUP > - nInc := min( - 1, - oForm:nVertInc ); EXIT > + nInc := min( - 1, - oForm:nVertInc / 2 ); EXIT > Case SB_PAGEDOWN > - nInc := max( 1, oForm:nVertInc); EXIT > + nInc := max( 1, oForm:nVertInc / 2 ); EXIT > Case SB_THUMBTRACK > nPos := hiword( wParam ) > - nInc2 := IIF( nPos > oForm:nVscrollPos, 0.125, - 0.125 ) > nInc := nPos - oForm:nVscrollPos ; EXIT > Default > nInc := 0 > END > #endif > - nInc := max( - oForm:nVscrollPos, min( nInc, oForm:nVscrollMax - oForm:nVscrollPos)) > + nInc := Max( - oForm:nVscrollPos, Min( nInc, oForm:nVscrollMax - oForm:nVscrollPos)) > oForm:nVscrollPos += nInc > - nDelta := - VERT_PTS * ( nInc + nInc2 ) > + nDelta := - VERT_PTS * nInc > ScrollWindow( oForm:handle, 0, nDelta ) //, Nil, NIL ) > SetScrollPos( oForm:Handle, SB_VERT, oForm:nVscrollPos, .T. ) > > @@ -530,60 +529,97 @@ > ENDIF > RETURN Nil > > +METHOD RedefineScrollbars() CLASS HCustomWindow > + LOCAL nPosVert := GetScrollPos( ::handle, SB_VERT ) > + LOCAL nPosHorz := GetScrollPos( ::handle, SB_HORZ ) > > + ::rect := GetClientRect( ::handle ) > + IF ::nScrollBars > - 1 .AND. ::bScroll = Nil > + IF ::nVscrollPos = 0 > + ::ncurHeight := 0 //* 4 > + AEval( ::aControls, { | o | ::ncurHeight := INT( Max( o:nTop + o:nHeight + VERT_PTS * 1, ; > + ::ncurHeight ) ) } ) > + ENDIF > + IF ::nHscrollPos = 0 > + ::ncurWidth := 0 // * 4 > + AEval( ::aControls, { | o | ::ncurWidth := INT( Max( o:nLeft + o:nWidth + HORZ_PTS * 1, ; > + ::ncurWidth ) ) } ) > + ENDIF > + ::ResetScrollbars() > + ::SetupScrollbars() > + ENDIF > + RETURN Nil > + > + > METHOD SetupScrollbars() CLASS HCustomWindow > - LOCAL tempRect, nwMax, nhMax , aMenu > + LOCAL tempRect, nwMax, nhMax , aMenu, nPos > > tempRect := GetClientRect( ::handle ) > aMenu := IIF( __objHasData( Self, "MENU" ), ::menu, Nil ) > // Calculate how many scrolling increments for the client area > IF ::Type = WND_MDICHILD //.AND. ::aRectSave != Nil > - nwMax := max( ::ncurWidth, tempRect[ 3 ] ) //::maxWidth > - nhMax := max( ::ncurHeight , tempRect[ 4 ] ) //::maxHeight > + nwMax := Max( ::ncurWidth, tempRect[ 3 ] ) //::maxWidth > + nhMax := Max( ::ncurHeight , tempRect[ 4 ] ) //::maxHeight > ::nHorzInc := INT( ( nwMax - tempRect[ 3 ] ) / HORZ_PTS ) > ::nVertInc := INT( ( nhMax - tempRect[ 4 ] ) / VERT_PTS ) > ELSE > - nwMax := max( ::ncurWidth, ::Rect[ 3 ] ) > - nhMax := max( ::ncurHeight, ::Rect[ 4 ] ) > - ::nHorzInc := ( nwMax - tempRect[ 3 ] ) / HORZ_PTS - HORZ_PTS > - ::nVertInc := ( nhMax - tempRect[ 4 ] ) / VERT_PTS + VERT_PTS - ; > - IIF( amenu != Nil, GetSystemMetrics( SM_CYMENU ), 0 ) // MENU > + nwMax := Max( ::ncurWidth, ::Rect[ 3 ] ) > + nhMax := Max( ::ncurHeight, ::Rect[ 4 ] ) > + ::nHorzInc := INT( ( nwMax - tempRect[ 3 ] ) / HORZ_PTS + HORZ_PTS ) > + ::nVertInc := INT( ( nhMax - tempRect[ 4 ] ) / VERT_PTS + VERT_PTS - ; > + IIF( amenu != Nil, GetSystemMetrics( SM_CYMENU ), 0 ) ) // MENU > ENDIF > // Set the vertical and horizontal scrolling info > IF ::nScrollBars = 0 .OR. ::nScrollBars = 2 > - ::nHscrollMax := max( 0, ::nHorzInc ) > + ::nHscrollMax := Max( 0, ::nHorzInc ) > IF ::nHscrollMax < HORZ_PTS / 2 > - ScrollWindow( ::Handle, ::nHscrollPos * HORZ_PTS, 0 ) > - ELSEIF ::nHScrollMax / HORZ_PTS < HORZ_PTS > + *- ScrollWindow( ::Handle, ::nHscrollPos * HORZ_PTS, 0 ) > + ELSEIF ::nHScrollMax <= HORZ_PTS > ::nHScrollMax := 0 > ENDIF > - ::nHscrollPos := min( ::nHscrollPos, ::nHscrollMax ) > + ::nHscrollPos := Min( ::nHscrollPos, ::nHscrollMax ) > SetScrollPos( ::handle, SB_HORZ, ::nHscrollPos, .T. ) > - SetScrollInfo( ::Handle, SB_HORZ, 1, 0, ::nHScrollMax / HORZ_PTS , ::nHscrollMax ) > + SetScrollInfo( ::Handle, SB_HORZ, 1, ::nHScrollPos , HORZ_PTS, ::nHscrollMax ) > + IF ::nHscrollPos > 0 > + nPos := GetScrollPos( ::handle, SB_HORZ ) > + IF nPos < ::nHscrollPos > + ScrollWindow( ::Handle, 0, ( ::nHscrollPos - nPos ) * SB_HORZ ) > + ::nVscrollPos := nPos > + SetScrollPos( ::Handle, SB_HORZ, ::nHscrollPos, .T. ) > + ENDIF > + ENDIF > ENDIF > IF ::nScrollBars = 1 .OR. ::nScrollBars = 2 > - ::nVscrollMax := max( 0, ::nVertInc ) > + ::nVscrollMax := INT( Max( 0, ::nVertInc ) ) > IF ::nVscrollMax < VERT_PTS / 2 > - ScrollWindow( ::Handle, 0, ::nVscrollPos * VERT_PTS ) > - ELSEIF ::nVScrollMax / VERT_PTS < VERT_PTS > - ::nVScrollMax := 0 > + *- ScrollWindow( ::Handle, 0, ::nVscrollPos * VERT_PTS ) > + ELSEIF ::nVScrollMax <= VERT_PTS > + ::nVScrollMax := 0 > ENDIF > - ::nVscrollPos := min( ::nVscrollPos, ::nVscrollMax ) > - SetScrollPos( ::handle, SB_VERT, ::nVscrollPos, .T. ) > - SetScrollInfo( ::Handle, SB_VERT, 1, 0, ::nVScrollMax / VERT_PTS , ::nVscrollMax ) > + SetScrollPos( ::Handle, SB_VERT, ::nVscrollPos, .T. ) > + SetScrollInfo( ::Handle, SB_VERT, 1, ::nVscrollPos , VERT_PTS, ::nVscrollMax ) > + IF ::nVscrollPos > 0 //.AND. nPosVert != ::nVscrollPos > + nPos := GetScrollPos( ::handle, SB_VERT ) > + IF nPos < ::nVscrollPos > + ScrollWindow( ::Handle, 0, ( ::nVscrollPos - nPos ) * VERT_PTS ) > + ::nVscrollPos := nPos > + SetScrollPos( ::Handle, SB_VERT, ::nVscrollPos, .T. ) > + ENDIF > + ENDIF > ENDIF > RETURN Nil > > METHOD ResetScrollbars() CLASS HCustomWindow > // Reset our window scrolling information > Local lMaximized := GetWindowPlacement( ::handle ) == SW_MAXIMIZE > + > IF lMaximized > ScrollWindow( ::Handle, ::nHscrollPos * HORZ_PTS, 0 ) > ScrollWindow( ::Handle, 0, ::nVscrollPos * VERT_PTS ) > ::nHscrollPos := 0 > ::nVscrollPos := 0 > ENDIF > - > + /* > IF ::nScrollBars = 0 .OR. ::nScrollBars = 2 > ScrollWindow( ::Handle, 0 * HORZ_PTS, 0 ) > SetScrollPos( ::Handle, SB_HORZ, 0, .T. ) > @@ -592,7 +628,9 @@ > ScrollWindow( ::Handle, 0, 0 * VERT_PTS ) > SetScrollPos( ::Handle, SB_VERT, 0, .T. ) > ENDIF > + */ > RETURN Nil > + > /* > METHOD ScrollHV( oForm, msg, wParam, lParam ) CLASS HCustomWindow > LOCAL nDelta, nMaxPos, wmsg , nPos > @@ -808,33 +846,38 @@ > nw1 := oWnd:nWidth > nh1 := oWnd:nHeight > aCoors := GetWindowRect( oWnd:handle ) > - > IF EMPTY( oWnd:Type ) > - oWnd:nWidth := aCoors[ 3 ] - aCoors[ 1 ] > + oWnd:nWidth := aCoors[ 3 ] - aCoors[ 1 ] > oWnd:nHeight := aCoors[ 4 ] - aCoors[ 2 ] > ELSE > nWindowState := oWnd:WindowState > IF wParam != 1 .AND. ( oWnd:GETMDIMAIN() != Nil .AND. ! oWnd:GETMDIMAIN():IsMinimized() ) //SIZE_MINIMIZED > - oWnd:nWidth := aCoors[ 3 ] - aCoors[ 1 ] > + oWnd:nWidth := aCoors[ 3 ] - aCoors[ 1 ] > oWnd:nHeight := aCoors[ 4 ] - aCoors[ 2 ] > IF oWnd:Type = WND_MDICHILD .AND. oWnd:GETMDIMAIN() != Nil .AND. wParam != 1 .AND. oWnd:GETMDIMAIN():WindowState = 2 > nWindowState := SW_SHOWMINIMIZED > ENDIF > ENDIF > ENDIF > - IF oWnd:nScrollBars > - 1 .AND. oWnd:lAutoScroll > + IF oWnd:nScrollBars > - 1 .AND. oWnd:lAutoScroll .AND. ! EMPTY( oWnd:Type ) > onMove( oWnd ) > oWnd:ResetScrollbars() > oWnd:SetupScrollbars() > ENDIF > - IF wParam != 1 .AND. nWindowState != 2 > - IF !EMPTY( oWnd:Type) .AND. oWnd:Type = WND_MDI .AND. !EMPTY( oWnd:Screen ) > + IF wParam != 1 .AND. nWindowState != 2 > + IF !EMPTY( oWnd:Type) .AND. oWnd:Type = WND_MDI .AND. ! EMPTY( oWnd:Screen ) > oWnd:Anchor( oWnd:Screen, nw1, nh1, oWnd:nWidth, oWnd:nHeight ) > ENDIF > IF ! EMPTY( oWnd:Type) > - oWnd:Anchor( oWnd, nw1, nh1, oWnd:nWidth, oWnd:nHeight ) > + oWnd:Anchor( oWnd, nw1, nh1, oWnd:nWidth, oWnd:nHeight) > ENDIF > ENDIF > + IF oWnd:nScrollBars > - 1 .AND. oWnd:lAutoScroll .AND. ! EMPTY( oWnd:Type ) > + onMove( oWnd ) > + oWnd:ResetScrollbars() > + oWnd:SetupScrollbars() > + ENDIF > + > FOR EACH oItem IN aControls > IF oItem:bSize != NIL > Eval( oItem:bSize, oItem, LOWORD( lParam ), HIWORD( lParam ) ) > > Modified: trunk/hwgui/source/hdatepic.prg > =================================================================== > --- trunk/hwgui/source/hdatepic.prg 2012-07-02 16:52:31 UTC (rev 1846) > +++ trunk/hwgui/source/hdatepic.prg 2012-07-02 17:52:47 UTC (rev 1847) > @@ -158,7 +158,7 @@ > METHOD Value( Value ) CLASS HDatePicker > > IF Value != Nil > - ::SetValue( ::dValue, Value ) > + ::SetValue( Value ) > ENDIF > RETURN IIF( ::lShowTime, ::tValue, ::dValue ) > > @@ -256,7 +256,7 @@ > ENDIF > ::dValue := GetDatePicker( ::handle ) > IF ::bSetGet != Nil > - Eval( ::bSetGet, ::dValue, Self ) > + Eval( ::bSetGet, IIF( ::lShowTime, ::tValue,::dValue ), Self ) > ENDIF > IF ::bLostFocus != Nil > ::oparent:lSuspendMsgsHandling := .T. > > Modified: trunk/hwgui/source/hedit.prg > =================================================================== > --- trunk/hwgui/source/hedit.prg 2012-07-02 16:52:31 UTC (rev 1846) > +++ trunk/hwgui/source/hedit.prg 2012-07-02 17:52:47 UTC (rev 1847) > @@ -1167,6 +1167,10 @@ > RETURN .T. > ENDIF > vari := CToD( vari ) > + IF CSetCent( ) .AND. LEN( Trim ( ::title ) ) < 10 > + ::title := DTOC( vari ) .AND. LEN( ::title ) = 8 > + SetDlgItemText( ::oParent:handle, ::id, ::title ) > + ENDIF > ELSEIF ::cType == "N" > vari := Val( LTrim( vari ) ) > ::title := Transform( vari, ::cPicFunc + IIf( Empty( ::cPicFunc ), "", " " ) + ::cPicMask ) > > Modified: trunk/hwgui/source/hhyper.prg > =================================================================== > --- trunk/hwgui/source/hhyper.prg 2012-07-02 16:52:31 UTC (rev 1846) > +++ trunk/hwgui/source/hhyper.prg 2012-07-02 17:52:47 UTC (rev 1847) > @@ -40,11 +40,21 @@ > DATA m_sHoverColor > DATA m_sLinkColor > DATA m_sVisitedColor > + > + DATA allMouseOver INIT .F. > + DATA hBitmap > + DATA iStyle INIT ST_ALIGN_HORIZ //ST_ALIGN_HORIZ_RIGHT > + DATA lAllUnderline INIT .T. > + DATA oFontUnder > + DATA llost INIT .F. > + DATA lOverTitle INIT .F. > + DATA nWidthOver > > + > CLASS VAR winclass INIT "STATIC" > > METHOD New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, cCaption, oFont, bInit, ; > - bSize, bPaint, ctooltip, tcolor, bcolor, lTransp, cLink, vColor, lColor, hColor ) > + bSize, bPaint, ctooltip, tcolor, bcolor, lTransp, cLink, vColor, lColor, hColor, hbitmap, bClick ) > METHOD Redefine( oWndParent, nId, cCaption, oFont, bInit, ; > bSize, bPaint, ctooltip, tcolor, bcolor, lTransp, cLink, vColor, lColor, hColor ) > METHOD INIT() > @@ -62,14 +72,19 @@ > METHOD SetLinkColor( sLinkColor ) > METHOD PAint( lpDis ) > METHOD OnMouseMove( nFlags, lParam ) > + METHOD Resize( ) > > ENDCLASS > > METHOD New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, cCaption, oFont, bInit, ; > - bSize, bPaint, ctooltip, tcolor, bcolor, lTransp, cLink, vColor, lColor, hColor ) CLASS HStaticLink > + bSize, bPaint, ctooltip, tcolor, bcolor, lTransp, cLink, vColor, lColor, hColor, hbitmap, bClick ) CLASS HStaticLink > LOCAL oPrevFont > > nStyle := Hwg_BitOR( nStyle, SS_NOTIFY + SS_RIGHT ) > + ::lAllUnderline := IIF( EMPTY( cLink ), .F., ::lAllUnderline ) > + ::title := IIF(cCaption != Nil,cCaption ,"HWGUI HomePage") > + ::hbitmap := hbitmap > + > Super:New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, cCaption, oFont, bInit, ; > bSize, bPaint, ctooltip, tcolor, bcolor, lTransp ) > > @@ -90,16 +105,17 @@ > ::oFont := HFONT():Add( ::oParent:oFont:name, ::oParent:oFont:width, ::oParent:oFont:height, ; > ::oParent:oFont:weight, ::oParent:oFont:charset, ::oParent:oFont:italic, 1, ::oParent:oFont:StrikeOut ) > ELSE > - ::oFont := HFONT():Add( "Arial", 0, - 12, , , , 1, ) > + ::oFont := HFONT():Add( "Arial", 0, - 12, , , , IIF( ::lAllUnderline, 1, ), ) > ENDIF > ELSE > - IF ::oFont:Underline == 0 > + IF ::oFont:Underline == 0 .AND. ::lAllUnderline > oPrevFont := ::oFont > ::oFont:Release() > ::oFont := HFONT():Add( oPrevFont:name, oPrevFont:width, oPrevFont:height, ; > oPrevFont:weight, oPrevFont:charset, oPrevFont:italic, 1, oPrevFont:StrikeOut ) > ENDIF > ENDIF > + ::oFontUnder := HFONT():Add( ::oFont:Name, 0, ::oFont:Height, , , , 1 ) > > IF lTransp != NIL .AND. lTransp > //::extStyle += WS_EX_TRANSPARENT > @@ -153,13 +169,14 @@ > METHOD INIT() CLASS HStaticLink > > IF ! ::lInit > - ::nWidth := Min( TxtRect( ::Title, Self )[ 1 ] + 5, ::nWidth ) > - ::move( , , ::nWidth , , ) > - IF ::GetParentForm():Type <= WND_MDICHILD > + ::Resize( ) > + /* > + IF ::GetParentForm():Type <= WND_MDICHILD > ::nHolder := 1 > SetWindowObject( ::handle, Self ) > Hwg_InitWinCtrl( ::handle ) > ENDIF > + */ > Super:init() > IF ::Title != NIL > SETWINDOWTEXT( ::handle, ::title ) > @@ -175,10 +192,11 @@ > //::PAint( ) > > ELSEIF msg == WM_MOUSEMOVE > - hwg_SetCursor( ::m_hHyperCursor ) > + // hwg_SetCursor( ::m_hHyperCursor ) > ::OnMouseMove( wParam, lParam ) > ELSEIF msg == WM_SETCURSOR > ::OnSetCursor( msg, wParam, lParam ) > + TRACKMOUSEVENT( ::handle ) > ELSEIF msg == WM_LBUTTONDOWN > hwg_SetCursor( ::m_hHyperCursor ) > ::OnClicked() > @@ -229,20 +247,21 @@ > METHOD OnClicked() CLASS HStaticLink > LOCAL nCtrlID > > - IF ( ::m_bFireChild ) > - nCtrlID := ::id > - ::SendMessage( ::oparent:Handle, _HYPERLINK_EVENT, nCtrlID, 0 ) > - //::PostMessage(pParent->m_hWnd, __EVENT_ID_, (WPARAM)nCtrlID, 0) > - ELSE > - ::GoToLinkUrl( ::m_csUrl ) > + IF ! ISBLOCK( ::bClick ) > + IF ( ::m_bFireChild ) > + nCtrlID := ::id > + ::SendMessage( ::oparent:Handle, _HYPERLINK_EVENT, nCtrlID, 0 ) > + //::PostMessage(pParent->m_hWnd, __EVENT_ID_, (WPARAM)nCtrlID, 0) > + ELSE > + ::GoToLinkUrl( ::m_csUrl ) > + ENDIF > + > + ::m_bVisited := .T. > ENDIF > - > - ::m_bVisited := .T. > - > ::state := LBL_NORMAL > InvalidateRect( ::handle, 0 ) > RedrawWindow( ::oParent:Handle, RDW_ERASE + RDW_INVALIDATE + RDW_INTERNALPAINT , ::nLeft, ::nTop, ::nWidth, ::nHeight ) > - SetFocus( ::handle ) > + ::SetFocus( ) > > RETURN NIL > > @@ -252,7 +271,7 @@ > HB_SYMBOL_UNUSED( nHitTest ) > HB_SYMBOL_UNUSED( message ) > > - hwg_SetCursor( ::m_hHyperCursor ) > + // hwg_SetCursor( ::m_hHyperCursor ) > > RETURN .t. > > @@ -280,9 +299,14 @@ > IF ::state != LBL_INIT > xPos := LOWORD( lParam ) > yPos := HIWORD( lParam ) > - IF ( ! PtInRect( { 4, 4, ::nWidth - 4, ::nHeight - 4 }, { xPos, yPos } ) ) > - //ReleaseCapture() > - res := .T. > + IF ( ! PtInRect( { 0, 0, ::nWidthOver , ::nHeight }, { xPos, yPos } ) ) .AND. ::state != LBL_MOUSEOVER > + res := .T. > + ELSE > + hwg_SetCursor( ::m_hHyperCursor ) > + IF ( ! PtInRect( { 3, 3, ::nWidthover - 3, ::nHeight - 3 }, { xPos, yPos } ) ) > + //ReleaseCapture() > + res := .T. > + ENDIF > ENDIF > IF ( res .AND. ! ::m_bVisited ) .or. ( res .AND. ::m_bVisited ) > ::state := LBL_NORMAL > @@ -298,6 +322,7 @@ > ENDIF > > ENDIF > + > RETURN NIL > > METHOD PAint( lpDis ) CLASS HStaticLink > @@ -310,7 +335,12 @@ > LOCAL rcClient > // LOCAL POLDFONT > // LOCAL DWSTYLE > + LOCAL bHasTitle > + LOCAL aBmpSize := IIF( ! EMPTY( ::hbitmap ), GetBitmapSize( ::hbitmap ),{0,0} ) > + LOCAL itemRect := copyrect( { drawInfo[ 4 ], drawInfo[ 5 ], drawInfo[ 6 ], drawInfo[ 7 ] } ) > + LOCAL captionRect := { drawInfo[ 4 ] , drawInfo[ 5 ], drawInfo[ 6 ] , drawInfo[ 7 ] } > > + > IF EMPTY( ::oParent:handle ) > RETURN Nil > ENDIF > @@ -318,12 +348,26 @@ > ::State := LBL_NORMAL > ENDIF > rcClient := CopyRect( { drawInfo[ 4 ] , drawInfo[ 5 ], drawInfo[ 6 ], drawInfo[ 7 ] } ) > - SetBkMode( ::backstyle ) //TRANSPARENT ) > + > + IF ValType( ::hbitmap ) == "N" > + bHasTitle := ValType( strtext ) == "C" .and. ! Empty( strtext ) > + itemRect[ 4 ] := aBmpSize[ 2 ] + 1 > + bmpRect := PrepareImageRect( ::handle, dc, bHasTitle, @itemRect, @captionRect, , , ::hbitmap, ::iStyle ) > + itemRect[ 4 ] := drawInfo[ 7 ] > + IF ::backstyle = TRANSPARENT > + DrawTransparentBitmap( dc, ::hbitmap, bmpRect[ 1 ], bmpRect[ 2 ] ) > + ELSE > + DrawBitmap( dc, ::hbitmap, , bmpRect[ 1 ], bmpRect[ 2 ] ) > + ENDIF > + rcclient[ 1 ] += IIF( ::iStyle = ST_ALIGN_HORIZ, aBmpSize[ 1 ] + 8, 1 ) > + ENDIF > + SetBkMode( DC, ::backstyle ) > IF ::backstyle != TRANSPARENT > SetBkColor( DC, IIF( ::bColor = NIL, GetSysColor( COLOR_3DFACE ), ::bcolor ) ) > FillRect( dc, rcclient[ 1 ], rcclient[ 2 ], rcclient[ 3 ], rcclient[ 4 ] ) //, ::brush:handle ) > - ENDIF > - dwFlags := 0 > + ENDIF > + dwFlags := DT_LEFT | DT_WORDBREAK > + dwstyle := ::style > dwFlags += ( DT_VCENTER + DT_END_ELLIPSIS ) > > //::dc:SelectObject( ::oFont:handle ) > @@ -331,19 +375,46 @@ > IF ::state == LBL_NORMAL > IF ::m_bVisited > //::dc:SetTextColor( ::m_sVisitedColor ) > - SetTextColor( dc,::m_sVisitedColor ) > + SetTextColor( DC,::m_sVisitedColor ) > ELSE > //::dc:SetTextColor( ::m_sLinkColor ) > - SetTextColor( dc, ::m_sLinkColor ) > + SetTextColor( DC, ::m_sLinkColor ) > ENDIF > ELSEIF ::state == LBL_MOUSEOVER > //::dc:SetTextColor( ::m_sHoverColor ) > - SetTextColor( dc,::m_sHoverColor ) > + SetTextColor( DC,::m_sHoverColor ) > ENDIF > > //::dc:DrawText( strtext, rcClient, dwFlags ) > - DrawText( dc, strtext, rcClient, dwFlags ) > + IF ::state = LBL_MOUSEOVER .AND. ! ::lAllUnderline > + SelectObject( DC, ::oFontUnder:handle ) > + DrawText( dc, strText, rcClient, dwFlags ) > + SelectObject( DC, ::oFont:handle ) > + ELSE > + DrawText( dc, strText, rcClient, dwFlags ) > + ENDIF > + > // ::dc:END() > > RETURN NIL > > + > +METHOD Resize( x, y ) CLASS HStaticLink > + LOCAL aCoors := GetClientRect( ::handle ) > + LOCAL aBmpSize, aTxtSize > + > + aBmpSize := IIF( ! EMPTY( ::hbitmap ), GetBitmapSize( ::hbitmap ), { 0,0 } ) > + aBmpSize[ 1 ] += IIF( aBmpSize[ 1 ] > 0, 6, 0 ) > + aTxtSize := TxtRect( ::Title, Self ) > + aTxtSize[ 2 ] += IIF( ::lAllUnderline, 0, 3 ) > + IF aTxtSize[ 1 ] + 1 < ::nWidth - aBmpSize[ 1 ] //tava 20 > + ::nHeight := aTxtSize[ 2 ] + 2 > + ELSE > + ::nHeight := aTxtSize[ 2 ] * 2 + 1 > + ENDIF > + ::nWidthOver := MIN( aTxtSize[ 1 ] + 1 + aBmpSize[ 1 ], ::nWidth ) > + ::nHeight := MAX( ::nHeight, aTxtSize[ 2 ] ) > + ::nHeight := MAX( ::nHeight, aBmpSize[ 2 ] + 4 ) > + ::Move( , , , ::nHeight, 0 ) > + > + RETURN Nil > > Modified: trunk/hwgui/source/hwindow.prg > =================================================================== > --- trunk/hwgui/source/hwindow.prg 2012-07-02 16:52:31 UTC (rev 1846) > +++ trunk/hwgui/source/hwindow.prg 2012-07-02 17:52:47 UTC (rev 1847) > @@ -37,18 +37,18 @@ > aCoors := GetClientRect( oWnd:handle ) > //MoveWindow( HWindow():aWindows[ 2 ]:handle, oWnd:aOffset[ 1 ], oWnd:aOffset[ 2 ], aCoors[ 3 ] - oWnd:aOffset[ 1 ] - oWnd:aOffset[ 3 ], aCoors[ 4 ] - oWnd:aOffset[ 2 ] - oWnd:aOffset[ 4 ] ) > //aCoors := GetClientRect(HWindow():aWindows[ 2 ]:handle ) > - SetWindowPos( HWindow():aWindows[ 2 ]:handle, Nil, oWnd:aOffset[ 1 ], oWnd:aOffset[ 2 ], aCoors[ 3 ] - oWnd:aOffset[ 1 ] - oWnd:aOffset[ 3 ], aCoors[ 4 ] - oWnd:aOffset[ 2 ] - oWnd:aOffset[ 4 ], SWP_NOZORDER) > + SetWindowPos( HWindow():aWindows[ 2 ]:handle, Nil, oWnd:aOffset[ 1 ], oWnd:aOffset[ 2 ], aCoors[ 3 ] - oWnd:aOffset[ 1 ] - oWnd:aOffset[ 3 ], aCoors[ 4 ] - oWnd:aOffset[ 2 ] - oWnd:aOffset[ 4 ] , SWP_NOZORDER) > aCoors := GetWindowRect( HWindow():aWindows[ 2 ]:handle ) > HWindow():aWindows[ 2 ]:nWidth := aCoors[ 3 ] - aCoors[ 1 ] > HWindow():aWindows[ 2 ]:nHeight := aCoors[ 4 ] - aCoors[ 2 ] > - // ADDED > + // ADDED = > IF !Empty( oWnd:Screen ) > oWnd:Screen:nWidth := aCoors[ 3 ] - aCoors[ 1 ] > oWnd:Screen:nHeight := aCoors[ 4 ] - aCoors[ 2 ] > InvalidateRect( oWnd:screen:handle, 0 ) > SetWindowPos( oWnd:screen:handle, Nil, 0, 0, oWnd:Screen:nWidth, oWnd:Screen:nHeight, SWP_NOACTIVATE + SWP_NOZORDER) > ENDIF > - IF ! Empty( oWnd := oWnd:GetMdiActive() ) .AND.oWnd:Type = WND_MDICHILD .AND. oWnd:lmaximized .AND.; > + IF ! SELFFOCUS( oWnd:Screen:Handle, oWnd:handle ) .AND. ! Empty( oWnd := oWnd:GetMdiActive() ) .AND.oWnd:Type = WND_MDICHILD .AND. oWnd:lmaximized .AND.; > ( oWnd:lModal .OR. oWnd:lChild ) > oWnd:lmaximized := .F. > *-SENDMESSAGE( oWnd:handle, WM_SYSCOMMAND, SC_MAXIMIZE, 0 ) > @@ -297,13 +297,15 @@ > lCentered := ( ! lMaximized .AND. ! EMPTY( lCentered ) .AND. lCentered ) .OR. Hwg_BitAND( ::Style, DS_CENTER ) != 0 > DEFAULT lShow := .T. > CreateGetList( Self ) > - > + AEVAL( ::aControls, { | o | o:lInit := .F. } ) > + > IF ::Type == WND_MDI > > oWndClient := HWindow():New( ,,, ::style, ::title,, ::bInit, ::bDestroy, ::bSize, ; > ::bPaint, ::bGetFocus, ::bLostFocus, ::bOther, ::obmp ) > + > //handle := Hwg_InitClientWindow( oWndClient, ::nMenuPos, ::nLeft, ::nTop + 60, ::nWidth, ::nHeight ) > - handle := Hwg_InitClientWindow( oWndClient, ::nMenuPos, ::nLeft, ::nTop, ::nWidth, ::nHeight ) > + handle := Hwg_InitClientWindow( oWndClient, ::nMenuPos, ::nLeft, ::nTop, ::nWidth, ::nHeight ) > > *-oWndClient:handle = handle > > @@ -313,11 +315,18 @@ > > // ADDED screen to backgroup to MDI MAIN > ::Screen := HMdiChildWindow():New(, ::tcolor, WS_CHILD + MB_USERICON + WS_MAXIMIZE + WS_DISABLED,; > - 0,0, ::nWidth * 2, ::nheight * 2, -1,,,,,,,,,,,::oBmp,,,,,) > + 0, 0, ::nWidth * 1, ::nheight * 1, ; //- GETSYSTEMMETRICS( SM_CYSMCAPTION ) - GETSYSTEMMETRICS( SM_CYSMCAPTION ) , ; > + -1 ,,,,,,,,,,,::oBmp,,,,,, .T.) > + ::Screen:lExitOnEsc := .F. > + //::Screen:lClipper := .F. > ::Screen:Activate( .T., .T. ) > // END > oWndClient:handle := handle > + /* recalculate area offset */ > + SENDMESSAGE( ::Handle, WM_SIZE, 0, MAKELPARAM( ::nWidth, ::nHeight ) ) > > + InitControls( Self ) > + > IF ::bInit != Nil > lres := Eval( ::bInit, Self ) > IF ValType( lres ) = "L" .AND. ! lres > @@ -328,16 +337,18 @@ > > ::Screen:lBmpCenter := ::lBmpCenter > *-EnableWindow( ::Screen:Handle, .T. ) > + ::Screen:Maximize() > SetWindowPos( ::Screen:Handle, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOREDRAW + SWP_NOACTIVATE + SWP_NOMOVE + SWP_NOSIZE + SWP_NOZORDER +; > SWP_NOOWNERZORDER + SWP_FRAMECHANGED ) > ::Screen:Restore() > - > IF lMaximized > ::maximize() > ELSEIF lMinimized > ::minimize() > ELSEIF lCentered > ::center() > + ELSE > + > ENDIF > > IF ( bActivate != NIL ) > @@ -347,7 +358,9 @@ > Hwg_ActivateMdiWindow( ( lShow == Nil .OR. lShow ), ::hAccel, lMaximized, lMinimized ) > > ELSEIF ::Type == WND_MAIN > - > + > + InitControls( Self ) > + > IF ::bInit != Nil > lres := Eval( ::bInit, Self ) > IF ValType( lres ) = "L" .AND. ! lres > @@ -376,8 +389,9 @@ > > METHOD onEvent( msg, wParam, lParam ) CLASS HMainWindow > Local i, xPos, yPos, oMdi, aCoors > + LOCAL nFocus := If( Hb_IsNumeric( ::nFocus ), ::nFocus, 0 ) > > - // writelog( str(msg) + str(wParam) + str(lParam) ) > + // writelog( str(msg) + str(wParam) + str(lParam) + chr(13) ) > > IF msg = WM_MENUCHAR > // PROCESS ACCELERATOR IN CONTROLS > @@ -404,10 +418,11 @@ > ENDIF > ENDIF > ENDIF > + ELSEIF msg = WM_SETFOCUS .AND. nFocus > 0 > + SETFOCUS( nFocus ) > ENDIF > - // > IF ( i := Ascan( ::aMessages[1],msg ) ) != 0 .AND. ; > - ( !::lSuspendMsgsHandling .OR. msg = WM_ERASEBKGND .OR. msg = WM_SIZE ) //.OR. msg = WM_ACTIVATE) > + ( !::lSuspendMsgsHandling .OR. msg = WM_ERASEBKGND .OR. msg = WM_SIZE ) > Return Eval( ::aMessages[2,i], Self, wParam, lParam ) > ELSE > IF msg == WM_HSCROLL .OR. msg == WM_VSCROLL .or. msg == WM_MOUSEWHEEL > @@ -544,12 +559,15 @@ > ENDIF > > // SCROLLSBARS > + ::RedefineScrollbars() > + /* > IF ::nScrollBars > - 1 > AEval( ::aControls, { | o | ::ncurHeight := max( o:nTop + o:nHeight + GetSystemMetrics( SM_CYMENU ) + GETSYSTEMMETRICS( SM_CYCAPTION ) + 12 , ::ncurHeight ) } ) > AEval( ::aControls, { | o | ::ncurWidth := max( o:nLeft + o:nWidth + 24 , ::ncurWidth ) } ) > ::ResetScrollbars() > ::SetupScrollbars() > ENDIF > + */ > > IF bActivate != NIL > Eval( bActivate, Self ) > @@ -850,7 +868,7 @@ > oWnd:nTop := aControls[ 2 ] > IF oWnd:type == WND_MDICHILD .AND. ! oWnd:lMaximized > //oWnd:aRectSave := { oWnd:nLeft, oWnd:nTop, oWnd:nWidth, oWnd:nHeight } > - IF oWnd:nHeight > GETSYSTEMMETRICS( SM_CYCAPTION ) + 6 > + IF oWnd:nHeight > GETSYSTEMMETRICS( SM_CYCAPTION ) + 6 > oWnd:aRectSave := { oWnd:nLeft, oWnd:nTop, oWnd:nWidth, oWnd:nHeight } > ELSE > oWnd:aRectSave[ 1 ] := oWnd:nLeft > @@ -872,10 +890,15 @@ > ENDIF > Return 1 > ELSEIF oWnd:type != WND_MDI //.AND. oWnd:type != WND_MAIN > + > aCoors := GetClientRect( oWnd:handle ) > IF oWnd:brush != Nil > IF ValType( oWnd:brush ) != "N" > FillRect( wParam, aCoors[ 1 ], aCoors[ 2 ], aCoors[ 3 ] + 1, aCoors[ 4 ] + 1, oWnd:brush:handle ) > + IF SELFFOCUS( oWnd:handle, oWnd:Screen:Handle ) > + SetWindowPos( oWnd:Handle, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE + SWP_NOMOVE + SWP_NOSIZE + SWP_NOZORDER +; > + SWP_NOOWNERZORDER + SWP_FRAMECHANGED) > + ENDIF > RETURN 1 > ENDIF > ELSEIF oWnd:Type != WND_MAIN > @@ -1043,7 +1066,7 @@ > SENDMESSAGE( oWnd:handle, WM_UPDATEUISTATE, makelong( UIS_CLEAR, UISF_HIDEFOCUS ), 0 ) > SENDMESSAGE( oWnd:handle, WM_UPDATEUISTATE, makelong( UIS_CLEAR, UISF_HIDEACCEL ), 0 ) > IF oWnd:WindowState > 0 > - onMove( oWnd ) > + onMove( oWnd ) > ENDIF > RETURN - 1 > |
From: <LF...@us...> - 2012-07-02 17:52:55
|
Revision: 1847 http://hwgui.svn.sourceforge.net/hwgui/?rev=1847&view=rev Author: LFBASSO Date: 2012-07-02 17:52:47 +0000 (Mon, 02 Jul 2012) Log Message: ----------- 2012-07-02 14:50 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/guilib.ch * #xcommand @ <x>,<y> GET + [ ON SIZE <bSize> ] ; * #xcommand @ <x>,<y> SAY [ <oSay> CAPTION ] <caption> ; [ OF <oWnd> ] ; LINK <cLink> ; + [ ON CLICK <bClick> ] ; [ STYLE <nStyle> ] ; [ BITMAP <hbit> ] ; * #xcommand @ <x>,<y> TOOLBAR [ <oTool> ] + [ ON SIZE <bSize> ] ; * source/guimain.prg * FUNCTION FindSelf( hCtrl ) ! minor fix. * source/hcwindow.prg + METHOD RedefineScrollbars() * METHOD ScrollHV * METHOD SetupScrollbars() * METHOD ResetScrollbars() * FUNCTION onSize ! fixes for scrooling of objects in containers * source/hdatepic.prg * METHOD Value * METHOD Valid ! minor fix * source/hedit.prg * METHOD Valid ! fixed show to value type = "D" and SET CENTURY ON * source/hcontrol.prg * CLASS HControl * METHOD Disable() * METHOD SetFocus ! minor Fix * METHOD onAnchor( x, y, w, h ) ! Minor Fix * source/hhyper.prg + DATA allMouseOver INIT .F. + DATA hBitmap + DATA iStyle INIT ST_ALIGN_HORIZ + DATA lAllUnderline INIT .T. + DATA oFontUnder + DATA llost INIT .F. + DATA lOverTitle INIT .F. + DATA nWidthOver * METHOD New( ) ! add parameters hbitmap, bClick + METHOD Resize( ) * METHOD INIT() * METHOD OnClicked() ! changed onclick event now accepts a block of code * METHOD PAint( lpDis ) ! add suport to images * source/hwindow.prg * CLASS HMainWindow * METHOD Activate( () ! add triggering event INIT of the objects * STATIC FUNCTION onEraseBk ! minor fix Modified Paths: -------------- trunk/hwgui/Changelog trunk/hwgui/include/guilib.ch trunk/hwgui/source/guimain.prg trunk/hwgui/source/hcontrol.prg trunk/hwgui/source/hcwindow.prg trunk/hwgui/source/hdatepic.prg trunk/hwgui/source/hedit.prg trunk/hwgui/source/hhyper.prg trunk/hwgui/source/hwindow.prg Modified: trunk/hwgui/Changelog =================================================================== --- trunk/hwgui/Changelog 2012-07-02 16:52:31 UTC (rev 1846) +++ trunk/hwgui/Changelog 2012-07-02 17:52:47 UTC (rev 1847) @@ -9,6 +9,63 @@ */ +2012-07-02 14:50 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> + * source/guilib.ch + * #xcommand @ <x>,<y> GET + + [ ON SIZE <bSize> ] ; + * #xcommand @ <x>,<y> SAY [ <oSay> CAPTION ] <caption> ; [ OF <oWnd> ] ; LINK <cLink> ; + + [ ON CLICK <bClick> ] ; + [ STYLE <nStyle> ] ; + [ BITMAP <hbit> ] ; + * #xcommand @ <x>,<y> TOOLBAR [ <oTool> ] + + [ ON SIZE <bSize> ] ; + * source/guimain.prg + * FUNCTION FindSelf( hCtrl ) + ! minor fix. + * source/hcwindow.prg + + METHOD RedefineScrollbars() + * METHOD ScrollHV + * METHOD SetupScrollbars() + * METHOD ResetScrollbars() + * FUNCTION onSize + ! fixes for scrooling of objects in containers + * source/hdatepic.prg + * METHOD Value + * METHOD Valid + ! minor fix + * source/hedit.prg + * METHOD Valid + ! fixed show to value type = "D" and SET CENTURY ON + * source/hcontrol.prg + * CLASS HControl + * METHOD Disable() + * METHOD SetFocus + ! minor Fix + * METHOD onAnchor( x, y, w, h ) + ! Minor Fix + * source/hhyper.prg + + DATA allMouseOver INIT .F. + + DATA hBitmap + + DATA iStyle INIT ST_ALIGN_HORIZ + + DATA lAllUnderline INIT .T. + + DATA oFontUnder + + DATA llost INIT .F. + + DATA lOverTitle INIT .F. + + DATA nWidthOver + * METHOD New( ) + ! add parameters hbitmap, bClick + + METHOD Resize( ) + * METHOD INIT() + * METHOD OnClicked() + ! changed onclick event now accepts a block of code + * METHOD PAint( lpDis ) + ! add suport to images + * source/hwindow.prg + * CLASS HMainWindow + * METHOD Activate( () + ! add triggering event INIT of the objects + * STATIC FUNCTION onEraseBk + ! minor fix 2012-07-02 13:50 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/draw.c + void TransparentBmp Modified: trunk/hwgui/include/guilib.ch =================================================================== --- trunk/hwgui/include/guilib.ch 2012-07-02 16:52:31 UTC (rev 1846) +++ trunk/hwgui/include/guilib.ch 2012-07-02 17:52:47 UTC (rev 1847) @@ -43,8 +43,8 @@ #define ANCHOR_HORFIX 256 // Anchors center of control relative to left and right borders but remains fixed in size. #define ANCHOR_VERTFIX 512 // Anchors center of control relative to top and bottom borders but remains fixed in size. -#define HORZ_PTS 7 //8 -#define VERT_PTS 3.5 //4 +#define HORZ_PTS 9 +#define VERT_PTS 12 #ifdef __XHARBOUR__ #ifndef HB_SYMBOL_UNUSED @@ -1155,6 +1155,7 @@ [<lnoborder: NOBORDER>] ; [ FONT <oFont> ] ; [ ON INIT <bInit> ] ; + [ ON SIZE <bSize> ] ; [ TOOLTIP <ctoolt> ] ; [ ON KEYDOWN <bKeyDown> ]; [ ON CHANGE <bChange> ] ; @@ -1162,7 +1163,7 @@ => ; [<oEdit> := ] HEdit():New( <oWnd>,<nId>,<vari>, ; {|v|Iif(v==Nil,<vari>,<vari>:=v)}, ; - <nStyle>,<x>,<y>,<width>,<height>,<oFont>,<bInit>,,, ; + <nStyle>,<x>,<y>,<width>,<height>,<oFont>,<bInit>,<bSize> ,, ; <bGfocus>,<bLfocus>,<ctoolt>,<color>,<bcolor>,<cPicture>,; <.lnoborder.>,<nMaxLength>,<.lPassword.>,<bKeyDown>,<bChange>,<bOther>);; [ <oEdit>:name := <(oEdit)> ] @@ -1658,16 +1659,18 @@ [ ON INIT <bInit> ] ; [ ON SIZE <bSize> ] ; [ ON PAINT <bDraw> ] ; + [ ON CLICK <bClick> ] ; [ STYLE <nStyle> ] ; [ FONT <oFont> ] ; [ TOOLTIP <ctoolt> ] ; + [ BITMAP <hbit> ] ; [ VISITCOLOR <vcolor> ] ; [ LINKCOLOR <lcolor> ] ; [ HOVERCOLOR <hcolor> ] ; => ; [<oSay> := ] HStaticLink():New( <oWnd>, <nId>, <nStyle>, <x>, <y>, <width>, ; <height>, <caption>, <oFont>, <bInit>, <bSize>, <bDraw>, <ctoolt>, ; - <color>, <bcolor>, <.lTransp.>, <cLink>, <vcolor>, <lcolor>, <hcolor> );; + <color>, <bcolor>, <.lTransp.>, <cLink>, <vcolor>, <lcolor>, <hcolor>,<hbit>, <bClick> );; [ <oSay>:name := <(oSay)> ] #xcommand REDEFINE SAY [ <oSay> CAPTION ] <cCaption> ; @@ -1708,9 +1711,10 @@ [ SIZE <width>, <height> ] ; [ BUTTONWIDTH <btnwidth> ] ; [ INDENT <nIndent> ] ; - [ BITMAPSIZE <nSize> ] ; + [ BITMAPSIZE <nSize> ] ; [ FONT <oFont> ] ; [ ON INIT <bInit> ] ; + [ ON SIZE <bSize> ] ; [<lTransp: TRANSPARENT>] ; [<lVertical: VERTICAL>] ; [ STYLE <nStyle> ] ; @@ -1718,7 +1722,7 @@ [ ITEMS <aItems> ] ; => ; [<oTool> := ] Htoolbar():New( <oWnd>,<nId>,<nStyle>,<x>,<y>,<width>, <height>,<btnwidth>,<oFont>,; - <bInit>,,,,,,<.lTransp.>,<.lVertical.>,<aItems>,<nSize>,<nIndent>,<nIDB>) ;; + <bInit>,<bSize>,,,,,<.lTransp.>,<.lVertical.>,<aItems>,<nSize>,<nIndent>,<nIDB>) ;; [ <oTool>:name := <(oTool)> ] #xcommand REDEFINE TOOLBAR <oSay> ; Modified: trunk/hwgui/source/guimain.prg =================================================================== --- trunk/hwgui/source/guimain.prg 2012-07-02 16:52:31 UTC (rev 1846) +++ trunk/hwgui/source/guimain.prg 2012-07-02 17:52:47 UTC (rev 1847) @@ -103,7 +103,7 @@ IF oParent == Nil oParent := GetAncestor( hCtrl, GA_PARENT ) ENDIF - IF oParent != Nil + IF oParent != Nil .AND. VALTYPE( oParent ) != "N" RETURN oParent:FindControl( , hCtrl ) ENDIF RETURN Nil Modified: trunk/hwgui/source/hcontrol.prg =================================================================== --- trunk/hwgui/source/hcontrol.prg 2012-07-02 16:52:31 UTC (rev 1846) +++ trunk/hwgui/source/hcontrol.prg 2012-07-02 17:52:47 UTC (rev 1847) @@ -67,7 +67,8 @@ METHOD Show( nShow ) INLINE ::Super:Show( nShow ), IIF( ::oParent:lGetSkipLostFocus,; PostMessage( GetActiveWindow() , WM_NEXTDLGCTL, IIF( ::oParent:FindControl(, GetFocus() ) != NIL, 0, ::handle ), 1 ) , .T. ) METHOD Hide() INLINE ( ::oParent:lGetSkipLostFocus := .F., ::Super:Hide() ) - METHOD Disable() INLINE EnableWindow( ::handle, .F. ) + //METHOD Disable() INLINE EnableWindow( ::handle, .F. ) + METHOD Disable() INLINE ( IIF( SELFFOCUS( ::Handle ), SendMessage( GetActiveWindow(), WM_NEXTDLGCTL, 0, 0 ) , ), EnableWindow( ::handle, .F. ) ) METHOD Enable() METHOD IsEnabled() INLINE IsWindowEnabled( ::Handle ) METHOD Enabled( lEnabled ) SETGET @@ -208,7 +209,10 @@ LOCAL lSuspend := ::oParent:lSuspendMsgsHandling IF ! IsWindowEnabled( ::Handle ) - GetSkip( ::oParent, ::handle, , 1 ) + ::oParent:lSuspendMsgsHandling := .T. + // GetSkip( ::oParent, ::handle, , 1 ) + SendMessage( GetActiveWindow(), WM_NEXTDLGCTL, 0, 0 ) + ::oParent:lSuspendMsgsHandling := lSuspend ELSE ::oParent:lSuspendMsgsHandling := ! Empty( lValid ) IF ::GetParentForm():Type < WND_DLG_RESOURCE @@ -218,6 +222,10 @@ ENDIF ::oParent:lSuspendMsgsHandling := lSuspend ENDIF + IF ::GetParentForm():Type < WND_DLG_RESOURCE + ::GetParentForm():nFocus := ::Handle + ENDIF + RETURN Nil METHOD Enable() CLASS HControl @@ -469,37 +477,46 @@ // REDRAW AND INVALIDATE SCREEN IF ( x1 != X9 .OR. y1 != y9 .OR. w1 != w9 .OR. h1 != h9 ) IF isWindowVisible( ::handle ) - IF ( x1 != x9 .or. y1 != y9 ) .AND. x9 < ::oParent:nWidth - InvalidateRect( ::oParent:handle, 1, MAX( x9 - 1, 0 ), MAX( y9 - 1, 0 ), x9 + w9 + nCxv, y9 + h9 + nCyh ) - ELSE - IF w1 < w9 - InvalidateRect( ::oParent:handle, 1, x1 + w1 - nCxv, MAX( y1 - 2, 0 ), x1 + w9 + 2 , y9 + h9 + 2 ) - ENDIF - IF h1 < h9 - InvalidateRect( ::oParent:handle, 1, MAX( x1 - 5, 0 ) , y1 + h1 - nCyh, x1 + w9 + 2 , y1 + h9 + 2 ) - ENDIF - ENDIF + IF HWG_BITAND( ::Style, WS_CLIPCHILDREN ) = 0 .AND. ( w1 > w9 .OR. h1 > H9 ) + IF ( x1 != x9 .or. y1 != y9 ) .AND. x9 < ::oParent:nWidth + InvalidateRect( ::oParent:handle, 1, MAX( x9 - 1, 0 ), MAX( y9 - 1, 0 ), ; + x9 + w9 + nCxv, y9 + h9 + nCyh ) + ELSE + IF w1 < w9 + InvalidateRect( ::oParent:handle, 1, x1 + w1 - nCxv, MAX( y1 - 2, 0 ), ; + x1 + w9 + 2 , y9 + h9 + 2 ) + ENDIF + IF h1 < h9 + InvalidateRect( ::oParent:handle, 0, MAX( x1 - 5, 0 ) , y1 + h1 - nCyh, ; + x1 + w9 + 2 , y1 + h9 + 2 ) + ENDIF + ENDIF - ::Move( x1, y1, w1, h1, 0 ) - //SetWindowPos( ::Handle, Nil, x1, y1, w1, h1, SWP_NOACTIVATE + SWP_NOZORDER + SWP_NOREDRAW ) + ::Move( x1, y1, w1, h1, 0 ) //HWG_BITAND( ::Style, WS_CLIPCHILDREN ) ) - IF ( ( x1 != x9 .OR. y1 != y9 ) .AND. ( ISBLOCK( ::bPaint ) .OR. x9 + w9 > ::oParent:nWidth ) ) .OR. ( ::backstyle = TRANSPARENT .AND. ; - ( ::Title != Nil .AND. ! Empty( ::Title ) ) ) .OR. __ObjHasMsg( Self,"oImage" ) - IF __ObjHasMsg( Self, "oImage" ) .OR. ::backstyle = TRANSPARENT //.OR. w9 != w1 - InvalidateRect( ::oParent:handle, 0, MAX( x1 - 1, 0 ), MAX( y1 - 1, 0 ), x1 + w1 + 1 , y1 + h1 + 1 ) - ELSE - RedrawWindow( ::handle, RDW_NOERASE + RDW_INVALIDATE + RDW_INTERNALPAINT ) - ENDIF + IF ( ( x1 != x9 .OR. y1 != y9 ) .AND. ( ISBLOCK( ::bPaint ) .OR. ; + x9 + w9 > ::oParent:nWidth ) ) .OR. ( ::backstyle = TRANSPARENT .AND. ; + ( ::Title != Nil .AND. ! Empty( ::Title ) ) ) .OR. __ObjHasMsg( Self,"oImage" ) + IF __ObjHasMsg( Self, "oImage" ) .OR. ::backstyle = TRANSPARENT //.OR. w9 != w1 + InvalidateRect( ::oParent:handle, 0, MAX( x1 - 1, 0 ), MAX( y1 - 1, 0 ), x1 + w1 + 1 , y1 + h1 + 1 ) + ELSE + RedrawWindow( ::handle, RDW_NOERASE + RDW_INVALIDATE + RDW_INTERNALPAINT ) + ENDIF + ELSE + IF LEN( ::aControls ) = 0 .AND. ::Title != Nil + InvalidateRect( ::handle, 0 ) + ENDIF + IF w1 > w9 + InvalidateRect( ::oParent:handle, 0 , MAX( x1 + w9 - ( w1 - w9 + nCxv ), 0 ) ,; + MAX( y1 , 0 ) , x1 + w1 + 1 , y1 + h1 ) + ENDIF + IF h1 > h9 + InvalidateRect( ::oParent:handle, 1 , MAX( x1 , 0) , ; + MAX( y1 + h9 - ( h1 - h9 + nCyh ), 0 ) , x1 + w1 + 1 , y1 + h1 ) + ENDIF + ENDIF ELSE - IF LEN( ::aControls ) = 0 .AND. ::Title != Nil - InvalidateRect( ::handle, 0 ) - ENDIF - IF w1 > w9 - InvalidateRect( ::oParent:handle, 0 , MAX( x1 + w9 - ( w1 - w9 + nCxv ), 0 ) , MAX( y1 , 0 ) , x1 + w1 + 1 , y1 + h1 ) - ENDIF - IF h1 > h9 - InvalidateRect( ::oParent:handle, 0 , MAX( x1 , 0) , MAX( y1 + h9 - ( h1 - h9 + nCyh ), 0 ) , x1 + w1 + 1 , y1 + h1 ) - ENDIF + ::Move( x1, y1, w1, h1, 1 ) ENDIF IF ( ::winClass == "ToolbarWindow32" .OR. ::winClass == "msctls_statusbar32" ) ::Resize( nXincRelative, 1 ) Modified: trunk/hwgui/source/hcwindow.prg =================================================================== --- trunk/hwgui/source/hcwindow.prg 2012-07-02 16:52:31 UTC (rev 1846) +++ trunk/hwgui/source/hcwindow.prg 2012-07-02 17:52:47 UTC (rev 1847) @@ -131,6 +131,7 @@ METHOD ScrollHV( oForm, msg, wParam, lParam ) METHOD ResetScrollbars() METHOD SetupScrollbars() + METHOD RedefineScrollbars() METHOD SetTextClass ( x ) HIDDEN METHOD GetParentForm( oCtrl ) METHOD ActiveControl() INLINE ::FindControl( , GetFocus() ) @@ -419,7 +420,7 @@ RETURN .T. METHOD ScrollHV( oForm, msg,wParam,lParam ) CLASS HCustomWindow - Local nDelta, nSBCode , nPos, nInc, nInc2 := 0 + Local nDelta, nSBCode , nPos, nInc HB_SYMBOL_UNUSED(lParam) @@ -446,7 +447,6 @@ nInc := max( 1, oForm:nVertInc) Case nSBCode = SB_THUMBTRACK nPos := hiword( wParam ) - nInc2 := IIF( nPos > oForm:nVscrollPos, 0.125, - 0.125 ) nInc := nPos - oForm:nVscrollPos OTHERWISE nInc := 0 @@ -462,20 +462,19 @@ Case SB_LINEDOWN nInc := Int( oForm:nVertInc * 0.05 + 0.49); EXIT Case SB_PAGEUP - nInc := min( - 1, - oForm:nVertInc ); EXIT + nInc := min( - 1, - oForm:nVertInc / 2 ); EXIT Case SB_PAGEDOWN - nInc := max( 1, oForm:nVertInc); EXIT + nInc := max( 1, oForm:nVertInc / 2 ); EXIT Case SB_THUMBTRACK nPos := hiword( wParam ) - nInc2 := IIF( nPos > oForm:nVscrollPos, 0.125, - 0.125 ) nInc := nPos - oForm:nVscrollPos ; EXIT Default nInc := 0 END #endif - nInc := max( - oForm:nVscrollPos, min( nInc, oForm:nVscrollMax - oForm:nVscrollPos)) + nInc := Max( - oForm:nVscrollPos, Min( nInc, oForm:nVscrollMax - oForm:nVscrollPos)) oForm:nVscrollPos += nInc - nDelta := - VERT_PTS * ( nInc + nInc2 ) + nDelta := - VERT_PTS * nInc ScrollWindow( oForm:handle, 0, nDelta ) //, Nil, NIL ) SetScrollPos( oForm:Handle, SB_VERT, oForm:nVscrollPos, .T. ) @@ -530,60 +529,97 @@ ENDIF RETURN Nil +METHOD RedefineScrollbars() CLASS HCustomWindow + LOCAL nPosVert := GetScrollPos( ::handle, SB_VERT ) + LOCAL nPosHorz := GetScrollPos( ::handle, SB_HORZ ) + ::rect := GetClientRect( ::handle ) + IF ::nScrollBars > - 1 .AND. ::bScroll = Nil + IF ::nVscrollPos = 0 + ::ncurHeight := 0 //* 4 + AEval( ::aControls, { | o | ::ncurHeight := INT( Max( o:nTop + o:nHeight + VERT_PTS * 1, ; + ::ncurHeight ) ) } ) + ENDIF + IF ::nHscrollPos = 0 + ::ncurWidth := 0 // * 4 + AEval( ::aControls, { | o | ::ncurWidth := INT( Max( o:nLeft + o:nWidth + HORZ_PTS * 1, ; + ::ncurWidth ) ) } ) + ENDIF + ::ResetScrollbars() + ::SetupScrollbars() + ENDIF + RETURN Nil + + METHOD SetupScrollbars() CLASS HCustomWindow - LOCAL tempRect, nwMax, nhMax , aMenu + LOCAL tempRect, nwMax, nhMax , aMenu, nPos tempRect := GetClientRect( ::handle ) aMenu := IIF( __objHasData( Self, "MENU" ), ::menu, Nil ) // Calculate how many scrolling increments for the client area IF ::Type = WND_MDICHILD //.AND. ::aRectSave != Nil - nwMax := max( ::ncurWidth, tempRect[ 3 ] ) //::maxWidth - nhMax := max( ::ncurHeight , tempRect[ 4 ] ) //::maxHeight + nwMax := Max( ::ncurWidth, tempRect[ 3 ] ) //::maxWidth + nhMax := Max( ::ncurHeight , tempRect[ 4 ] ) //::maxHeight ::nHorzInc := INT( ( nwMax - tempRect[ 3 ] ) / HORZ_PTS ) ::nVertInc := INT( ( nhMax - tempRect[ 4 ] ) / VERT_PTS ) ELSE - nwMax := max( ::ncurWidth, ::Rect[ 3 ] ) - nhMax := max( ::ncurHeight, ::Rect[ 4 ] ) - ::nHorzInc := ( nwMax - tempRect[ 3 ] ) / HORZ_PTS - HORZ_PTS - ::nVertInc := ( nhMax - tempRect[ 4 ] ) / VERT_PTS + VERT_PTS - ; - IIF( amenu != Nil, GetSystemMetrics( SM_CYMENU ), 0 ) // MENU + nwMax := Max( ::ncurWidth, ::Rect[ 3 ] ) + nhMax := Max( ::ncurHeight, ::Rect[ 4 ] ) + ::nHorzInc := INT( ( nwMax - tempRect[ 3 ] ) / HORZ_PTS + HORZ_PTS ) + ::nVertInc := INT( ( nhMax - tempRect[ 4 ] ) / VERT_PTS + VERT_PTS - ; + IIF( amenu != Nil, GetSystemMetrics( SM_CYMENU ), 0 ) ) // MENU ENDIF // Set the vertical and horizontal scrolling info IF ::nScrollBars = 0 .OR. ::nScrollBars = 2 - ::nHscrollMax := max( 0, ::nHorzInc ) + ::nHscrollMax := Max( 0, ::nHorzInc ) IF ::nHscrollMax < HORZ_PTS / 2 - ScrollWindow( ::Handle, ::nHscrollPos * HORZ_PTS, 0 ) - ELSEIF ::nHScrollMax / HORZ_PTS < HORZ_PTS + *- ScrollWindow( ::Handle, ::nHscrollPos * HORZ_PTS, 0 ) + ELSEIF ::nHScrollMax <= HORZ_PTS ::nHScrollMax := 0 ENDIF - ::nHscrollPos := min( ::nHscrollPos, ::nHscrollMax ) + ::nHscrollPos := Min( ::nHscrollPos, ::nHscrollMax ) SetScrollPos( ::handle, SB_HORZ, ::nHscrollPos, .T. ) - SetScrollInfo( ::Handle, SB_HORZ, 1, 0, ::nHScrollMax / HORZ_PTS , ::nHscrollMax ) + SetScrollInfo( ::Handle, SB_HORZ, 1, ::nHScrollPos , HORZ_PTS, ::nHscrollMax ) + IF ::nHscrollPos > 0 + nPos := GetScrollPos( ::handle, SB_HORZ ) + IF nPos < ::nHscrollPos + ScrollWindow( ::Handle, 0, ( ::nHscrollPos - nPos ) * SB_HORZ ) + ::nVscrollPos := nPos + SetScrollPos( ::Handle, SB_HORZ, ::nHscrollPos, .T. ) + ENDIF + ENDIF ENDIF IF ::nScrollBars = 1 .OR. ::nScrollBars = 2 - ::nVscrollMax := max( 0, ::nVertInc ) + ::nVscrollMax := INT( Max( 0, ::nVertInc ) ) IF ::nVscrollMax < VERT_PTS / 2 - ScrollWindow( ::Handle, 0, ::nVscrollPos * VERT_PTS ) - ELSEIF ::nVScrollMax / VERT_PTS < VERT_PTS - ::nVScrollMax := 0 + *- ScrollWindow( ::Handle, 0, ::nVscrollPos * VERT_PTS ) + ELSEIF ::nVScrollMax <= VERT_PTS + ::nVScrollMax := 0 ENDIF - ::nVscrollPos := min( ::nVscrollPos, ::nVscrollMax ) - SetScrollPos( ::handle, SB_VERT, ::nVscrollPos, .T. ) - SetScrollInfo( ::Handle, SB_VERT, 1, 0, ::nVScrollMax / VERT_PTS , ::nVscrollMax ) + SetScrollPos( ::Handle, SB_VERT, ::nVscrollPos, .T. ) + SetScrollInfo( ::Handle, SB_VERT, 1, ::nVscrollPos , VERT_PTS, ::nVscrollMax ) + IF ::nVscrollPos > 0 //.AND. nPosVert != ::nVscrollPos + nPos := GetScrollPos( ::handle, SB_VERT ) + IF nPos < ::nVscrollPos + ScrollWindow( ::Handle, 0, ( ::nVscrollPos - nPos ) * VERT_PTS ) + ::nVscrollPos := nPos + SetScrollPos( ::Handle, SB_VERT, ::nVscrollPos, .T. ) + ENDIF + ENDIF ENDIF RETURN Nil METHOD ResetScrollbars() CLASS HCustomWindow // Reset our window scrolling information Local lMaximized := GetWindowPlacement( ::handle ) == SW_MAXIMIZE + IF lMaximized ScrollWindow( ::Handle, ::nHscrollPos * HORZ_PTS, 0 ) ScrollWindow( ::Handle, 0, ::nVscrollPos * VERT_PTS ) ::nHscrollPos := 0 ::nVscrollPos := 0 ENDIF - + /* IF ::nScrollBars = 0 .OR. ::nScrollBars = 2 ScrollWindow( ::Handle, 0 * HORZ_PTS, 0 ) SetScrollPos( ::Handle, SB_HORZ, 0, .T. ) @@ -592,7 +628,9 @@ ScrollWindow( ::Handle, 0, 0 * VERT_PTS ) SetScrollPos( ::Handle, SB_VERT, 0, .T. ) ENDIF + */ RETURN Nil + /* METHOD ScrollHV( oForm, msg, wParam, lParam ) CLASS HCustomWindow LOCAL nDelta, nMaxPos, wmsg , nPos @@ -808,33 +846,38 @@ nw1 := oWnd:nWidth nh1 := oWnd:nHeight aCoors := GetWindowRect( oWnd:handle ) - IF EMPTY( oWnd:Type ) - oWnd:nWidth := aCoors[ 3 ] - aCoors[ 1 ] + oWnd:nWidth := aCoors[ 3 ] - aCoors[ 1 ] oWnd:nHeight := aCoors[ 4 ] - aCoors[ 2 ] ELSE nWindowState := oWnd:WindowState IF wParam != 1 .AND. ( oWnd:GETMDIMAIN() != Nil .AND. ! oWnd:GETMDIMAIN():IsMinimized() ) //SIZE_MINIMIZED - oWnd:nWidth := aCoors[ 3 ] - aCoors[ 1 ] + oWnd:nWidth := aCoors[ 3 ] - aCoors[ 1 ] oWnd:nHeight := aCoors[ 4 ] - aCoors[ 2 ] IF oWnd:Type = WND_MDICHILD .AND. oWnd:GETMDIMAIN() != Nil .AND. wParam != 1 .AND. oWnd:GETMDIMAIN():WindowState = 2 nWindowState := SW_SHOWMINIMIZED ENDIF ENDIF ENDIF - IF oWnd:nScrollBars > - 1 .AND. oWnd:lAutoScroll + IF oWnd:nScrollBars > - 1 .AND. oWnd:lAutoScroll .AND. ! EMPTY( oWnd:Type ) onMove( oWnd ) oWnd:ResetScrollbars() oWnd:SetupScrollbars() ENDIF - IF wParam != 1 .AND. nWindowState != 2 - IF !EMPTY( oWnd:Type) .AND. oWnd:Type = WND_MDI .AND. !EMPTY( oWnd:Screen ) + IF wParam != 1 .AND. nWindowState != 2 + IF !EMPTY( oWnd:Type) .AND. oWnd:Type = WND_MDI .AND. ! EMPTY( oWnd:Screen ) oWnd:Anchor( oWnd:Screen, nw1, nh1, oWnd:nWidth, oWnd:nHeight ) ENDIF IF ! EMPTY( oWnd:Type) - oWnd:Anchor( oWnd, nw1, nh1, oWnd:nWidth, oWnd:nHeight ) + oWnd:Anchor( oWnd, nw1, nh1, oWnd:nWidth, oWnd:nHeight) ENDIF ENDIF + IF oWnd:nScrollBars > - 1 .AND. oWnd:lAutoScroll .AND. ! EMPTY( oWnd:Type ) + onMove( oWnd ) + oWnd:ResetScrollbars() + oWnd:SetupScrollbars() + ENDIF + FOR EACH oItem IN aControls IF oItem:bSize != NIL Eval( oItem:bSize, oItem, LOWORD( lParam ), HIWORD( lParam ) ) Modified: trunk/hwgui/source/hdatepic.prg =================================================================== --- trunk/hwgui/source/hdatepic.prg 2012-07-02 16:52:31 UTC (rev 1846) +++ trunk/hwgui/source/hdatepic.prg 2012-07-02 17:52:47 UTC (rev 1847) @@ -158,7 +158,7 @@ METHOD Value( Value ) CLASS HDatePicker IF Value != Nil - ::SetValue( ::dValue, Value ) + ::SetValue( Value ) ENDIF RETURN IIF( ::lShowTime, ::tValue, ::dValue ) @@ -256,7 +256,7 @@ ENDIF ::dValue := GetDatePicker( ::handle ) IF ::bSetGet != Nil - Eval( ::bSetGet, ::dValue, Self ) + Eval( ::bSetGet, IIF( ::lShowTime, ::tValue,::dValue ), Self ) ENDIF IF ::bLostFocus != Nil ::oparent:lSuspendMsgsHandling := .T. Modified: trunk/hwgui/source/hedit.prg =================================================================== --- trunk/hwgui/source/hedit.prg 2012-07-02 16:52:31 UTC (rev 1846) +++ trunk/hwgui/source/hedit.prg 2012-07-02 17:52:47 UTC (rev 1847) @@ -1167,6 +1167,10 @@ RETURN .T. ENDIF vari := CToD( vari ) + IF CSetCent( ) .AND. LEN( Trim ( ::title ) ) < 10 + ::title := DTOC( vari ) .AND. LEN( ::title ) = 8 + SetDlgItemText( ::oParent:handle, ::id, ::title ) + ENDIF ELSEIF ::cType == "N" vari := Val( LTrim( vari ) ) ::title := Transform( vari, ::cPicFunc + IIf( Empty( ::cPicFunc ), "", " " ) + ::cPicMask ) Modified: trunk/hwgui/source/hhyper.prg =================================================================== --- trunk/hwgui/source/hhyper.prg 2012-07-02 16:52:31 UTC (rev 1846) +++ trunk/hwgui/source/hhyper.prg 2012-07-02 17:52:47 UTC (rev 1847) @@ -40,11 +40,21 @@ DATA m_sHoverColor DATA m_sLinkColor DATA m_sVisitedColor + + DATA allMouseOver INIT .F. + DATA hBitmap + DATA iStyle INIT ST_ALIGN_HORIZ //ST_ALIGN_HORIZ_RIGHT + DATA lAllUnderline INIT .T. + DATA oFontUnder + DATA llost INIT .F. + DATA lOverTitle INIT .F. + DATA nWidthOver + CLASS VAR winclass INIT "STATIC" METHOD New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, cCaption, oFont, bInit, ; - bSize, bPaint, ctooltip, tcolor, bcolor, lTransp, cLink, vColor, lColor, hColor ) + bSize, bPaint, ctooltip, tcolor, bcolor, lTransp, cLink, vColor, lColor, hColor, hbitmap, bClick ) METHOD Redefine( oWndParent, nId, cCaption, oFont, bInit, ; bSize, bPaint, ctooltip, tcolor, bcolor, lTransp, cLink, vColor, lColor, hColor ) METHOD INIT() @@ -62,14 +72,19 @@ METHOD SetLinkColor( sLinkColor ) METHOD PAint( lpDis ) METHOD OnMouseMove( nFlags, lParam ) + METHOD Resize( ) ENDCLASS METHOD New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, cCaption, oFont, bInit, ; - bSize, bPaint, ctooltip, tcolor, bcolor, lTransp, cLink, vColor, lColor, hColor ) CLASS HStaticLink + bSize, bPaint, ctooltip, tcolor, bcolor, lTransp, cLink, vColor, lColor, hColor, hbitmap, bClick ) CLASS HStaticLink LOCAL oPrevFont nStyle := Hwg_BitOR( nStyle, SS_NOTIFY + SS_RIGHT ) + ::lAllUnderline := IIF( EMPTY( cLink ), .F., ::lAllUnderline ) + ::title := IIF(cCaption != Nil,cCaption ,"HWGUI HomePage") + ::hbitmap := hbitmap + Super:New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, cCaption, oFont, bInit, ; bSize, bPaint, ctooltip, tcolor, bcolor, lTransp ) @@ -90,16 +105,17 @@ ::oFont := HFONT():Add( ::oParent:oFont:name, ::oParent:oFont:width, ::oParent:oFont:height, ; ::oParent:oFont:weight, ::oParent:oFont:charset, ::oParent:oFont:italic, 1, ::oParent:oFont:StrikeOut ) ELSE - ::oFont := HFONT():Add( "Arial", 0, - 12, , , , 1, ) + ::oFont := HFONT():Add( "Arial", 0, - 12, , , , IIF( ::lAllUnderline, 1, ), ) ENDIF ELSE - IF ::oFont:Underline == 0 + IF ::oFont:Underline == 0 .AND. ::lAllUnderline oPrevFont := ::oFont ::oFont:Release() ::oFont := HFONT():Add( oPrevFont:name, oPrevFont:width, oPrevFont:height, ; oPrevFont:weight, oPrevFont:charset, oPrevFont:italic, 1, oPrevFont:StrikeOut ) ENDIF ENDIF + ::oFontUnder := HFONT():Add( ::oFont:Name, 0, ::oFont:Height, , , , 1 ) IF lTransp != NIL .AND. lTransp //::extStyle += WS_EX_TRANSPARENT @@ -153,13 +169,14 @@ METHOD INIT() CLASS HStaticLink IF ! ::lInit - ::nWidth := Min( TxtRect( ::Title, Self )[ 1 ] + 5, ::nWidth ) - ::move( , , ::nWidth , , ) - IF ::GetParentForm():Type <= WND_MDICHILD + ::Resize( ) + /* + IF ::GetParentForm():Type <= WND_MDICHILD ::nHolder := 1 SetWindowObject( ::handle, Self ) Hwg_InitWinCtrl( ::handle ) ENDIF + */ Super:init() IF ::Title != NIL SETWINDOWTEXT( ::handle, ::title ) @@ -175,10 +192,11 @@ //::PAint( ) ELSEIF msg == WM_MOUSEMOVE - hwg_SetCursor( ::m_hHyperCursor ) + // hwg_SetCursor( ::m_hHyperCursor ) ::OnMouseMove( wParam, lParam ) ELSEIF msg == WM_SETCURSOR ::OnSetCursor( msg, wParam, lParam ) + TRACKMOUSEVENT( ::handle ) ELSEIF msg == WM_LBUTTONDOWN hwg_SetCursor( ::m_hHyperCursor ) ::OnClicked() @@ -229,20 +247,21 @@ METHOD OnClicked() CLASS HStaticLink LOCAL nCtrlID - IF ( ::m_bFireChild ) - nCtrlID := ::id - ::SendMessage( ::oparent:Handle, _HYPERLINK_EVENT, nCtrlID, 0 ) - //::PostMessage(pParent->m_hWnd, __EVENT_ID_, (WPARAM)nCtrlID, 0) - ELSE - ::GoToLinkUrl( ::m_csUrl ) + IF ! ISBLOCK( ::bClick ) + IF ( ::m_bFireChild ) + nCtrlID := ::id + ::SendMessage( ::oparent:Handle, _HYPERLINK_EVENT, nCtrlID, 0 ) + //::PostMessage(pParent->m_hWnd, __EVENT_ID_, (WPARAM)nCtrlID, 0) + ELSE + ::GoToLinkUrl( ::m_csUrl ) + ENDIF + + ::m_bVisited := .T. ENDIF - - ::m_bVisited := .T. - ::state := LBL_NORMAL InvalidateRect( ::handle, 0 ) RedrawWindow( ::oParent:Handle, RDW_ERASE + RDW_INVALIDATE + RDW_INTERNALPAINT , ::nLeft, ::nTop, ::nWidth, ::nHeight ) - SetFocus( ::handle ) + ::SetFocus( ) RETURN NIL @@ -252,7 +271,7 @@ HB_SYMBOL_UNUSED( nHitTest ) HB_SYMBOL_UNUSED( message ) - hwg_SetCursor( ::m_hHyperCursor ) + // hwg_SetCursor( ::m_hHyperCursor ) RETURN .t. @@ -280,9 +299,14 @@ IF ::state != LBL_INIT xPos := LOWORD( lParam ) yPos := HIWORD( lParam ) - IF ( ! PtInRect( { 4, 4, ::nWidth - 4, ::nHeight - 4 }, { xPos, yPos } ) ) - //ReleaseCapture() - res := .T. + IF ( ! PtInRect( { 0, 0, ::nWidthOver , ::nHeight }, { xPos, yPos } ) ) .AND. ::state != LBL_MOUSEOVER + res := .T. + ELSE + hwg_SetCursor( ::m_hHyperCursor ) + IF ( ! PtInRect( { 3, 3, ::nWidthover - 3, ::nHeight - 3 }, { xPos, yPos } ) ) + //ReleaseCapture() + res := .T. + ENDIF ENDIF IF ( res .AND. ! ::m_bVisited ) .or. ( res .AND. ::m_bVisited ) ::state := LBL_NORMAL @@ -298,6 +322,7 @@ ENDIF ENDIF + RETURN NIL METHOD PAint( lpDis ) CLASS HStaticLink @@ -310,7 +335,12 @@ LOCAL rcClient // LOCAL POLDFONT // LOCAL DWSTYLE + LOCAL bHasTitle + LOCAL aBmpSize := IIF( ! EMPTY( ::hbitmap ), GetBitmapSize( ::hbitmap ),{0,0} ) + LOCAL itemRect := copyrect( { drawInfo[ 4 ], drawInfo[ 5 ], drawInfo[ 6 ], drawInfo[ 7 ] } ) + LOCAL captionRect := { drawInfo[ 4 ] , drawInfo[ 5 ], drawInfo[ 6 ] , drawInfo[ 7 ] } + IF EMPTY( ::oParent:handle ) RETURN Nil ENDIF @@ -318,12 +348,26 @@ ::State := LBL_NORMAL ENDIF rcClient := CopyRect( { drawInfo[ 4 ] , drawInfo[ 5 ], drawInfo[ 6 ], drawInfo[ 7 ] } ) - SetBkMode( ::backstyle ) //TRANSPARENT ) + + IF ValType( ::hbitmap ) == "N" + bHasTitle := ValType( strtext ) == "C" .and. ! Empty( strtext ) + itemRect[ 4 ] := aBmpSize[ 2 ] + 1 + bmpRect := PrepareImageRect( ::handle, dc, bHasTitle, @itemRect, @captionRect, , , ::hbitmap, ::iStyle ) + itemRect[ 4 ] := drawInfo[ 7 ] + IF ::backstyle = TRANSPARENT + DrawTransparentBitmap( dc, ::hbitmap, bmpRect[ 1 ], bmpRect[ 2 ] ) + ELSE + DrawBitmap( dc, ::hbitmap, , bmpRect[ 1 ], bmpRect[ 2 ] ) + ENDIF + rcclient[ 1 ] += IIF( ::iStyle = ST_ALIGN_HORIZ, aBmpSize[ 1 ] + 8, 1 ) + ENDIF + SetBkMode( DC, ::backstyle ) IF ::backstyle != TRANSPARENT SetBkColor( DC, IIF( ::bColor = NIL, GetSysColor( COLOR_3DFACE ), ::bcolor ) ) FillRect( dc, rcclient[ 1 ], rcclient[ 2 ], rcclient[ 3 ], rcclient[ 4 ] ) //, ::brush:handle ) - ENDIF - dwFlags := 0 + ENDIF + dwFlags := DT_LEFT | DT_WORDBREAK + dwstyle := ::style dwFlags += ( DT_VCENTER + DT_END_ELLIPSIS ) //::dc:SelectObject( ::oFont:handle ) @@ -331,19 +375,46 @@ IF ::state == LBL_NORMAL IF ::m_bVisited //::dc:SetTextColor( ::m_sVisitedColor ) - SetTextColor( dc,::m_sVisitedColor ) + SetTextColor( DC,::m_sVisitedColor ) ELSE //::dc:SetTextColor( ::m_sLinkColor ) - SetTextColor( dc, ::m_sLinkColor ) + SetTextColor( DC, ::m_sLinkColor ) ENDIF ELSEIF ::state == LBL_MOUSEOVER //::dc:SetTextColor( ::m_sHoverColor ) - SetTextColor( dc,::m_sHoverColor ) + SetTextColor( DC,::m_sHoverColor ) ENDIF //::dc:DrawText( strtext, rcClient, dwFlags ) - DrawText( dc, strtext, rcClient, dwFlags ) + IF ::state = LBL_MOUSEOVER .AND. ! ::lAllUnderline + SelectObject( DC, ::oFontUnder:handle ) + DrawText( dc, strText, rcClient, dwFlags ) + SelectObject( DC, ::oFont:handle ) + ELSE + DrawText( dc, strText, rcClient, dwFlags ) + ENDIF + // ::dc:END() RETURN NIL + +METHOD Resize( x, y ) CLASS HStaticLink + LOCAL aCoors := GetClientRect( ::handle ) + LOCAL aBmpSize, aTxtSize + + aBmpSize := IIF( ! EMPTY( ::hbitmap ), GetBitmapSize( ::hbitmap ), { 0,0 } ) + aBmpSize[ 1 ] += IIF( aBmpSize[ 1 ] > 0, 6, 0 ) + aTxtSize := TxtRect( ::Title, Self ) + aTxtSize[ 2 ] += IIF( ::lAllUnderline, 0, 3 ) + IF aTxtSize[ 1 ] + 1 < ::nWidth - aBmpSize[ 1 ] //tava 20 + ::nHeight := aTxtSize[ 2 ] + 2 + ELSE + ::nHeight := aTxtSize[ 2 ] * 2 + 1 + ENDIF + ::nWidthOver := MIN( aTxtSize[ 1 ] + 1 + aBmpSize[ 1 ], ::nWidth ) + ::nHeight := MAX( ::nHeight, aTxtSize[ 2 ] ) + ::nHeight := MAX( ::nHeight, aBmpSize[ 2 ] + 4 ) + ::Move( , , , ::nHeight, 0 ) + + RETURN Nil Modified: trunk/hwgui/source/hwindow.prg =================================================================== --- trunk/hwgui/source/hwindow.prg 2012-07-02 16:52:31 UTC (rev 1846) +++ trunk/hwgui/source/hwindow.prg 2012-07-02 17:52:47 UTC (rev 1847) @@ -37,18 +37,18 @@ aCoors := GetClientRect( oWnd:handle ) //MoveWindow( HWindow():aWindows[ 2 ]:handle, oWnd:aOffset[ 1 ], oWnd:aOffset[ 2 ], aCoors[ 3 ] - oWnd:aOffset[ 1 ] - oWnd:aOffset[ 3 ], aCoors[ 4 ] - oWnd:aOffset[ 2 ] - oWnd:aOffset[ 4 ] ) //aCoors := GetClientRect(HWindow():aWindows[ 2 ]:handle ) - SetWindowPos( HWindow():aWindows[ 2 ]:handle, Nil, oWnd:aOffset[ 1 ], oWnd:aOffset[ 2 ], aCoors[ 3 ] - oWnd:aOffset[ 1 ] - oWnd:aOffset[ 3 ], aCoors[ 4 ] - oWnd:aOffset[ 2 ] - oWnd:aOffset[ 4 ], SWP_NOZORDER) + SetWindowPos( HWindow():aWindows[ 2 ]:handle, Nil, oWnd:aOffset[ 1 ], oWnd:aOffset[ 2 ], aCoors[ 3 ] - oWnd:aOffset[ 1 ] - oWnd:aOffset[ 3 ], aCoors[ 4 ] - oWnd:aOffset[ 2 ] - oWnd:aOffset[ 4 ] , SWP_NOZORDER) aCoors := GetWindowRect( HWindow():aWindows[ 2 ]:handle ) HWindow():aWindows[ 2 ]:nWidth := aCoors[ 3 ] - aCoors[ 1 ] HWindow():aWindows[ 2 ]:nHeight := aCoors[ 4 ] - aCoors[ 2 ] - // ADDED + // ADDED = IF !Empty( oWnd:Screen ) oWnd:Screen:nWidth := aCoors[ 3 ] - aCoors[ 1 ] oWnd:Screen:nHeight := aCoors[ 4 ] - aCoors[ 2 ] InvalidateRect( oWnd:screen:handle, 0 ) SetWindowPos( oWnd:screen:handle, Nil, 0, 0, oWnd:Screen:nWidth, oWnd:Screen:nHeight, SWP_NOACTIVATE + SWP_NOZORDER) ENDIF - IF ! Empty( oWnd := oWnd:GetMdiActive() ) .AND.oWnd:Type = WND_MDICHILD .AND. oWnd:lmaximized .AND.; + IF ! SELFFOCUS( oWnd:Screen:Handle, oWnd:handle ) .AND. ! Empty( oWnd := oWnd:GetMdiActive() ) .AND.oWnd:Type = WND_MDICHILD .AND. oWnd:lmaximized .AND.; ( oWnd:lModal .OR. oWnd:lChild ) oWnd:lmaximized := .F. *-SENDMESSAGE( oWnd:handle, WM_SYSCOMMAND, SC_MAXIMIZE, 0 ) @@ -297,13 +297,15 @@ lCentered := ( ! lMaximized .AND. ! EMPTY( lCentered ) .AND. lCentered ) .OR. Hwg_BitAND( ::Style, DS_CENTER ) != 0 DEFAULT lShow := .T. CreateGetList( Self ) - + AEVAL( ::aControls, { | o | o:lInit := .F. } ) + IF ::Type == WND_MDI oWndClient := HWindow():New( ,,, ::style, ::title,, ::bInit, ::bDestroy, ::bSize, ; ::bPaint, ::bGetFocus, ::bLostFocus, ::bOther, ::obmp ) + //handle := Hwg_InitClientWindow( oWndClient, ::nMenuPos, ::nLeft, ::nTop + 60, ::nWidth, ::nHeight ) - handle := Hwg_InitClientWindow( oWndClient, ::nMenuPos, ::nLeft, ::nTop, ::nWidth, ::nHeight ) + handle := Hwg_InitClientWindow( oWndClient, ::nMenuPos, ::nLeft, ::nTop, ::nWidth, ::nHeight ) *-oWndClient:handle = handle @@ -313,11 +315,18 @@ // ADDED screen to backgroup to MDI MAIN ::Screen := HMdiChildWindow():New(, ::tcolor, WS_CHILD + MB_USERICON + WS_MAXIMIZE + WS_DISABLED,; - 0,0, ::nWidth * 2, ::nheight * 2, -1,,,,,,,,,,,::oBmp,,,,,) + 0, 0, ::nWidth * 1, ::nheight * 1, ; //- GETSYSTEMMETRICS( SM_CYSMCAPTION ) - GETSYSTEMMETRICS( SM_CYSMCAPTION ) , ; + -1 ,,,,,,,,,,,::oBmp,,,,,, .T.) + ::Screen:lExitOnEsc := .F. + //::Screen:lClipper := .F. ::Screen:Activate( .T., .T. ) // END oWndClient:handle := handle + /* recalculate area offset */ + SENDMESSAGE( ::Handle, WM_SIZE, 0, MAKELPARAM( ::nWidth, ::nHeight ) ) + InitControls( Self ) + IF ::bInit != Nil lres := Eval( ::bInit, Self ) IF ValType( lres ) = "L" .AND. ! lres @@ -328,16 +337,18 @@ ::Screen:lBmpCenter := ::lBmpCenter *-EnableWindow( ::Screen:Handle, .T. ) + ::Screen:Maximize() SetWindowPos( ::Screen:Handle, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOREDRAW + SWP_NOACTIVATE + SWP_NOMOVE + SWP_NOSIZE + SWP_NOZORDER +; SWP_NOOWNERZORDER + SWP_FRAMECHANGED ) ::Screen:Restore() - IF lMaximized ::maximize() ELSEIF lMinimized ::minimize() ELSEIF lCentered ::center() + ELSE + ENDIF IF ( bActivate != NIL ) @@ -347,7 +358,9 @@ Hwg_ActivateMdiWindow( ( lShow == Nil .OR. lShow ), ::hAccel, lMaximized, lMinimized ) ELSEIF ::Type == WND_MAIN - + + InitControls( Self ) + IF ::bInit != Nil lres := Eval( ::bInit, Self ) IF ValType( lres ) = "L" .AND. ! lres @@ -376,8 +389,9 @@ METHOD onEvent( msg, wParam, lParam ) CLASS HMainWindow Local i, xPos, yPos, oMdi, aCoors + LOCAL nFocus := If( Hb_IsNumeric( ::nFocus ), ::nFocus, 0 ) - // writelog( str(msg) + str(wParam) + str(lParam) ) + // writelog( str(msg) + str(wParam) + str(lParam) + chr(13) ) IF msg = WM_MENUCHAR // PROCESS ACCELERATOR IN CONTROLS @@ -404,10 +418,11 @@ ENDIF ENDIF ENDIF + ELSEIF msg = WM_SETFOCUS .AND. nFocus > 0 + SETFOCUS( nFocus ) ENDIF - // IF ( i := Ascan( ::aMessages[1],msg ) ) != 0 .AND. ; - ( !::lSuspendMsgsHandling .OR. msg = WM_ERASEBKGND .OR. msg = WM_SIZE ) //.OR. msg = WM_ACTIVATE) + ( !::lSuspendMsgsHandling .OR. msg = WM_ERASEBKGND .OR. msg = WM_SIZE ) Return Eval( ::aMessages[2,i], Self, wParam, lParam ) ELSE IF msg == WM_HSCROLL .OR. msg == WM_VSCROLL .or. msg == WM_MOUSEWHEEL @@ -544,12 +559,15 @@ ENDIF // SCROLLSBARS + ::RedefineScrollbars() + /* IF ::nScrollBars > - 1 AEval( ::aControls, { | o | ::ncurHeight := max( o:nTop + o:nHeight + GetSystemMetrics( SM_CYMENU ) + GETSYSTEMMETRICS( SM_CYCAPTION ) + 12 , ::ncurHeight ) } ) AEval( ::aControls, { | o | ::ncurWidth := max( o:nLeft + o:nWidth + 24 , ::ncurWidth ) } ) ::ResetScrollbars() ::SetupScrollbars() ENDIF + */ IF bActivate != NIL Eval( bActivate, Self ) @@ -850,7 +868,7 @@ oWnd:nTop := aControls[ 2 ] IF oWnd:type == WND_MDICHILD .AND. ! oWnd:lMaximized //oWnd:aRectSave := { oWnd:nLeft, oWnd:nTop, oWnd:nWidth, oWnd:nHeight } - IF oWnd:nHeight > GETSYSTEMMETRICS( SM_CYCAPTION ) + 6 + IF oWnd:nHeight > GETSYSTEMMETRICS( SM_CYCAPTION ) + 6 oWnd:aRectSave := { oWnd:nLeft, oWnd:nTop, oWnd:nWidth, oWnd:nHeight } ELSE oWnd:aRectSave[ 1 ] := oWnd:nLeft @@ -872,10 +890,15 @@ ENDIF Return 1 ELSEIF oWnd:type != WND_MDI //.AND. oWnd:type != WND_MAIN + aCoors := GetClientRect( oWnd:handle ) IF oWnd:brush != Nil IF ValType( oWnd:brush ) != "N" FillRect( wParam, aCoors[ 1 ], aCoors[ 2 ], aCoors[ 3 ] + 1, aCoors[ 4 ] + 1, oWnd:brush:handle ) + IF SELFFOCUS( oWnd:handle, oWnd:Screen:Handle ) + SetWindowPos( oWnd:Handle, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE + SWP_NOMOVE + SWP_NOSIZE + SWP_NOZORDER +; + SWP_NOOWNERZORDER + SWP_FRAMECHANGED) + ENDIF RETURN 1 ENDIF ELSEIF oWnd:Type != WND_MAIN @@ -1043,7 +1066,7 @@ SENDMESSAGE( oWnd:handle, WM_UPDATEUISTATE, makelong( UIS_CLEAR, UISF_HIDEFOCUS ), 0 ) SENDMESSAGE( oWnd:handle, WM_UPDATEUISTATE, makelong( UIS_CLEAR, UISF_HIDEACCEL ), 0 ) IF oWnd:WindowState > 0 - onMove( oWnd ) + onMove( oWnd ) ENDIF RETURN - 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <LF...@us...> - 2012-07-02 16:52:38
|
Revision: 1846 http://hwgui.svn.sourceforge.net/hwgui/?rev=1846&view=rev Author: LFBASSO Date: 2012-07-02 16:52:31 +0000 (Mon, 02 Jul 2012) Log Message: ----------- 2012-07-02 13:50 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/draw.c + void TransparentBmp * HB_FUNC( DRAWTRANSPARENTBITMAP ) changed transparency method of using the function TransparentBmp * source/nice.c + void Gradient * HB_FUNC( GRADIENT ) * source/misc.c * HB_FUNC( SETSCROLLINFO ) ! changed si.nMin = 1 to si.nMin = 0; Modified Paths: -------------- trunk/hwgui/Changelog trunk/hwgui/source/draw.c trunk/hwgui/source/misc.c trunk/hwgui/source/nice.c Modified: trunk/hwgui/Changelog =================================================================== --- trunk/hwgui/Changelog 2012-07-02 16:23:54 UTC (rev 1845) +++ trunk/hwgui/Changelog 2012-07-02 16:52:31 UTC (rev 1846) @@ -8,7 +8,20 @@ 2002-12-01 23:12 UTC+0100 Foo Bar <fo...@fo...> */ -2012-07-02 21:40 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> + +2012-07-02 13:50 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> + * source/draw.c + + void TransparentBmp + * HB_FUNC( DRAWTRANSPARENTBITMAP ) + changed transparency method of using the function TransparentBmp + * source/nice.c + + void Gradient + * HB_FUNC( GRADIENT ) + * source/misc.c + * HB_FUNC( SETSCROLLINFO ) + ! changed si.nMin = 1 to si.nMin = 0; + +2012-07-02 13:20 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/htree.prg + DATA bKeyDown + METHOD Top() Modified: trunk/hwgui/source/draw.c =================================================================== --- trunk/hwgui/source/draw.c 2012-07-02 16:23:54 UTC (rev 1845) +++ trunk/hwgui/source/draw.c 2012-07-02 16:52:31 UTC (rev 1846) @@ -32,6 +32,18 @@ #endif #endif +typedef int ( _stdcall * TRANSPARENTBLT ) ( HDC, int, int, int, int, HDC, int, int, int, int, int ); + +static TRANSPARENTBLT s_pTransparentBlt = NULL; + +void TransparentBmp( HDC hDC, int x, int y, int nWidthDest, int nHeightDest, HDC dcImage, int bmWidth, int bmHeight, int trColor ) +{ + if( s_pTransparentBlt == NULL ) + s_pTransparentBlt = ( TRANSPARENTBLT ) GetProcAddress( LoadLibrary( TEXT( "MSIMG32.DLL" ) ), + "TransparentBlt" ); + s_pTransparentBlt( hDC, x, y, nWidthDest, nHeightDest, dcImage, 0, 0, bmWidth, bmHeight, trColor ); +} + BOOL Array2Rect( PHB_ITEM aRect, RECT * rc ) { if( HB_IS_ARRAY( aRect ) && hb_arrayLen( aRect ) == 4 ) @@ -425,6 +437,7 @@ if( nWidthDest && ( nWidthDest != bitmap.bmWidth || nHeightDest != bitmap.bmHeight ) ) { + /* BitBlt( dcTrans, 0, 0, bitmap.bmWidth, bitmap.bmHeight, dcImage, 0, 0, SRCCOPY ); SetStretchBltMode( hDC, COLORONCOLOR ); @@ -434,9 +447,14 @@ bitmap.bmWidth, bitmap.bmHeight, SRCAND ); StretchBlt( hDC, 0, 0, nWidthDest, nHeightDest, dcImage, 0, 0, bitmap.bmWidth, bitmap.bmHeight, SRCINVERT ); + */ + SetStretchBltMode( hDC, COLORONCOLOR ); + TransparentBmp( hDC, x, y, nWidthDest, nHeightDest, dcImage, bitmap.bmWidth, bitmap.bmHeight, trColor ); + } else { + /* BitBlt( dcTrans, 0, 0, bitmap.bmWidth, bitmap.bmHeight, dcImage, 0, 0, SRCCOPY ); // Do the work - True Mask method - cool if not actual display @@ -446,6 +464,8 @@ SRCAND ); BitBlt( hDC, x, y, bitmap.bmWidth, bitmap.bmHeight, dcImage, 0, 0, SRCINVERT ); + */ + TransparentBmp( hDC, x, y, bitmap.bmWidth, bitmap.bmHeight, dcImage, bitmap.bmWidth, bitmap.bmHeight, trColor ); } // Restore settings SelectObject( dcImage, pOldBitmapImage ); Modified: trunk/hwgui/source/misc.c =================================================================== --- trunk/hwgui/source/misc.c 2012-07-02 16:23:54 UTC (rev 1845) +++ trunk/hwgui/source/misc.c 2012-07-02 16:52:31 UTC (rev 1846) @@ -481,7 +481,7 @@ keybd_event( VK_MENU, 0, KEYEVENTF_KEYUP, 0 ); } -/* SetScrollInfo( hWnd, nType, nRedraw, nPos, nPage ) +/* SetScrollInfo( hWnd, nType, nRedraw, nPos, nPage, nmax ) */ HB_FUNC( SETSCROLLINFO ) { @@ -502,7 +502,7 @@ if( hb_pcount() > 5 && !HB_ISNIL( 6 ) ) { - si.nMin = 1; + si.nMin = 0; si.nMax = hb_parni( 6 ); fMask |= SIF_RANGE; } Modified: trunk/hwgui/source/nice.c =================================================================== --- trunk/hwgui/source/nice.c 2012-07-02 16:23:54 UTC (rev 1845) +++ trunk/hwgui/source/nice.c 2012-07-02 16:52:31 UTC (rev 1846) @@ -94,7 +94,43 @@ s_pGradientfill( hdc, Vert, 2, &Rect, 1, GRADIENT_FILL_RECT_V ); } +void Gradient( HDC hdc, int x, int y, int w, int h, int color1, int color2, int nmode ) //int , int g, int b, int nMode ) +{ + TRIVERTEX Vert[2]; + GRADIENT_RECT Rect; + int r, g, b, r2, g2, b2 ; + HB_SYMBOL_UNUSED( x ); + HB_SYMBOL_UNUSED( y ); + r = color1 % 256 ; + g = color1 / 256 % 256 ; + b = color1 / 256 / 256 % 256 ; + r2 = color2 % 256 ; + g2 = color2 / 256 % 256 ; + b2 = color2 / 256 / 256 % 256 ; + + + // ****************************************************** + Vert[0].x = 0; + Vert[0].y = 0; + Vert[0].Red = 65535 - ( 65535 - ( r * 256 ) ); + Vert[0].Green = 65535 - ( 65535 - ( g * 256 ) ); + Vert[0].Blue = 65535 - ( 65535 - ( b * 256 ) ); + Vert[0].Alpha = 0; + // ****************************************************** + Vert[1].x = w ; + Vert[1].y = h ; + Vert[1].Red = 65535 - ( 65535 - ( r2 * 256 ) ); + Vert[1].Green = 65535 - ( 65535 - ( g2 * 256 ) ); + Vert[1].Blue = 65535 - ( 65535 - ( b2 * 256 ) ); + Vert[1].Alpha = 0; + // ****************************************************** + Rect.UpperLeft = 0; + Rect.LowerRight = 1; + // ****************************************************** + s_pGradientfill( hdc, Vert, 2, &Rect, 1, nmode ); //GRADIENT_FILL_RECT_H ); +} + LRESULT CALLBACK NiceButtProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam ) { @@ -207,6 +243,21 @@ hb_parni( 8 ) ); } +HB_FUNC( GRADIENT ) +{ + if( s_pGradientfill == NULL ) + s_pGradientfill = ( GRADIENTFILL ) + GetProcAddress( LoadLibrary( TEXT( "MSIMG32.DLL" ) ), + "GradientFill" ); + //void Gradient( HDC hdc, int x, int y, int w, int h, int color1, int color2, int nmode ) + + Gradient( ( HDC ) HB_PARHANDLE( 1 ), hb_parni( 2 ), hb_parni( 3 ), + hb_parni( 4 ), hb_parni( 5 ), + ( hb_pcount() > 5 && ! HB_ISNIL( 6 ) ) ? hb_parni( 6 ): 16777215 , + ( hb_pcount() > 6 && ! HB_ISNIL( 7 ) ) ? hb_parni( 7 ): 16777215 , + ( hb_pcount() > 7 && ! HB_ISNIL( 8 ) ) ? hb_parni( 8 ): 0 ) ; +} + HB_FUNC( MAKELONG ) { hb_retnl( ( LONG ) MAKELONG( ( WORD ) hb_parnl( 1 ), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <LF...@us...> - 2012-07-02 16:24:05
|
Revision: 1845 http://hwgui.svn.sourceforge.net/hwgui/?rev=1845&view=rev Author: LFBASSO Date: 2012-07-02 16:23:54 +0000 (Mon, 02 Jul 2012) Log Message: ----------- 2012-07-02 21:40 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> * source/htree.prg + DATA bKeyDown + METHOD Top() + METHOD Bottom() * Method Notify() * add Notify TVN_KEYDOWN handling keyDown event passing three parameters ; ::oItem, nKeyDown, Self * source/hsplit.prg * METHOD Paint() * METHOD DragAll() ! fix in redraw * source/hpanel.prg + METHOD ResizeOffSet( nMode , lRelease ) * METHOD Hide() * METHOD Show() * METHOD Release() * METHOD Resize() ! fixes in redraw and reposition in MDI_MAIN Modified Paths: -------------- trunk/hwgui/Changelog trunk/hwgui/source/hpanel.prg trunk/hwgui/source/hsplit.prg trunk/hwgui/source/htree.prg Modified: trunk/hwgui/Changelog =================================================================== --- trunk/hwgui/Changelog 2012-06-06 11:11:24 UTC (rev 1844) +++ trunk/hwgui/Changelog 2012-07-02 16:23:54 UTC (rev 1845) @@ -8,6 +8,25 @@ 2002-12-01 23:12 UTC+0100 Foo Bar <fo...@fo...> */ +2012-07-02 21:40 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net> + * source/htree.prg + + DATA bKeyDown + + METHOD Top() + + METHOD Bottom() + * Method Notify() + * add Notify TVN_KEYDOWN handling keyDown event passing three parameters ; ::oItem, nKeyDown, Self + * source/hsplit.prg + * METHOD Paint() + * METHOD DragAll() + ! fix in redraw + * source/hpanel.prg + + METHOD ResizeOffSet( nMode , lRelease ) + * METHOD Hide() + * METHOD Show() + * METHOD Release() + * METHOD Resize() + ! fixes in redraw and reposition in MDI_MAIN + 2012-06-06 15:10 UTC+0300 Alexander Kresin <al...@be...> * source/xml/hxmldoc.prg * source/xml/xmlparse.c Modified: trunk/hwgui/source/hpanel.prg =================================================================== --- trunk/hwgui/source/hpanel.prg 2012-06-06 11:11:24 UTC (rev 1844) +++ trunk/hwgui/source/hpanel.prg 2012-07-02 16:23:54 UTC (rev 1845) @@ -11,6 +11,7 @@ #include "windows.ch" #include "hbclass.ch" #include "guilib.ch" + #define TRANSPARENT 1 STATIC nrePaint := - 1 @@ -35,6 +36,7 @@ METHOD Show() METHOD Release() METHOD Resize() + METHOD ResizeOffSet( nMode , lRelease ) ENDCLASS @@ -98,7 +100,9 @@ IF !Empty( handle ) ::handle := CreatePanel( handle, ::id, ; ::style, ::nLeft, ::nTop, ::nWidth, ::nHeight ) - IF __ObjHasMsg( ::oParent, "AOFFSET" ) + ::ResizeOffSet( 0 ) + /* + IF __ObjHasMsg( ::oParent, "AOFFSET" ) .AND. ::oParent:type == WND_MDI aCoors := GetWindowRect( ::handle ) nWidth := aCoors[ 3 ] - aCoors[ 1 ] nHeight:= aCoors[ 4 ] - aCoors[ 2 ] @@ -110,8 +114,9 @@ ELSE ::oParent:aOffset[3] += nWidth ENDIF - ENDIF + ENDIF ENDIF + */ ::Init() ENDIF RETURN Nil @@ -121,9 +126,9 @@ IF !::lInit IF ::bSize == Nil ::bSize := { | o, x, y | o:Move( Iif( ::nLeft > 0, x - ::nLeft, 0 ), ; - Iif( ::nTop > 0, y - ::nHeight, 0 ), ; - Iif( ::nWidth == 0 .OR. ::lResizeX, x, ::nWidth ), ; - Iif( ::nHeight == 0 .OR. ::lResizeY, y, ::nHeight ) ) } + Iif( ::nTop > 0, y - ::nHeight, 0 ), ; + Iif( ::nWidth == 0 .OR. ::lResizeX, x, ::nWidth ), ; + Iif( ::nHeight == 0 .OR. ::lResizeY, y, ::nHeight ) ) } ENDIF Super:Init() @@ -131,13 +136,8 @@ SetWindowObject( ::handle, Self ) Hwg_InitWinCtrl( ::handle ) - ::rect := GetClientRect( ::handle ) - IF ::nScrollBars > - 1 .AND. ::bScroll = Nil - AEval( ::aControls, { | o | ::ncurHeight := max( o:nTop + o:nHeight + VERT_PTS ^ 2 + 6, ::ncurHeight ) } ) - AEval( ::aControls, { | o | ::ncurWidth := max( o:nLeft + o:nWidth + HORZ_PTS ^ 2 + 12, ::ncurWidth ) } ) - ::ResetScrollbars() - ::SetupScrollbars() - ENDIF + ::RedefineScrollbars() + ENDIF RETURN Nil @@ -146,6 +146,9 @@ IF msg == WM_PAINT ::Paint() + *-RedrawWindow( ::handle, RDW_NOERASE + RDW_FRAME + RDW_INVALIDATE ) + ELSEIF msg == WM_NCPAINT + RedrawWindow( ::handle, RDW_NOERASE + RDW_FRAME + RDW_INVALIDATE ) ELSEIF msg == WM_ERASEBKGND IF ::backstyle = OPAQUE RETURN nrePaint @@ -162,18 +165,16 @@ */ ELSE SETTRANSPARENTMODE( wParam, .T. ) - RETURN GetStockObject( 5 ) + RETURN GetStockObject( NULL_BRUSH ) ENDIF ELSEIF msg == WM_SIZE IF ::oEmbedded != Nil ::oEmbedded:Resize( Loword( lParam ), Hiword( lParam ) ) ENDIF - IF ::nScrollBars > - 1 .AND. ::bScroll = Nil - ::ResetScrollbars() - ::SetupScrollbars() - ENDIF + + ::RedefineScrollbars() ::Resize() - ::Super:onEvent( WM_SIZE, wParam, lParam ) + RETURN Super:onEvent( WM_SIZE, wParam, lParam ) ELSEIF msg == WM_DESTROY IF ::oEmbedded != Nil @@ -181,8 +182,23 @@ ENDIF ::Super:onEvent( WM_DESTROY ) RETURN 0 - ELSEIF msg = WM_SETFOCUS - getskip( ::oParent, ::handle, , ::nGetSkip ) + ENDIF + IF ::bOther != Nil + IF Valtype( nRet := Eval( ::bOther,Self,msg,wParam,lParam ) ) != "N" + nRet := IIF( VALTYPE( nRet ) = "L" .AND. ! nRet, 0, -1 ) + ENDIF + IF nRet >= 0 + RETURN -1 + ENDIF + ENDIF + IF msg = WM_NCPAINT .AND. ::GetParentForm():nInitFocus > 0 .AND. ; + ( SELFFOCUS( GetParent( ::GetParentForm():nInitFocus ), ::Handle ) .OR. ; + SELFFOCUS( GetParent( ::GetParentForm():nInitFocus ), GetParent( ::Handle ) ) ) + GetSkip( ::oParent, ::GetParentForm():nInitFocus , , IIF( SelfFocus( ::GetParentForm():nInitFocus, ::Handle ), 1, 0 ) ) + ::GetParentForm():nInitFocus := 0 + + ELSEIF msg = WM_SETFOCUS .AND. EMPTY(::GetParentForm():nInitFocus) .AND. ! ::lSuspendMsgsHandling //.AND. Hwg_BitaND( ::sTyle, WS_TABSTOP ) > 0 . + Getskip( ::oParent, ::handle, , ::nGetSkip ) /* ELSEIF msg = WM_KEYUP IF wParam = VK_DOWN @@ -197,7 +213,7 @@ ELSE IF msg == WM_HSCROLL .OR. msg == WM_VSCROLL .or. msg == WM_MOUSEWHEEL IF ::nScrollBars != -1 .AND. ::bScroll = Nil - ::ScrollHV( Self,msg,wParam,lParam ) + ::ScrollHV( Self, msg, wParam, lParam ) IF msg == WM_MOUSEWHEEL RETURN 0 ENDIF @@ -210,7 +226,6 @@ RETURN - 1 - METHOD Paint() CLASS HPanel LOCAL pps, hDC, aCoors, oPenLight, oPenGray @@ -231,7 +246,8 @@ FillRect( hDC, aCoors[ 1 ], aCoors[ 2 ], aCoors[ 3 ], aCoors[ 4 ], ::brush:handle ) ENDIF ELSE - FillRect( hDC, aCoors[ 1 ], aCoors[ 2 ], aCoors[ 3 ], aCoors[ 4 ], COLOR_3DFACE + 1 ) + * FillRect( hDC, aCoors[ 1 ], aCoors[ 2 ], aCoors[ 3 ], aCoors[ 4 ], COLOR_3DFACE + 1 ) + Gradient( hDC, aCoors[ 1 ], aCoors[ 2 ], aCoors[ 3 ], aCoors[ 4 ], RGB( 230, 240, 255 ), RGB( 255, 255, 2555 ), 0 ) ENDIF ENDIF nrePaint := -1 @@ -253,8 +269,11 @@ METHOD Release() CLASS HPanel + InvalidateRect(::oParent:handle, 1, ::nLeft, ::nTop, ::nLeft + ::nWidth, ::nTop + ::nHeight) + ::ResizeOffSet( 3, .T. ) + /* IF __ObjHasMsg( ::oParent, "AOFFSET" ) .AND. ::oParent:type == WND_MDI - IF ::nWidth > ::nHeight .OR. ::nWidth == 0 + IF (::nWidth > ::nHeight .OR. ::nWidth == 0 ).AND. ::oParent:aOffset[2] > 0 ::oParent:aOffset[ 2 ] -= ::nHeight ELSEIF ::nHeight > ::nWidth .OR. ::nHeight == 0 IF ::nLeft == 0 @@ -263,20 +282,32 @@ ::oParent:aOffset[ 3 ] -= ::nWidth ENDIF ENDIF - InvalidateRect(::oParent:handle, 1, ::nLeft, ::nTop, ::nLeft + ::nWidth, ::nTop + ::nHeight) + ::oParent:aOffset[ 1 ] := MAX( ::oParent:aOffset[ 1 ] , 0 ) + ::oParent:aOffset[ 2 ] := MAX( ::oParent:aOffset[ 2 ] , 0 ) + ::oParent:aOffset[ 3 ] := MAX( ::oParent:aOffset[ 3 ] , 0 ) + SENDMESSAGE( ::oParent:Handle, WM_SIZE, 0, MAKELPARAM( ::oParent:nWidth, ::oParent:nHeight ) ) + ::nHeight := 0 + ::nWidth := 0 ENDIF - SENDMESSAGE( ::oParent:Handle, WM_SIZE, 0, MAKELPARAM( ::nWidth, ::nHeight ) ) - ::oParent:DelControl( Self ) + */ + ::nHeight := 0 + ::nWidth := 0 + Super:Release( ) + // ::oParent:DelControl( Self ) + RETURN Nil METHOD Hide() CLASS HPanel - + LOCAL lRes + IF ::lHide Return Nil ENDIF nrePaint := 0 + lres := ::ResizeOffSet( 3 ) + /* IF __ObjHasMsg( ::oParent,"AOFFSET" ) .AND. ::oParent:type == WND_MDI - IF ::nWidth > ::nHeight .OR. ::nWidth == 0 + IF ( ::nWidth > ::nHeight .OR. ::nWidth == 0 ) .AND. ::oParent:aOffset[2] > 0 ::oParent:aOffset[2] -= ::nHeight ELSEIF ::nHeight > ::nWidth .OR. ::nHeight == 0 IF ::nLeft == 0 @@ -286,21 +317,25 @@ ENDIF ENDIF ENDIF + */ Super:Hide() - IF ::oParent:type == WND_MDI - SENDMESSAGE( ::oParent:Handle, WM_SIZE, 0, MAKELPARAM( ::nWidth, ::nHeight ) ) + IF ::oParent:type == WND_MDI .AND. lRes + //SENDMESSAGE( ::oParent:Handle, WM_SIZE, 0, MAKELPARAM( ::oParent:nWidth, ::oParent:nHeight ) ) InvalidateRect( ::oParent:handle, 1, ::nLeft, ::nTop + 1, ::nLeft + ::nWidth, ::nTop + ::nHeight ) ENDIF RETURN Nil METHOD Show() CLASS HPanel - + LOCAL lRes + IF ! ::lHide Return Nil ENDIF nrePaint := 0 + lRes := ::ResizeOffSet( 2 ) + /* IF __ObjHasMsg( ::oParent,"AOFFSET" ) .AND. ::oParent:type == WND_MDI //ISWINDOwVISIBLE( ::handle ) - IF ::nWidth > ::nHeight .OR. ::nWidth == 0 + IF ( ::nWidth > ::nHeight .OR. ::nWidth == 0 ) .AND. ::oParent:aOffset[2] > 0 ::oParent:aOffset[2] += ::nHeight ELSEIF ::nHeight > ::nWidth .OR. ::nHeight == 0 IF ::nLeft == 0 @@ -310,25 +345,30 @@ ENDIF ENDIF ENDIF + */ Super:Show() - IF ::oParent:type == WND_MDI - SENDMESSAGE( ::oParent:Handle, WM_SIZE, 0, MAKELPARAM( ::nWidth, ::nHeight ) ) + IF ::oParent:type == WND_MDI .AND. lRes + //SENDMESSAGE( ::oParent:Handle, WM_SIZE, 0, MAKELPARAM( ::oParent:nWidth, ::oParent:nHeight ) ) + InvalidateRect( ::oParent:handle, 1, ::nLeft, ::nTop+1, ::nLeft + ::nWidth, ::nTop + ::nHeight ) nrePaint := -1 ENDIF - RETURN Nil + RETURN Nil METHOD Resize() CLASS HPanel - LOCAL aCoors := GetWindowRect( ::handle ) Local nHeight := aCoors[ 4 ] - aCoors[ 2 ] Local nWidth := aCoors[ 3 ] - aCoors[ 1 ] - - IF !iswindowvisible( ::handle ) .OR. ::nHeight = nHeight + + IF !isWindowVisible( ::handle ) .OR. ( ::nHeight = nHeight .AND. ::nWidth = nWidth ) Return Nil ENDIF + IF ! ::ResizeOffSet( 1 ) + RETURN Nil + ENDIF + /* IF __ObjHasMsg( ::oParent,"AOFFSET" ) .AND. ::oParent:type == WND_MDI //ISWINDOwVISIBLE( ::handle ) - IF ::nWidth > ::nHeight .OR. ::nWidth == 0 + IF ( ::nWidth > ::nHeight .OR. ::nWidth == 0 ) //.AND. ::oParent:aOffset[2] > 0 ::oParent:aOffset[2] += ( nHeight - ::nHeight ) ELSEIF ::nHeight > ::nWidth .OR. ::nHeight == 0 IF ::nLeft == 0 @@ -337,12 +377,48 @@ ::oParent:aOffset[3] += ( nWidth - ::nWidth ) ENDIF ENDIF - SENDMESSAGE( ::oParent:Handle, WM_SIZE, 0, MAKELPARAM( nWidth, nHeight ) ) + SENDMESSAGE( ::oParent:Handle, WM_SIZE, 0, MAKELPARAM( ::oParent:nWidth, ::oParent:nHeight ) ) ELSE RETURN Nil ENDIF - ::nWidth := aCoors[3] - aCoors[1] - ::nHeight := aCoors[4] - aCoors[2] + */ + ::nWidth := aCoors[ 3 ] - aCoors[ 1 ] + ::nHeight := aCoors[ 4 ] - aCoors[ 2 ] RedrawWindow( ::handle, RDW_ERASE + RDW_INVALIDATE + RDW_FRAME + RDW_INTERNALPAINT + RDW_UPDATENOW ) // Force a complete redraw - RETURN Nil + RETURN Nil +/* nMode => nMode = 0 INIT / nMode = 1 RESIZE / nMode = 2 SHOW / nMode = 3 HIDE */ +METHOD ResizeOffSet( nMode , lRelease ) CLASS HPanel + LOCAL aCoors := GetWindowRect( ::handle ) + LOCAL nHeight := aCoors[ 4 ] - aCoors[ 2 ] + LOCAL nWidth := aCoors[ 3 ] - aCoors[ 1 ] + LOCAL nWinc := nWidth - ::nWidth + LOCAL nHinc := nHeight - ::nHeight + LOCAL lres := .F. + + nWinc := IIF( nMode = 1, nWinc, IIF( nMode = 2, ::nWidth, nWidth ) ) + nHinc := IIF( nMode = 1, nHinc, IIF( nMode = 2, ::nHeight, nHeight ) ) + DEFAULT nMode := 0 + + IF __ObjHasMsg( ::oParent,"AOFFSET" ) .AND. ::oParent:type == WND_MDI + IF ( ::nWidth > ::nHeight .OR. ::nWidth == 0 ) //.AND. ::oParent:aOffset[2] > 0 //::nWidth = ::oParent:nWidth ) + ::oParent:aOffset[2] += IIF( nMode != 3, nHinc, - nHinc ) + lRes := .T. + ELSEIF ::nHeight > ::nWidth .OR. ::nHeight == 0 + IF ::nLeft == 0 + ::oParent:aOffset[ 1 ] += IIF( nMode != 3, nWinc, - nWinc ) + ELSE + ::oParent:aOffset[ 3 ] += IIF( nMode != 3, nWinc, - nWinc ) + ENDIF + lRes := .T. + ENDIF + ::oParent:aOffset[ 1 ] := MAX( ::oParent:aOffset[ 1 ] , 0 ) + ::oParent:aOffset[ 2 ] := MAX( ::oParent:aOffset[ 2 ] , 0 ) + ::oParent:aOffset[ 3 ] := MAX( ::oParent:aOffset[ 3 ] , 0 ) + IF lRes + SENDMESSAGE( ::oParent:Handle, WM_SIZE, 0, MAKELPARAM( ::oParent:nWidth, ::oParent:nHeight ) ) + ENDIF + ENDIF + + RETURN lRes + Modified: trunk/hwgui/source/hsplit.prg =================================================================== --- trunk/hwgui/source/hsplit.prg 2012-06-06 11:11:24 UTC (rev 1844) +++ trunk/hwgui/source/hsplit.prg 2012-07-02 16:23:54 UTC (rev 1845) @@ -77,6 +77,7 @@ Hwg_SetCursor( ::hCursor ) SetCapture( ::handle ) ::lCaptured := .T. + InvalidateRect( ::handle, 1 ) ELSEIF msg == WM_LBUTTONUP ReleaseCapture() ::DragAll() @@ -102,21 +103,27 @@ RETURN Nil METHOD Paint() CLASS HSplitter - LOCAL pps, hDC, aCoors, x1, y1, x2, y2 + LOCAL pps, hDC, aCoors, x1, y1, x2, y2, oBrushFill pps := DefinePaintStru() hDC := BeginPaint( ::handle, pps ) aCoors := GetClientRect( ::handle ) - x1 := aCoors[ 1 ] + IIf( ::lVertical, 1, 5 ) - y1 := aCoors[ 2 ] + IIf( ::lVertical, 5, 1 ) - x2 := aCoors[ 3 ] - IIf( ::lVertical, 0, 5 ) - y2 := aCoors[ 4 ] - IIf( ::lVertical, 5, 0 ) + x1 := aCoors[ 1 ] + IIf( ::lVertical, 1, 2 ) + y1 := aCoors[ 2 ] + IIf( ::lVertical, 2, 1 ) + x2 := aCoors[ 3 ] - IIf( ::lVertical, 0, 3 ) + y2 := aCoors[ 4 ] - IIf( ::lVertical, 3, 0 ) IF ::bPaint != Nil Eval( ::bPaint, Self ) ELSE - DrawEdge( hDC, x1, y1, x2, y2, EDGE_ETCHED, IIf( ::lVertical, BF_LEFT, BF_TOP ) ) + IF ::lCaptured + DrawEdge( hDC, x1, y1, x2, y2, EDGE_ETCHED, Iif( ::lVertical,BF_RECT,BF_TOP ) + BF_MIDDLE ) + oBrushFill := HBrush():Add( RGB( 160,160,160 ) ) + FillRect( hDC, x1 + 1, y1 + 1, x2 - 1, y2 - 1, oBrushFill:handle ) + ELSE + DrawEdge( hDC, x1, y1, x2, y2, EDGE_ETCHED, IIf( ::lVertical, BF_LEFT, BF_TOP ) ) + ENDIF ENDIF EndPaint( ::handle, pps ) @@ -142,33 +149,36 @@ RETURN Nil METHOD DragAll() CLASS HSplitter - LOCAL i, oCtrl, nDiff + LOCAL i, oCtrl, xDiff := 0, yDiff := 0 FOR i := 1 TO Len( ::aRight ) oCtrl := ::aRight[ i ] IF ::lVertical - nDiff := ::nLeft + ::nWidth - oCtrl:nLeft - oCtrl:nLeft += nDiff - oCtrl:nWidth -= nDiff + xDiff := ::nLeft + ::nWidth - oCtrl:nLeft + //oCtrl:nLeft += nDiff + //oCtrl:nWidth -= nDiff ELSE - nDiff := ::nTop + ::nHeight - oCtrl:nTop - oCtrl:nTop += nDiff - oCtrl:nHeight -= nDiff + yDiff := ::nTop + ::nHeight - oCtrl:nTop + //oCtrl:nTop += nDiff + //oCtrl:nHeight -= nDiff ENDIF - oCtrl:Move( oCtrl:nLeft, oCtrl:nTop, oCtrl:nWidth, oCtrl:nHeight ) + oCtrl:Move( oCtrl:nLeft + xDiff, oCtrl:nTop + yDiff, oCtrl:nWidth - xDiff, oCtrl:nHeight - yDiff ) + InvalidateRect( oCtrl:oParent:Handle, 1, oCtrl:nLeft, oCtrl:nTop, oCtrl:nleft + oCtrl:nWidth, oCtrl:nTop + oCtrl:nHeight ) NEXT FOR i := 1 TO Len( ::aLeft ) oCtrl := ::aLeft[ i ] IF ::lVertical - nDiff := ::nLeft - ( oCtrl:nLeft + oCtrl:nWidth ) - oCtrl:nWidth += nDiff + xDiff := ::nLeft - ( oCtrl:nLeft + oCtrl:nWidth ) + //oCtrl:nWidth += nDiff ELSE - nDiff := ::nTop - ( oCtrl:nTop + oCtrl:nHeight ) - oCtrl:nHeight += nDiff + yDiff := ::nTop - ( oCtrl:nTop + oCtrl:nHeight ) + // oCtrl:nHeight += nDiff ENDIF - oCtrl:Move( oCtrl:nLeft, oCtrl:nTop, oCtrl:nWidth, oCtrl:nHeight ) + oCtrl:Move( oCtrl:nLeft, oCtrl:nTop, oCtrl:nWidth + xDiff, oCtrl:nHeight + yDiff ) + InvalidateRect( oCtrl:oParent:Handle, 1, oCtrl:nLeft, oCtrl:nTop, oCtrl:nleft + oCtrl:nWidth, oCtrl:nTop+oCtrl:nHeight ) NEXT ::lMoved := .F. + InvalidateRect( ::oParent:handle, 1, ::nleft,::ntop, ::nleft + ::nwidth, ::nTop + ::nHeight ) RETURN Nil Modified: trunk/hwgui/source/htree.prg =================================================================== --- trunk/hwgui/source/htree.prg 2012-06-06 11:11:24 UTC (rev 1844) +++ trunk/hwgui/source/htree.prg 2012-07-02 16:23:54 UTC (rev 1845) @@ -151,6 +151,7 @@ FOR i := 1 TO Len( aImages ) cImage := Upper( aImages[ i ] ) IF ( h := AScan( oTree:aImages, cImage ) ) == 0 + msginfo(cimage) AAdd( oTree:aImages, cImage ) aImages[ i ] := IIf( oTree:Type, LoadBitmap( aImages[ i ] ), OpenBitmap( aImages[ i ] ) ) Imagelist_Add( oTree:himl, aImages[ i ] ) @@ -280,15 +281,15 @@ DATA oSelected DATA oItem, oItemOld DATA hIml, aImages, Image1, Image2 - DATA bItemChange, bExpand, bRClick, bDblClick, bAction, bCheck + DATA bItemChange, bExpand, bRClick, bDblClick, bAction, bCheck, bKeyDown DATA bdrag, bdrop DATA lEmpty INIT .T. DATA lEditLabels INIT .F. HIDDEN DATA lCheckbox INIT .F. HIDDEN DATA lDragDrop INIT .F. HIDDEN - DATA lDragging INIT .F. HIDDEN - DATA hitemDrag, hitemDrop HIDDEN + DATA lDragging INIT .F. HIDDEN + DATA hitemDrag, hitemDrop HIDDEN METHOD New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, oFont, bInit, bSize, color, bcolor, ; aImages, lResour, lEditLabels, bAction, nBC, bRClick, bDblClick, lCheckbox, bCheck, lDragDrop, bDrag, bDrop, bOther ) @@ -297,7 +298,7 @@ METHOD AddNode( cTitle, oPrev, oNext, bAction, aImages ) METHOD FindChild( h ) METHOD FindChildPos( oNode, h ) - METHOD GetSelected() INLINE TreeGetSelected( ::handle ) + METHOD GetSelected() INLINE IIF( VALTYPE( ::oItem := TreeGetSelected( ::handle ) ) = "O", ::oItem, Nil ) METHOD EditLabel( oNode ) BLOCK { | Self, o | SendMessage( ::handle, TVM_EDITLABEL, 0, o:handle ) } METHOD Expand( oNode ) BLOCK { | Self, o | SendMessage( ::handle, TVM_EXPAND, TVE_EXPAND, o:handle ), REDRAWWINDOW( ::handle , RDW_NOERASE + RDW_FRAME + RDW_INVALIDATE )} METHOD Select( oNode ) BLOCK { | Self, o | SendMessage( ::handle, TVM_SELECTITEM, TVGN_CARET, o:handle ), ::oItem := TreeGetSelected( ::handle ) } @@ -309,6 +310,8 @@ METHOD ItemHeight( nHeight ) SETGET METHOD SearchString( cText, iNivel, oNode, inodo ) METHOD Selecteds( oItem, aSels ) + METHOD Top() INLINE ::select( ::aItems[ 1 ] ), SendMessage( ::Handle, WM_VSCROLL, MAKEWPARAM( 0, SB_TOP ), Nil ) + METHOD Bottom() INLINE ::select( ::aItems[ LEN( ::aItems ) ] ), SendMessage( ::Handle, WM_VSCROLL, MAKEWPARAM( 0, SB_BOTTOM ), Nil ) ENDCLASS @@ -320,8 +323,8 @@ lEditLabels := IIf( lEditLabels == Nil, .F., lEditLabels ) lCheckBox := IIf( lCheckBox == Nil, .F., lCheckBox ) lDragDrop := IIf( lDragDrop == Nil, .F., lDragDrop ) - - nStyle := Hwg_BitOr( IIf( nStyle == Nil, 0, nStyle ), WS_TABSTOP + WS_BORDER + TVS_FULLROWSELECT + ; //TVS_HASLINES + ; + // + WS_BORDER + nStyle := Hwg_BitOr( IIf( nStyle == Nil, 0, nStyle ), WS_TABSTOP + TVS_FULLROWSELECT + TVS_TRACKSELECT+; //TVS_HASLINES + ; TVS_LINESATROOT + TVS_HASBUTTONS + TVS_SHOWSELALWAYS + ; IIf( lEditLabels == Nil.OR. ! lEditLabels, 0, TVS_EDITLABELS ) +; IIf( lCheckBox == Nil.OR. ! lCheckBox, 0, TVS_CHECKBOXES ) +; @@ -397,9 +400,14 @@ RETURN 0 ENDIF ENDIF - IF msg = WM_ERASEBKGND RETURN 0 + ELSEIF msg = WM_CHAR + IF wParam = 27 + Return DLGC_WANTMESSAGE + ENDIF + RETURN 0 + ELSEIF msg = WM_KEYUP IF ProcKeyList( Self, wParam ) RETURN 0 @@ -463,7 +471,7 @@ Eval( ::bDrop, Self, hitemNew, ::hitemDrop ) ENDIF - ELSEIF ::lEditLabels .AND. ( msg = WM_LBUTTONDBLCLK .OR. msg = WM_CHAR ) + ELSEIF ::lEditLabels .AND. ( ( msg = WM_LBUTTONDBLCLK .AND. ::bDblClick = Nil ) .OR. msg = WM_CHAR ) ::EditLabel( ::oSelected ) RETURN 0 ENDIF @@ -541,22 +549,23 @@ METHOD Notify( lParam ) CLASS HTree LOCAL nCode := GetNotifyCode( lParam ), oItem, cText, nAct, nHitem, leval - - IF ncode = NM_SETCURSOR .AND. ::lDragging - ::hitemDrop := tree_Hittest( ::handle,,, @nAct ) - IF ::hitemDrop != Nil - SendMessage( ::handle, TVM_SELECTITEM, TVGN_DROPHILITE, ::hitemDrop:handle ) - ENDIF - ENDIF + LOCAL nkeyDown := GetNotifyKeydown( lParam ) + + IF ncode = NM_SETCURSOR .AND. ::lDragging + ::hitemDrop := tree_Hittest( ::handle,,, @nAct ) + IF ::hitemDrop != Nil + SendMessage( ::handle, TVM_SELECTITEM, TVGN_DROPHILITE, ::hitemDrop:handle ) + ENDIF + ENDIF - IF nCode == TVN_SELCHANGING //.AND. ::oitem != Nil // .OR. NCODE = -500 + IF nCode == TVN_SELCHANGING //.AND. ::oitem != Nil // .OR. NCODE = -500 ELSEIF nCode == TVN_SELCHANGED //.OR. nCode == TVN_ITEMCHANGEDW ::oItemOld := Tree_GetNotify( lParam, TREE_GETNOTIFY_OLDPARAM ) oItem := Tree_GetNotify( lParam, TREE_GETNOTIFY_PARAM ) IF ValType( oItem ) == "O" oItem:oTree:oSelected := oItem - IF ! oItem:oTree:lEmpty + IF oItem != Nil .AND. ! oItem:oTree:lEmpty IF oItem:bAction != Nil Eval( oItem:bAction, oItem, Self ) ELSEIF oItem:oTree:bAction != Nil @@ -567,7 +576,7 @@ ENDIF ELSEIF nCode == TVN_BEGINLABELEDIT .or. nCode == TVN_BEGINLABELEDITW - s_aEvents := aClone( ::oParent:aEvents ) + s_aEvents := aClone( ::oParent:aEvents ) ::oParent:AddEvent( 0, IDOK, { || SendMessage( ::handle, TVM_ENDEDITLABELNOW , 0, 0 ) } ) ::oParent:AddEvent( 0, IDCANCEL, { || SendMessage( ::handle, TVM_ENDEDITLABELNOW , 1, 0 ) } ) @@ -600,8 +609,11 @@ ::lDragging := .T. ELSEIF nCode = TVN_KEYDOWN + IF ::oItem:oTree:bKeyDown != Nil + Eval( ::oItem:oTree:bKeyDown, ::oItem, nKeyDown, Self ) + ENDIF - ELSEIF nCode = NM_CLICK .AND. ::oitem != Nil // .AND. !::lEditLabels + ELSEIF nCode = NM_CLICK //.AND. ::oitem != Nil // .AND. !::lEditLabels nHitem := Tree_GetNotify( lParam, 1 ) //nHitem := GETNOTIFYcode( lParam ) oItem := tree_Hittest( ::handle,,, @nAct ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |