>Vincenzo made the intelligent choice and compiled with the compiler, not the help file
A certain high-ranking PowerBASIC Inc. executive once posted in a news group that the help files are an integral component of the compiler product, with which comment I agreed and posted such myself.
it was a long time ago, but I could probably find the exact quote here somewhere. It was in response to someone who wanted to package the PB help files with HIS product.
Announcement
Collapse
No announcement yet.
Buttons disappear in Windows XP
Collapse
X
-
Originally posted by Michael Mattias View PostSee quote from helpfile above in Post #5. If he put WS_BORDER (all by itself) in as an explicit "style" parameter in the CONTROL ADD BUTTON statement, that control should not be visbile.
If you mean that the documentation is misleading, you could be right - I haven't looked very closely at it because it would drive me mad. Madder. However, Vincenzo made the intelligent choice and compiled with the compiler, not the help file!
Leave a comment:
-
-
Note that DDT always gives your controls certain styles, such as %WS_CHILD and %WS_VISIBLE
Custom style values replace the default values. That is, they are not additional to the default style values -
Leave a comment:
-
-
Note that DDT always gives your controls certain styles, such as %WS_CHILD and %WS_VISIBLE, regardless of the styles you specify. When setting your style parameter, you can safely ignore these two styles and concentrate on the more important styles that are required. This has the advantage of reducing the clutter of your code. The exception is custom controls - in this case you must explicitly specify all required styles.
Leave a comment:
-
-
>Not for DDT. This is default button creation code from PBForms
See quote from helpfile above in Post #5. If he put WS_BORDER (all by itself) in as an explicit "style" parameter in the CONTROL ADD BUTTON statement, that control should not be visbile.
MCM
Leave a comment:
-
-
Now the program is OK.
Thanks again to all.
Regards
Vincenzo Varoli
Leave a comment:
-
-
Originally posted by Michael Mattias View Postthat should NOT have fixed the problem, as the control would not have the WS_VISIBLE style. You sure you didn't add WS_VISIBLE and WS_CHILD into the style?Code:dialog new hParent, "Dialog1", 70, 70, 201, 121, to hDlg control add button, hDlg, %IDC_BUTTON1, "Button1", 60, 35, 52, 35
Leave a comment:
-
-
I found the error.
The style was in the wrong place as Chris Holbrook suggested.
If that was all you changed.... moving the parameter position of WS_BORDER in the CONTROL ADD statement... that should NOT have fixed the problem, as the control would not have the WS_VISIBLE style. You sure you didn't add WS_VISIBLE and WS_CHILD into the style?
I do not know how with Win98 the program was OK
MCM
Leave a comment:
-
-
I found the error.
The style was in the wrong place as Chris Holbrook suggested.
I do not know how with Win98 the program was OK
Thanks to all
Regards
Vincenzo Varoli
Leave a comment:
-
-
Windows/98 was no doubt more 'forgiving' about styles than Windows/XP.
(I did the same kind of thing a while ago ... Windows 98 forgave, Windows/XP did not and presto "no buttons on my screen when run on XP but they were fine on Win/98")
For what it's worth, your windows may actually be created, but because they don't have style WS_VISIBLE, they are not, well, visible.
Leave a comment:
-
-
BTW... save yourself some work when creating a lot of controls of the same style
Code:%BUTTON_STYLE = %WS_CHILD OR %WS_VISIBLE OR %WS_GROUP OR %WS_TABSTOP ... CONTROL ADD BUTTON,finYOKOGAWA,% IDC_BOTTONEYOKOGAWADISATTIVA,"&DISATTIVA" _ ,295,25,40,15, ,%BUTTON_STYLE ',CALL PARAMETRIDISATTIVA_Callback()
MCM
Leave a comment:
-
-
Code:CONTROL ADD BUTTON,finYOKOGAWA,%IDC_BOTTONEYOKOGAWAESTERNO2,"ES&TERNO2" _ ,205,130,61,15, ,%WS_BORDER,CALL YOKOGAWACICLI_Callback() '%WS_BORDER CONTROL ADD BUTTON,finYOKOGAWA,%IDC_BOTTONEYOKOGAWACOSTANTE,"&COSTANTE" _ ,270,130,61,15,%WS_BORDER,CALL YOKOGAWACICLI_Callback() '%WS_BORDER CONTROL ADD BUTTON,finYOKOGAWA,%IDC_BOTTONEYOKOGAWAHELP,"&HELP" _ ,295,5,40,15, ,%WS_BORDER,CALL PARAMETRIHELP_Callback() '%WS_BORDER CONTROL ADD BUTTON,finYOKOGAWA,%IDC_BOTTONEYOKOGAWADISATTIVA,"&DISATTIVA" _ ,295,25,40,15, ,%WS_BORDER ',CALL PARAMETRIDISATTIVA_Callback()
CONTROL ADD BUTTON [ or anything] ..
...
Custom style values replace the default values. That is, they are not additional to the default style values - your code must specify all necessary primary and extended style parameters.
Leave a comment:
-
-
Buttons disappear in windows XP
No. I am sure that the style is in the rigth place.
Regards
Vincenzo Varoli
Leave a comment:
-
-
Vincenzo, is it possible that you are putting the %WS_BORDER style in the position reserved for an EXTENDED style?
Leave a comment:
-
-
i've had similar sort of reactions when changing colors under the WS_COLORSTATIC. That is, under XP it doesnt look
the same as under Win98/ME.
That's why you need to test under different versions to be sure you are getting what you intend.
You can usually work out the differences, sometimes as simply
as a change in style settings like you suggest.
Leave a comment:
-
-
Buttons disappear in Windows XP
I am working on a program originally compiled on a Windows98 PC.
I transferred the source code on a PC with Windows XP and recompiled it.
I found that in several dialogs many buttons were not visible at all.
I solved the problem in two ways:
1) I put the line #OPTION VERSION3
2) I removed the style %WS_BORDER in the CONTROL ADD BUTTON statement
I ask if somebody knows the reason of this behavior.
I attach a zip file with the source code of a 3 test programs that contains the part of the code that creates the dialog.
The file "prova_pulsanti.bas" is the original code
The file "prova_pulsanti_VERSION3" has the #OPTION VERSION3 line
The file "prova_pulsanti_no%WS_BORDER" has all the style %WS_BORDER removed.
The image files show the resulting dialogs.
Thanks in advanced and best regards.
Vincenzo VaroliAttached FilesTags: None
-
Leave a comment: