How to solve - The Window Previewer could not display the window

What to do when you get this error message? First, DO NOT close this message or the preview files are deleted…

Window Previewer

The Window Previewer could not display the window.
Please report this problem to SoftVelocity.
Include a copy of the Window structure in the bug report.


Look at the errors list there may be something helpful like missing icons:


If clicking Preview you get nothing, no preview window, no error message window, then try installing .NET 2.0 and 3.5 .

You can check if you have it with: dir %WINDIR%\Microsoft.Net\Framework\v*


In DiscussSV Ray Rippey reported Preview would not work without a Printer Driver installed:

I had a problem the other day with the program just didn’t go anywhere
when trying to preview. Turned out the printer driver disappeared when
the guy unplugged his printer. Installed the Microsoft xps document
driver and the preview worked. Just throwing this out there.

With the Window Previewer error Message displayed (not closed) open Windows Explorer to your project folder and you’ll will find WinPreview### CLW SLN CWPROJ files. This is window code generated for preview.


Copy these WinPreview### files to a subfolder, e.g. folder WinPreviewFailed.
All you need is the CLW so just rename it “_Failed.clw” and skip the copy.
Close the Message which will delete the files

I create a Win32 EXE Project (no APP) I call WinPrvFail
That must build in your project folder or will not have icons, etc.
I paste in the WinPreview###_Failed.CLW code
I build it and the error will be identified by the compiler.
Most typical is using an Equate in a window.

You can try to use the generated WinPreview SLN CwProj and build it, but that has NOT worked for me.

You can create a Preview failure any time by adding a control with a VALUE() that is an Equate.

CHECK('Preview Failure'),value( UndefinedEquate )

if you can’t figure it out post the code that errors and attach the CLW to this thread.

If you want to use Equates/Variables in your Window and still be able to use the Window Previewer sometimes you’ll need to create a WindowPreviewer.INC file in your project folder. It is a choice on the new file dialog:


The initial code is below.

!Variable and equate declarations here
!Code executed after Open(Window)
!Code executed at top of the ACCEPT loop
!Set windowPreviewerCanExit__=FALSE or button press exits preview

In the Includes section you can define equates, or INLCUDE(‘MyEquates.INC’) your own equates.

If you look at a generated WinPreview###.CLW file this will make sense. Again… the CLW is deleted unless you get an error. You can cause an error with a control like this:

CHECK('Preview Failure'),value( UndefinedEquate )

I find it handy that I can take any window declaration and make a running program. I can modify that CLW to do prototyping, try revising the window in various way, test a window posted in a message. I can post that EXE for someone else to try, e.g. font changes. So I insert check('x'),value(xxx) get the error and grab the WinPre CLW.

1 Like