Win32 API samples

This collection of code snippets used to be hosted on
It is an old collection: it all began in 1996 or 1997, when Progress 8 was new and many of us were still using Windows 3.1 !!
Unlike wine or paintings, program code doesn't get better when it ages. You can find fragments that can be improved because Microsoft continuously expands their API, or are outdated because Progress has added features to the ABL so we don't need to use the WIN32 API anymore.

How to read data from a 3rd party device!!

Consider I have some devices connected to my system like RF-GUN or some other 3rd party devices, How can i get the data from that?

Also i need to know if there is some basic tutorials to start with this WINAPI Samples. I could find hands of examples from this forum, but to have a good start i hope a simple tutorials will do good. If anyone have basic tutorials on this can u please share it with me??? Plzzz guys...

Can anyone help me out???

Thanks in advance...

No-focus bug vs feature

Prior to OpenEdge 10.1, when you click a no-focus, flat button in a window the window does not get focus. It's z-order among other windows is unchanged.

In 10.1A this feature (Progress calls it a bug) is fixed. Clicking a no-focus button now sets the focus to the window containing the button.

I'm looking for a way to get the old behaviour back.

Codejock Docking Windows

I have been attempting to get codejocks docking panes working in a Progress V9 smart window.

Has anyone managed to get these components operating in a Progress window ?

I have managed to get the primary windows docking pane the launch and create a fresh window, then by use of the getparent() setparent() calls to user32.dll, these launched window becomes a child window in my parent window, but it seems the codejock component isnt doing any control.


I'm trying to track programs opened through open edge i.e. word, notepad, excel, etc. To do this I've tried using ShellExecuteExA which seem to be capable of passing back the PID if you specify the SEE_MASK_NOCLOSEPROCESS part of SHELLEXECUTEINFO. My problem is I can't figure out how to set this, everything so far has been based on wait until MS-Word finished printing section of OE Hive). Does anyone have any advice or code samples?


Good afternoon.
A customer had the "shining idea...". To show to graphs right-handers in the screen of a program progress.
I made the following one:
1º I declared gdi as one procedure external:




MAPI Problem


I downloaded the MAPI code that allows for multiple attachments. I ran the program and it created an e-mail message in my Outbox. The problem is that when I tried to run it again I get a Progress error telling me that it cannot find windows.i. It seems to make a mess of my path. Any ideas why this happens?

Stuart Richler



Is it possible that I can have the CallerID information inside an application?
If it is possible does anyone have a sample code?

Thanks in advanced,

Sample installer for Codejock components runtime

My window with the codejock components is ready for beta testing. I now needed to make an installer for the runtime version of the components. Some weeks ago I came across NSIS (Nullsoft Scriptable Install System).

In less than an hour I was able to create an installer with it.
I've attached a simple nsis source. It expects the runtime version of the components, found in cab files in %Program Files%\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v11.1.0\bin\Redist, to be extracted to a subdirectory Components.

Codejock ShortcutBar and CommandBarsFrame

This is my first attempt at a blog, forgive me for any newbie blog errors.
I'm developing a non-smart Progress window using the Codejock ShortcutBar and CommandBarsFrame controls.
I use Codejock 11.1 and Progress 10.1B01

I cannot share the actual code I developed, but I will try to share some of solutions for issues I encountered.



The items added using AddItem must be windows, passing the hWnd of a frame won't work.
Progress windows aren't really suited for this job, but with the extra undocumented

.Net and Progress Gui

I'm not sure this is even possible but figured I'd throw it out there, it's at least good for an eye roll and muttered "WTF?"...

We have a legacy application, heavily based upon adm2. The idea is being explored to redo the UI, and instead of doing the entire app at once, the goal is to impliment pieces at a time. The solution that is being explored is to embed a web browser in the application, write the new functionality in with ajax and utilize the embedded browser to view the page, essentially "overriding" the former functionality.

Buttons in pushed state

Hi there,

I've taken a look at Jurjen's code to make a toggle-box looks like a button with "Pushed state".
It works really nice, but I'd like to use it with 16x16 icons and can't manage to get it work.
So any help would be highly appreciated.

Printing file to an specific shared printer

Hi all,

From several weeks ago im trying to print an especific .pdf generated wiht pdf include to an especific printer on a server without changing the default printer. I found the sentence print for dos but, as it is a pdf, it prints control characters, not the pdf.

Thanks for any help.

Print to an especific printer

Hi all,

From several weeks ago im trying to print an especific .pdf generated wiht pdf include to an especific printer on a server without changing the default printer. I found the sentence print for dos but, as it is a pdf, it prints control characters, not the pdf.

Thanks for any help.

MAPI - ReplyTo

Using the method provided in the linked samples (, is it possible to define a "Reply To" recipient ?

Thanks for your help

Message Blaster - too many controls

Has anyone any experience using MessageBlaster within Progress?

Syndicate content