Re: Mouse behavior

Re: Mouse behavior

Postby Vytas » Tue Feb 07, 2006 3:11 pm

I have a program that has standalone input dialogs and input dialogs located in folders. What I have found is that the mouse does not behave the same for identical clicks.

I have attached the sample source program and rc file below. Should you have problems compiling it with buildh.bat please let me know and I will post that files to a ftp site.

The differences I find are as follows. If you open the first menu selection "Simple Dialog Page" a dialog opens containing 3 fields. If I left click on the second files the mouse gets positioned into the second field and I am able to edit the values. Now when you open the second menu option "Folder Dialog Pages" and left click on the second field the cursor remains in the first dialog box. To move to the second field via mouse requires the user to right click.

So what do I have to do to make the mouse behavior for folders to be the same as for simple dialogs?

Thanks again for your help.

Vytas





Program source:

#include "FiveWin.ch"
#include "report.ch"
#include "folder.ch"
#include "TCBrowse.ch"

STATIC oWnd

FUNCTION Main(InLinePass)
LOCAL hBorland := loadlibrary("BWCC32.DLL")
BWCCRegister(GetResources())
REQUEST DBFCDX
DBSETDRIVER("DBFCDX")
BWCCRegister(GetResources())
SET 3DLOOK ON

// Open main window
OpenMain()

SET RESOURCES TO
FreeLibrary(hBorland)
RETURN nil

DLL32 FUNCTION BWCCRegister( hInst AS LONG ) AS WORD PASCAL LIB "BWCC32.DLL"

* ==================================================================

FUNCTION OpenMain()

DEFINE WINDOW oWnd FROM 1, 1 TO 24, 80 ;
TITLE "TEST mouse behavior" ;
COLOR RGB(0,255,0) ,RGB(255,0,255) ;
MENU BuildMenu()

ACTIVATE WINDOW oWnd

RETURN nil
* ==================================================================
FUNCTION BuildMenu()

LOCAL oMenu

MENU oMenu

MENUITEM "&Simple Dialog Page" MESSAGE "Standard dialog ";
ACTION SimplePage()

MENUITEM "&Folder Dialog Pages" MESSAGE "Folder pages";
ACTION FoldPages()

ENDMENU

RETURN oMenu
* ==================================================================

FUNCTION SimplePage()
Pg1Fld1 := "Test1"
Pg1Fld2 := 8.57
Pg2Fld1 := "Test2"
Pg2Fld2 := 1.03
Pg2Fld3 := 2.66

DEFINE DIALOG oDlg RESOURCE "PG0"

REDEFINE GET Pg2fld1 ID 2001 OF oDlg UPDATE
REDEFINE GET Pg2Fld2 ID 2002 OF oDlg UPDATE PICTURE "9.99999"
REDEFINE GET Pg2Fld3 ID 2003 OF oDlg UPDATE PICTURE "9.99999"

ACTIVATE DIALOG oDlg CENTERED ;
VALID MsgYesNo( "Want to end ?" )

RETURN NIL

FUNCTION FoldPages()
Pg1Fld1 := "Test1"
Pg1Fld2 := 8.57
Pg2Fld1 := "Test2"
Pg2Fld2 := 1.03
Pg2Fld3 := 2.66

DEFINE DIALOG oDlg RESOURCE "SAMPLE1"

REDEFINE FOLDER oFld ID 101 OF oDlg ;
PROMPT "Page1", "Page2" ;
DIALOGS "PG1", "PG2"

oFld:aEnable = { .t., .t.}

REDEFINE GET Pg1fld1 ID 1001 OF oFld:aDialogs[1] UPDATE
REDEFINE GET Pg1Fld2 ID 1002 OF oFld:aDialogs[1] UPDATE PICTURE "9.99999"

REDEFINE GET Pg2fld1 ID 2001 OF oFld:aDialogs[2] UPDATE
REDEFINE GET Pg2Fld2 ID 2002 OF oFld:aDialogs[2] UPDATE PICTURE "9.99999"
REDEFINE GET Pg2Fld3 ID 2003 OF oFld:aDialogs[2] UPDATE PICTURE "9.99999"

