Hi, When Click CheckBox Prompt disappear. When press ALT in active form CheckBox and Prompt disappear.
TIA
Hi, When Click CheckBox Prompt disappear. When press ALT in active form CheckBox and Prompt disappear.
TIA
Please add this function to your main PRG:
function IsAppThemed()
return .F.
Brilliant !
Best Regards.
I've had several strange behaviors associated with checkboxes. I used IsThemed() but that didn't help.
1) In some cases, clicking on a checkbox caused a screen flash but did not then show the checkmark
2) Checked values which didn't show were also not changed in the database
3) The screen flash is pretty vivid
4) In some cases, it required a double click to get a checkmark
5) Sometimes when a checkmark did appear, saving the data to the database reverted the value.
I tried a lot of "eliminations" and I was finally able to get the normal behavior back by revertion to FWH 10.6.
I am using xBuilder, xCC compiler, Windows 7 Ultimate ( 32 bit ).
We need of a clear sample of the problem. I wasn't able to reproduce any problems with checkboxes, sorry.
EMG
Enrico,
Well here is a strange one. I tried fw\samples\testchk2.prg and it works fine. I copied the file to a new filename testch2a.prg and it doesn't work--the prompts vanish when the checkbox is clicked and even more strange, when one checkbox is clicked it's prompt vanishes and the other checkbox's prompt reappears.
Both files are in the fwh\samples directory and are compiled using the default buildx.bat file.
I have no idea why the filename has an affect, but there must be some reason.
I would be interested to hear if you can repeat this behavior (or if anyone else can).
Regards,
James
Enrico,
My problem can be random. I can have 3 checkboxes on a page, and one of them simply doesn't work. They are coded exactly the same. All are REDEFINE CHECKBOX objects, and the resources ( .RC file ) are coded exactly the same.
What I do know is they do work as they should with FWH 10.06. The problem behavior starts with 10.07. So, whatever is causing it, and several people here have commented that problems do exist, was created in the upgrade posted at the end of July.
Tim
James Bott wrote:Enrico,
Well here is a strange one. I tried fw\samples\testchk2.prg and it works fine. I copied the file to a new filename testch2a.prg and it doesn't work
Enrico,
>You probably forgot to copy testchk2.rc as well.
Ah, logic is still working!
There were no REDEFINE's in the code so I didn't even think to look for a resource file.
So, now we know that if the app isn't themed, the checkboxes do strange things. Did you see this behavior too?
Regards,
James
if IsAppThemed() .and. Upper( ::ClassName() ) $ "TCHECKBOX;TRADIO;TGROUP"
DrawPBack( ::hWnd, hDC )
endif bIsThemed = ( ( ( BOOL ) FindResource( GetResources(), MAKEINTRESOURCE( 1 ),
MAKEINTRESOURCE( 24 ) ) ) ||
( ( BOOL ) FindResource( GetInstance(), MAKEINTRESOURCE( 1 ),
MAKEINTRESOURCE( 24 ) ) ) || pIsAppThemed() );Can you explain? I don't understand that code...
EMG
Enrico,
When we place the manifest file inside the resources we do:
1 24 "WindowsXP.Manifest"
thats why we use FindResource() to search for it.
In case it is not inside the EXE or the resources DLL, then we call IsAppThemed() from the Windows themes API (pIsAppThemed())
Ok, it is clear now. I didn't see the difference between GetResources() and GetInstance().
What if you remove pIsAppThemed() from the test?
EMG
What if you remove pIsAppThemed() from the test?