Anomaly with BTNBMP

Anomaly with BTNBMP

Postby Maurizio » Thu May 11, 2006 9:58 am

Hello antonio

The button turns black when I do a double click on it ,with yust one click
it works ok .

Regards Maurizio
//----------------------------------------------------------------------------//
// SAMPLE
//----------------------------------------------------------------------------//
#include "FWCE.ch"
Static oBtn
Static nC
function Main()
local oDlg
Local nC := 1
DEFINE DIALOG oDlg RESOURCE "test"
REDEFINE BTNBMP oBtn ID 103 OF oDlg PROMPT "Color" ACTION Color()
oBtn:SetColor( CLR_BLUE ,CLR_HRED)
ACTIVATE DIALOG oDlg CENTERED
return nil
Function Color()
IF nC == 1
nC := 2
oBtn:SetColor( CLR_BLUE ,CLR_YELLOW)
ELSE
oBtn:SetColor( CLR_BLUE ,CLR_HRED)
nC := 1
ENDIF
Return nil
//======================================
//----------------------------------------------------------------------------//
// RC FILE
//----------------------------------------------------------------------------//

#ifdef _CE
#include "c:\vce\include\arm\windows.h"
#include "c:\vce\include\arm\commctrl.h"
#endif

test DIALOG 10, 35, 139, 89
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "DialogBox Test"
FONT 8, "system"
{
PUSHBUTTON "Test", 103, 89, 12, 37, 29
}
User avatar
Maurizio
 
Posts: 825
Joined: Mon Oct 10, 2005 1:29 pm

Postby Antonio Linares » Thu May 11, 2006 6:38 pm

Maurizio,

Instead of:
Code: Select all  Expand view  RUN
PUSHBUTTON "Test", 103, 89, 12, 37, 29

You should use
Code: Select all  Expand view  RUN
   CONTROL "", 103, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER, 89, 12, 37, 29
regards, saludos

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


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 9 guests