ACTIVATE DIALOG oDlg CENTERED ;
VALID MsgYesNo( "Want to end ?" )

RETURN NIL

Testdial.rc file :

#define IDC_CHECKBOX1 92
#include ".\..\include\WinApi.ch"

#ifdef __FLAT__
1 24 "winxp\WindowsXP.Manifest"
#endif

#ifdef __64__
1 24 "WinXP/WindowsXP.Manifest64"
#endif








PG0 DIALOG 18, 18, 142, 92
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Page0"
BEGIN
EDITTEXT 2001, 15, 16, 16, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
EDITTEXT 2002, 59, 18, 16, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
EDITTEXT 2003, 102, 17, 16, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
END


SAMPLE1 DIALOG 18, 18, 300, 182
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Sample 1 Frame"
BEGIN
CONTROL "", 101, FOLDER32, 0 | WS_CHILD | WS_VISIBLE|WS_TABSTOP, 12, 11, 275, 160
END


PG1 DIALOG 18, 18, 240, 157
STYLE DS_MODALFRAME | WS_CHILD | WS_BORDER | WS_SYSMENU
CAPTION "Pg1"
BEGIN
EDITTEXT 1001, 46, 29, 16, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
EDITTEXT 1002, 77, 29, 16, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
LTEXT "test1", -1, 22, 26, 16, 8
END


PG2 DIALOG 18, 18, 281, 158
STYLE DS_MODALFRAME | WS_CHILD | WS_CAPTION | WS_SYSMENU
CAPTION "Pg2"
BEGIN
EDITTEXT 2001, 14, 15, 16, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
EDITTEXT 2002, 58, 17, 16, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
EDITTEXT 2003, 101, 16, 16, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
END
Vytas
 
Posts: 25
Joined: Sun Oct 23, 2005 9:58 pm

Re: Mouse behavior

Postby Enrico Maria Giordano » Tue Feb 07, 2006 3:31 pm

This is the fixed RC file:

Code: Select all  Expand view
#define IDC_CHECKBOX1 92
#include "\fwharbour\include\WinApi.ch"

#ifdef __FLAT__
1 24 "\fwharbour\samples\winxp\WindowsXP.Manifest"
#endif

#ifdef __64__
1 24 "WinXP/WindowsXP.Manifest64"
#endif








PG0 DIALOG 18, 18, 142, 92
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Page0"
BEGIN
EDITTEXT 2001, 15, 16, 16, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
EDITTEXT 2002, 59, 18, 16, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
EDITTEXT 2003, 102, 17, 16, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
END


SAMPLE1 DIALOG 18, 18, 300, 182
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Sample 1 Frame"
BEGIN
CONTROL "", 101, FOLDER32, 0 | WS_CHILD | WS_VISIBLE|WS_TABSTOP, 12, 11, 275, 160
END


PG1 DIALOG 18, 18, 240, 157
STYLE WS_CHILD
{
EDITTEXT 1001, 46, 29, 16, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
EDITTEXT 1002, 77, 29, 16, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
LTEXT "test1", -1, 22, 26, 16, 8
}


PG2 DIALOG 18, 18, 281, 158
STYLE WS_CHILD
{
EDITTEXT 2001, 14, 15, 16, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
EDITTEXT 2002, 58, 17, 16, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
EDITTEXT 2003, 101, 16, 16, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
}


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8410
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby StefanHaupt » Wed Feb 08, 2006 9:57 am

Enrico,

are the manifest files different for xp32 and xp64 ?


Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Enrico Maria Giordano » Wed Feb 08, 2006 9:59 am

StefanHaupt wrote:Enrico,

are the manifest files different for xp32 and xp64 ?


Stefan


I don't know, but it maybe.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8410
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Wed Feb 08, 2006 9:37 pm

Yes, they are little different.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41462
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 151 guests