Jump to PiXCL Home page

 

 

 

 

PiXCL Technical Support Pages


This page provides answers to common technical support questions on installing and programming PiXCL. If you do not see the answer to the problem you are having, please email me, to the attention of Technical Support. I will respond to your enquiry as soon as possible, generally within two business days or less.

This page last updated 22 February 2009.

There are support pages for all versions where updates, new versions, additional technical information and development news are available.

Registered PiXCL 8 users have ID / Password controlled access to PiXCL 8 Support Pages

Registered PiXCL 8 Developers have ID / Password controlled access to PiXCL 8 Developer Pages.

Please note that I only support Windows XP and Vista. I do not offer support for operating systems no longer maintained by Microsoft, though PiXCL will generally run if the final Service Packs are installed.


Frequently Asked Questions

Q01: What happened to FreePiXCL 4.8 ?
Q02: Will PiXCL 8 run under Windows NT 3.51 ?
Q03: Will PiXCL 8 run under OS/2 Warp ?
Q04: Is there a UNIX or Linux version of PiXCL 8 ?
Q05: Can I return PiXCL 8 for a refund ?


Q06: How do I load an image without displaying it ?
Q07: I set a transparent color in a PNG image, but it still displays.
Q08: Can I do double buffering for animation ?
Q09: How do I get the time display in the status bar to automatically update ?
Q10: Does PiXCL support 16 bits/pixel images ?
Q11: How can I produce a Splash window for my program ?
Q12: How do I start a Console window and cut and paste text to PiXCL ?
Q13: Embedded If-Else-Endif gives error, but syntax is correct. Why ?
Q14: Where do PXLimage.dll, PXLtwain.dll and PXLbtmps.dll have to be installed ?
Q15: What files have to be distributed with a PiXCL application ?


Q16: How do I get bitmap images to appear the way they are supposed to?
Q17: How do I get a progress bar to appear in a statusbar pane ?
Q18: How do I create extension commands that can be used with RegisterUserCommand or RegisterExtLibCmdSet?
Q19: How do I get a default browser and emailer to run from a push button?
Q20: Can PiXCL create reusable code?
Q21: How do I get a make a full screen display with title and menus off?

Q22: What's the difference between FreePiXCL 4.8 and PiXCL v8.0?

Q23: In PiXCL 5.04, I get syntax error messages starting with a number e.g. #304(code...)?

Q24: When I run my scanner TWAIN driver, it scans OK once, then I can't scan again unless I reboot. What's the problem?

Q25: When I try to run PiXCL, I get the message "Can't link to missing function CoCreateInstanceEx in OLE32.DLL". What's the problem?

Q26: How can I uniquely identify multiple app windows with the same title string that send messages to another app?

Q27: I can't get a file to run even though the path is correct.



Q01: What happened to FreePiXCL 4.8 ?

- FreePiXCL 4.8 has been discontinued, as I now provide a free version of the extremely capable PiXCL 8 End User PiXCL 8 Developer (C$150) includes image processing library API's and the Extension command API.

Jump to Question List

Q02: Will PiXCL 8 run under Windows NT 3.51 ?

- No. I suggest upgrading to at least Windows XP with Service Pack 2 or 3.

Jump to Question List

Q03: Will PiXCL 8 run under OS/2 Warp ?

- No. OS/2 is a dead operating system. If you need a similar type of scripting tool (without the image processing and graphics), look at the OS/2 REXX product if you can still find a copy.

Jump to Question List

Q04: Is there a UNIX or Linux version of PiXCL 8 ?

- No, neither is this planned in the future either. You might look at the Tck/Tk product that is similar to PiXCL in some respects.

Jump to Question List

Q05: Can I return PiXCL 8 for a refund ?

