Page 1 of 1

Checkboxes disappear pressing ALT in Vista

Posted: Mon Apr 07, 2008 1:36 pm
by gkuhnert
Hello,

when I compile following sample, the checkboxes and their text disappear pressing ALT, when I entered the dialog by using a mouse click. It looks like the dialog is being repainted as the underlines appear, but the text disappears at the same time.
It only happens on a Vista PC with Vista Design.
Is there a fix possible?

I also uploaded a compiled exe: http://www.ctosoftware.de/ftp/sample/testcto.exe

Code: Select all

#include "Fivewin.ch"

STATIC  owin
FUNCTION MAIN()
   DEFINE WINDOW oWin FROM 1, 5 TO 20, 100;
      TITLE "CHECHBOX Problem  This programm is done with manifest, Problem only with VISTA"
   activate window owin maximized on init test2()
RETURN NIL

static function test1()
    LOCAL oDlg
    LOCAL oChk, lChk := .F., lChk2 := .t.
   DEFINE DIALOG oDlg of owin FROM 1, 5 TO 20, 70;
         TITLE "NOW push alt key! Problem only with VISTA (Compiled with Fw710 / xharbour 2007)"
    @ 0.7, 1 CHECKBOX oChk VAR lChk
    @ 2, 1 CHECKBOX lChk2 OF oDlg
    @ 3, 1 BUTTON "&Close" ACTION oDlg:End()
    ACTIVATE DIALOG oDlg;
             CENTER
return nil

static function test2()
    LOCAL oDlg
    LOCAL oChk, lChk := .F., lChk2 := .t.
   DEFINE DIALOG oDlg of owin FROM 1, 5 TO 20, 70;
         TITLE "Push this botton by mouse, Problem only with VISTA"
    @ 0.7, 1 CHECKBOX oChk VAR lChk
    @ 2, 1 CHECKBOX lChk2 OF oDlg
    @ 3, 1 SAY "Start this dialog by mouse und than push ALT to see checkbox disappearing"
    @ 3.5, 1 BUTTON "Click with mouse" ACTION test1()
    ACTIVATE DIALOG oDlg;
             CENTER
return nil

Posted: Mon Apr 07, 2008 1:50 pm
by Antonio Linares
Gilbert,

What FWH version are you using ?

You example built with FWH 8.03 is working fine here.

FWH-Version

Posted: Mon Apr 07, 2008 1:52 pm
by gkuhnert
We're using FWH710
Can you send me an executable .exe so I can test it?
My e-Mailadress is: kuhnert(at)ctosoftware.de

Posted: Mon Apr 07, 2008 2:18 pm
by Antonio Linares
Gilbert,

You have to add this code to the Class TControl Method HandleEvent():

Code: Select all

#define WM_UPDATEUISTATE  0x0128
...
      case nMsg == WM_UPDATEUISTATE
           nResult = Super:HandleEvent( nMsg, nWParam, nLParam )       
           ::oWnd:Refresh()
           return nResult

Posted: Mon Apr 07, 2008 2:26 pm
by Antonio Linares
Gilbert,

Already sent the EXE to your email