![]() |
|
|||||||
| PowerBASIC for Windows User to user discussions about the PB/Win (formerly PB/DLL) product line. Discussion topics include PowerBASIC Forms, PowerGEN and PowerTree for Windows. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
ButtonPlus in Source Code
I've uploaded my enhanced pushbutton code to the source code forum. This code is already in use in my major application so should be relatively stable (famous last words). Any suggestions for improvement or extension gratefully received!
__________________
- LJ |
|
#2
|
|||
|
|||
|
Thanks, this is a very nice addition. I can see that it will be very helpful in future projects!
|
|
#3
|
|||
|
|||
|
Thanks for your comments Scott, both here and in the Source Code forum. Thanks for looking so closely. That's partly the reason for posting - to get another pair of eyes on it, spotting things that I've missed.
Of course you're right on both counts and I've updated the posted code and files to include these changes. Immediately I posted originally I saw another thing also. In the focus tracking code there was a lot of duplicated code in the dialog activation and de-activation sections which has now been consolidated. It was my intention to re-use vacant array slots for dialogs which had been destroyed, but I neglected to mark the array elements as unused. This may be significant for memory use if used in an application which creates and destroys a lot of dialogs. The update also includes these changes.
__________________
- LJ |
|
#4
|
|||
|
|||
|
Quote:
The screenshots look fabulous. ====================================== “Lord, grant that my work increase knowledge and help other men. “Failing that, Lord, grant that it will not lead to man’s destruction. “Failing that, Lord, grant that my article be published before the destruction takes place.” Scientist's Prayer ======================================
__________________
It's a pretty day. I hope you enjoy it. Gösta Easy Tape (It All Adds UP): http://www.swedesdock.com/easytape My Ego Site: http://www.SwedesDock.com PB Newby Tips: http://www.swedesdock.com/powerbasic/pb_shortcuts.html JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking Free PB Programs: http://www.swedesdock.com/powerbasic/Programs.shtml Last edited by Gösta H. Lovgren-2; Oct 24th, 2008 at 10:50 PM. |
|
#5
|
|||
|
|||
|
I'm not sure what you mean, all the source code, resources, compiled executables and documentation are in the attached zip.
__________________
- LJ |
|
#6
|
|||
|
|||
|
What he meant was that to help us go directly to your post in the source code, post a link to that topic here, like this:
http://www.powerbasic.com/support/pb...ad.php?t=38903 This is because the source code forum keeps growing, so rather than have interested PB's have to look through many pages of the forum or do an on-line search ... please add the link in the discussing thread when you start it. Most will appreciate that!
__________________
Rick Angell |
|
#7
|
|||
|
|||
|
Quote:
I tried compiling "ButtonPlusDemo.RC" to get a .pbr but get"Error occurred creating Resource (RES) file." Here's the code Code:
#include "Resource.h"
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1, 0, 0, 0
PRODUCTVERSION 1, 0, 0, 0
FILEOS VOS_WINDOWS32
FILETYPE VFT_APP
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "Laurence Jackson\000"
VALUE "FileDescription", "ButtonPlus Demo\000"
VALUE "FileVersion", "01.00.0000\000"
VALUE "InternalName", "BUTTONPLUS\000"
VALUE "OriginalFilename", "BUTTONPLUS.EXE\000"
VALUE "LegalCopyright", "Public domain\000"
VALUE "ProductName", "\000"
VALUE "ProductVersion", "\000"
VALUE "Comments", "\000"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 0x4B0
END
END
#define IDR_HICON 200
IDR_HICON ICON DISCARDABLE "HI.ICO"
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
#define RT_MANIFEST 24
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "xptheme.xml"
She knows what is the best purpose of education: not to be frightened by the best but to treat it as part of daily life. John Mason Brown =================================================
__________________
It's a pretty day. I hope you enjoy it. Gösta Easy Tape (It All Adds UP): http://www.swedesdock.com/easytape My Ego Site: http://www.SwedesDock.com PB Newby Tips: http://www.swedesdock.com/powerbasic/pb_shortcuts.html JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking Free PB Programs: http://www.swedesdock.com/powerbasic/Programs.shtml |
|
#8
|
|||
|
|||
|
Check the ".rclog" file created by RC.EXE.
I've had problems getting error messages from RC.EXE back from the PB IDE resource compile. This file has the error message (if any) from RC.EXE. (Seems with IDE compile, PBRES just runs anyway even when rc.exe returns an error. Kind of strange.. about the only good thing is it makes you pay attention during the resource compile.) MCM |
|
#9
|
|||
|
|||
|
No .rclog's created anywhere I can find. Several in the PB9 folders but none related ButtonPlus. Not in the resident folder either.
================================================== === "#3 pencils and quadrille pads." Seymoure Cray (1925-1996) when asked what CAD tools he used to design the Cray I supercomputer; he also recommended using the back side of the pages so that the grid lines were not so dominant. ================================================== ===
__________________
It's a pretty day. I hope you enjoy it. Gösta Easy Tape (It All Adds UP): http://www.swedesdock.com/easytape My Ego Site: http://www.SwedesDock.com PB Newby Tips: http://www.swedesdock.com/powerbasic/pb_shortcuts.html JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking Free PB Programs: http://www.swedesdock.com/powerbasic/Programs.shtml |
|
#10
|
|||
|
|||
|
Then just try a straight command-line resource compile and see what you can on the screen.
Code:
C:\DOS> rc.exe sourcefilename[.rc] |
|
#11
|
|||
|
|||
|
At first I thought that it might be to do with me using a newer resource compiler than that supplied with PB9, but I've just tried it with the old RC and it still works fine for me, so I'm stumped. Are both "hi.ico" and "xptheme.xml" in the directory with "ButtonPlusDemo.rc"?
__________________
- LJ |
|
#12
|
|||
|
|||
|
Quote:
=========================================== "We don't need lists of rights and wrongs, tables of do's and don'ts: we need books, time, and silence. 'Thou shalt not' is soon forgotten, but 'Once upon a time' lasts forever." Philip Pullman (1946-) ===========================================
__________________
It's a pretty day. I hope you enjoy it. Gösta Easy Tape (It All Adds UP): http://www.swedesdock.com/easytape My Ego Site: http://www.SwedesDock.com PB Newby Tips: http://www.swedesdock.com/powerbasic/pb_shortcuts.html JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking Free PB Programs: http://www.swedesdock.com/powerbasic/Programs.shtml |
|
#13
|
|||
|
|||
|
OK Gösta, here's a PBR hot from the compiler that works for me
__________________
- LJ |
|
#14
|
|||
|
|||
|
Quote:
It's clear I'm doing something wrong here. I expected that when I compiled "BPD.rc" it would create "BPD.pbr". Obviously I'm wrong. Quote:
================================= "Too many pieces of music finish too long after the end." Igor Stravinsky (1882-1971) =================================
__________________
It's a pretty day. I hope you enjoy it. Gösta Easy Tape (It All Adds UP): http://www.swedesdock.com/easytape My Ego Site: http://www.SwedesDock.com PB Newby Tips: http://www.swedesdock.com/powerbasic/pb_shortcuts.html JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking Free PB Programs: http://www.swedesdock.com/powerbasic/Programs.shtml |
|
#15
|
|||
|
|||
|
Laurence,
Nice work. Thanks ! Kind regards |
![]() |
| Thread Tools | |
| Display Modes | |
|
|