- That depends on how you acquired the registered version. If you opted for the electronic download version, then the answer is no, as there is no tangible product that can be returned. If I shipped you a product kit (CD-ROM, and you contact me within 30 days of verified receipt for a return authorization, yes, provided the manual and/or the CD are unmarked and in resaleable condition. I won't accept COD returns under any circumstances. Shipping costs are not refundable.

Jump to Question List


Q06: I get an "Out of Memory or Resources" message when I use Run(...)

- This message occurs because you did not include the full path of the application in the Run(...) command, or the path is incorrect in some way. The usual error is a missing back-slash in the path. To debug, use a DebugMsgBox command to list the path string before you issue the Run(...) command. Alternatively, you may have a long path with spaces in it (e.g. C:\Program Files\....), You can wrap long paths (and filenames) with quotes using the PathQuoteSpaces command.

Jump to Question List

Q07: How do I load an image without displaying it ?

- Use either the LoadBitmap(Image$,FULL) command, or DrawSizedBitmap(0,0,0,0,Image$) command.

Jump to Question List

Q08: I set a transparent color in a PNG image, but it still displays.

- Use the DrawTrBitmap or DrawTrSizedBitmap command, and specify the transparency color. These commands can be used to draw ANY of the supported bitmaps with a transparency color.

Jump to Question List

Q09: Can I do double buffering for animation ?

- Yes. See the SetDrawMode command. You can draw bitmaps in the foreground or background buffers.

Jump to Question List

Q10: How do I get the time display in the status bar to automatically update ?

- You have to put a loop in the Wait_for_Input: idle loop. Normally you would use WaitInput(), but in this case you would use, say, WaitInput(10000) to update the statusbar every 10 seconds, and every time your program returns to the idle loop. Here is a code fragment ...

 
Wait_for_Input:
TimeToASCII(LOCAL, WDDDMYYYY, TimeString$)
DrawStatusWinText(3, TimeString$)
WaitInput(10000)
Goto Wait_for_Input

 

Jump to Question List

Q11: Does PiXCL support 16 bits/pixel images ?

- Yes. TIFF files can be 16 bit.

Jump to Question List

Q12: How can I produce a Splash window for my program ?

- A splash window is generally a a bitmap with mouse active areas and sometimes sound effects as well. The idea is to produce a display while the rest of the application is loading. You can do a splash screen by creating a suitable bitmap, then using code like this ...

 
Initialize:
UseCoordinates(PIXEL)
Title$ = "Application Title"
UseCaption(Title$)
GetScreenCaps(HORZSIZE,Horizontal)
GetScreenCaps(VERTSIZE,Vertical)
DirGet(SourceDir$)
SpashImage$ = SourceDir$ + "\splash.bmp"
GetBitmapDim(SplashImage$, Lines, Pixels, Bits)
X1 = Horizontal - Pixels
X1 = X1 / 2
X2 = X1 + Pixels
Y1 = Vertical - Lines
Y1 = Y1 / 2
Y2 = Y1 + Lines
WinLocate(Title$,X1,Y1,X2,Y2,Res)
DrawBitmap(0,0,SpashImage$)
...
Rest of program loading code here. Use a progress bar ?
Play some WAV files ? Animation ?
...
UseBackground(TRANSPARENT, 192,192,192)
DrawBackground {clear the splash image}
WinLocate(Title$,10,10,500,400,Res) {new location as desired}

SetMenu(... put in menu command here...)
...
Wait_for_Input:
WaitInput()

 

Jump to Question List

Q13: How do I start a Console window and cut and paste text to PiXCL ?

- First, you must create the console window in the style you need. Run the Console Prompt program on your task bar, then adjust the settings for title and mouse activity. When you save these settings, Windows stores it as a .PIF file, usually in c:\windows. You may have to use Explorer to see just where this file ends up. Let's call this file "c:\windows\dosapp.pif " .

Next, in you PiXCL code, you have to use the Run command. e.g. ...

 
Consolewin$ = "New Console Application"
Run("c:\windows\dosapp.pif ")
WaitInput (300) {let windows start the console session}
WinExist(Consolewin$,Res)
...

The Console window can be treated like any other window, and can be resized, moved, renamed and closed. You can also copy and paste text to and from the window and the PiXCL application using the clipboard.

Jump to Question List

Q14: Embedded If-Else-Endif gives error, but syntax is correct. Why ?

- There was a subtle bug in v4.10, such that if you code embedded If-Else-Endifs, AND you use a variable that includes the letters "if" e.g. "Diff" within the structure, the parser gets confused and loses track of the correct Endif keyword.

 
If gFlag = 1
Diff =Green - OldGreen
Red += Diff
Blue += Diff
If Red < 1 Then Red="0" If Red> 255 Then Red = 255
If Blue < 0 Then Blue="0" If Blue> 255 Then Blue = 255
Endif

This has been corrected since maintenance release 4.12. The work-around is to change the variable name eg "Diff" becomes "Delta".

Jump to Question List

Q15: Where do PXLimage.dll, PXLimage6.dll, PXLtwain.dll and PXLbtmps.dll have to be installed ?

- These DLLs have to be either in the same directory as the PiXCL EXE file (interpreter or a runtime), or in the Windows directory, usually "c:\windows" or "c:\winnt". If you have multiple PiXCL applications spread over your disks, then the "c:\windows" option is the most appropriate. Note that PiXCL requires the files "msvcrt.dll, msvcrt20.dll and msvcrt40.dll" to be in the "windows\system" directory. If you don't have them, you can get these free from Microsoft.

Jump to Question List

Q16: What files have to be distributed with a PiXCL application ?

- A PiXCL application must include the runtime EXE, PXLimage.dll, PXLimage6.dll, PiXCLmsg.dll, PXLtwain.dll, PXLbtmps.dll plus any additional images, INI files, Help files or other files created by you.

The registered version PiXCL editor, PiXCL80.exe and PXL_make80.exe files are not to be distributed. Any such distribution is a direct infringement of my copyright. I take copyright infringements very seriously.

Jump to Question List

Q17: How do I get bitmap images to appear the way they are supposed to?

- This is a v-e-r-y common question that almost always comes from people with their video cards set to a 256 color mode. Windows keeps two color palettes for the current video mode. One is the static color palette that contains the defined Windows colors for background, borders, highlights or selects and so on, and a dynamic color palette that gets used for all the other colors needed when, for example, you display a bitmap.

In 256 color mode, the static palette is 20 colors, leaving a maximum of 236 colors available to display bitmaps. So, if you want to display a 256 color bitmap, the colors will have to be compressed into 236. If you want to then display a second image, its 256 colors will take the 236 available entries in the dynamic color palette, which means the first image color rendition will change, unless both the images have exactly the same palette colors. If you try to display a 24 bit image, Windows will do its best to map the colors into the nearest color it can find. Hence, you can get a situation where 256 colors have to be crammed into maybe 60 palette entries, resulting in a very unsatisafactory image display.

In your PiXCL programs, use the SetColorPalette command to either use the palette of the bitmap directly, or generate a palette directly using the available entries in the Windows color palette.

If you have a PiXCL and other application displaying a bitmap, selecting the other application will usually change the appearance of the PiXCL application. Selecting the PiXCL application will not change the palette back until a resize operation occurs. You can put a ReDraw command in the PiXCL idle loop to achieve this.

In summary, if you use 256 color modes with your video card driver, you will often not get very satisfactory bitmap display renditions. You can use a product like JASC Paint Shop Pro (tm) to reduce a 8 bit per pixel image to (say) 200 colors, which will provide a reasonable compromise and let the Windows colors display as well.

All new PCs come with a full colour card these days. When these cards are set to 1024x768 16-bit color mode, the static color map usually has 4096 entries, which means that multiple bitmaps can be successfully displayed. If you can afford a full color display, get one. All your software, not just PiXCL, will provide much more satisfying visual results.

Jump to Question List

Q18: How do I get a progress bar to appear in a statusbar pane ?

- There are several tricks: firstly, don't have your program resize its window during the progress of the processing, or the progress bar will move. Secondly, don't update the Statusbar or else it will overwrite the progress display. The next time the progress bar is updated, it will overwrite the StatusBar.

All you have to do is figure out where the StatusBar pane coordinates lie, and draw the progress bar accordingly.

Jump to Question List

Q19: How do I create extension commands that can be used with RegisterUserCommand or RegisterExtLibCmdSet?

- Extension commands are created in DLLs with specific calling arguments. There are two ways that you can obtain one of these DLLs. The first is by using the PiXCL 8 Extension Command API, which provides all the technical information and a sample DLL project for Visual C/C++ 6 or later. That is, either you or someone in your organisation will have to be familiar with Windows programming in C/C++. The second is by acquiring an extension command DLL from another party who purchased the PiXCL Extension Command API. I offer C/C++ sample code only. It is possible to create extension DLLs with Visual Basic if required, though I don't recommend it because VB has difficulty dealing with pointers. I offer an extension DLL development service at reasonable rates.

Jump to Question List

Q20: How do I get a default browser and emailer to run from a push button?

- For the default browser, one way is to select an existing HTML file and get the path for the executable that handles these. This gives you the default browser.

Getting the default mailer requires accessing the Registry. See the code below.

 
FindExecutable("..\learning\pixclweb.htm","",WebBrowser$,Rss)
If Res = 3
RDBOpenKey(@RDB_CLASSES_ROOT,
"mailto\shell\open\command",OutHandle1)
RDBQueryValue(OutHandle1,"",DefaultMailer$,Res)
RDBCloseKey(OutHandle1,Res)
If DefaultMailer$ <> ""
StrRepl(DefaultMailer$,"%1","",Res)
Else
DefaultMailer$ = WebBrowser$ + " http://www.pixcl.com/vcontact.htm"
Endif
Run(DefaultMailer$) {starts the mail program}
Endif
Jump to Question List
 

Q21: Can PiXCL create reusable code?

- It depends on your definition of reusable, but the answer is Yes, it does, as follows

1. Reusable Function: Creating EXE that have a defined arg list, and provide generic processing regardless of the input data specifics. ie no different from a DLL or EXE function. You can have a function EXE written in PiXCL notify another PiXCL app when its done with the PXLResumeAt command. There's other interprocess comms options as well.

2. Reusable Code: Code fragments that do useful stuff or a regular basis in many applications. A good example is sample "user12.pxl" which is the basis of the code writer Helper. We wrote this originally because we were doing the same thing many times.

Another example is code for reusable dialogs. See the Dialogboxes.pxl sample. You can create dialog box subroutines that are passed an x1,y1 coordinate, and the dialog is created relative to this coordinate. In a similar fashion, you can create blocks of code for getting files, displaying histograms etc. In summary, reusable code will normally take the form of subroutines and code fragments.

3. Custom extension commands in DLLs. See the User Extension Command API for more details on this. In summary, you can create any number of your own commands in a DLL and these can be called as needed within a PiXCL application or application suite. The User Extension Command API is included in PiXCL 6 Developer.

Jump to Question List

Q22: How do I make a full screen display with title and menus off?

This takes four or maybe five commands:

SetMenu()  {remove the menus}
Toolbar() {disable any toolbar}
WinShow(Win$,NOTITLE,Res) {remove the titlebar. The window still has a title.}
WinShow(Win$,TOPMOST,Res) {put the window over the task bar as well.}
WinShow(Win$,MAXIMIZE,Res) {take all available space.}

The resulting window takes the full screen. There is still the small border client edge showing.

Jump to Question List

Q23: What's the difference between FreePiXCL 4.8 and PiXCL 8?

There's currently around 270 more commands in PiXCL 8 that provide support for

In addition, registered v8.x users get free technical support and minor version upgrades.

Q24: In PiXCL 5.04, I get syntax error messages starting with a number e.g. #304(code...)?

For PiXCL 5.04 I changed the interpreter so it ran about 7% faster than before, by changing the loaded script Keywords into indices in the internal Keyword array. This lets the program jump directly to the keyword handler instead of searching for it first. In the 5.06 update I fixed it so the #number is decoded in the syntax error message. Please also ensure that your old code does not have any variables the same as Keywords e.g. Val, Int, Filename. r.

Q25: When I run my scanner TWAIN driver, it scans OK once, then I can't scan again unless I reboot. What's the problem?

For Windows 98 / NT4, what has happened is that your scanner installation has overwritten some TWAIN files with older versions in c:\windows, specifically twain_32.dll, twunk_16.exe and twunk_32.exe. If you look at the task manager (use Ctrl-Alt-Del) , you'll likely see that twunk_16.exe is running. The latest versions of the overwritten files is 1.6.0.6, and they can be obtained from www.twain.org or from our ftp site. Replace the files with the latest versions and all the problems will disappear.

For Windows ME / 2000, you need the ORIGINAL ME / 2000 version 1.7.0.1. These are NOT THE SAME as the files from twain.org, and installing them on an ME/2000 system will GUARANTEE system instability. So don't do it!

Jump to Question List

Q26: How can I uniquely identify multiple app windows with the same title string that send messages to another app?

In PiXCL 4, you would use the the SendCopyDataMsg with a unique string. In PiXCL 6 you can do the same, but the string can be a Globally Unique IDentifier string. See the CreateGUID and SetPiXCLGUID commands.

Q27: I can't run a program even though the path is correct. What's wrong?

Most likely you have a path that includes spaces e.g. like "C:\Program Files\ ". What you need to do is enclose this path with quote characters as follows.

  Chr(32,Quote$)

  Path$ = Quote$ + "old path " + Quote$

Alternatively, use the PathQuoteSpaces command that does the same.

Jump to Question List

 


 Copyright © 1995-2009 SJD Software. All Rights Reserved.