Happy New Year!
Posted January 1st, 2010 by Andrew PopoffI am so busy that I do not have some much time to write this post
Happy New Year! I hope that this year will be better than previous.

Clarion Developer Blog
The future depends on us. It is up to us to the future of Clarion.
Will this programming language to live long and happy life or dies in oblivion depends on us. If you have to say, do it here in this blog. Welcome!
Read More
I am so busy that I do not have some much time to write this post
Happy New Year! I hope that this year will be better than previous.

Some years ago I decided that I will never engage programming for a web. I tried to understand Perl but I did not like it.
The last week I developed a web page using PHP. It was neccessary
And now everything is easy. Maybe PHP is easy language or maybe I am ready for a web. Of course it was the small page. But now I am not scared the web.
Tags: PHP | No Comments »
Today I have finished with CFC Tray Class. I have tested the class on the different Windows versions. Of course, I have tested the the class with CFC Menu Class. Also I’ve made some examples. I am do not ready to upload the class today. But I have made some screenshots and video about the tray animation. I have extracted the icons from TheBat! and made animation on the same manner
Download the video: Tray Animation
Tags: CFC Library, tray | No Comments »
Clarion 6.3.9058
I have a clarion window with two buttons. Each button have an ID. As I understand this ID’s starts from 16385 (4001H). You can see this ID’s using some Spy. Thus we have a buttons with ID 16385 and 16386.
I send the message WM_COMMAND for ID 16385 and the action is executed on the button 1.
I send the message WM_COMMAND for ID 16386 and the action is executed on the button 2.
I send the message WM_COMMAND for ID 16387 and no action is executed.
!!!!!
I send the message WM_COMMAND for ID 40000 and the action is executed on the button that has a focus!
!!!!!
I send the message WM_COMMAND for ID 60000 and no action is executed.
Why this happens?
I think that some condition exists. And this condition executes the action on the button with focus when the window receives WM_COMMAND for not existing control. What is the condition?
The test code:
PROGRAM
MAP
MODULE('WinAPI')
test_SendMessage(ULONG hWnd,ULONG inMsg,ULONG wParam,LONG
lParam),LONG,PASCAL,RAW,NAME('SendMessageA'),PROC
END
END
WM_COMMAND EQUATE(0111h)
Window WINDOW('Caption'),AT(,,274,83),FONT('MS Sans
Serif',8,,FONT:regular),TIMER(1000),SYSTEM,GRAY
BUTTON('Button 1'),AT(46,18,98,46),USE(?Button1)
BUTTON('SendMessage'),AT(186,26,66,26),USE(?Button2)
END
CODE
OPEN(WINDOW)
ACCEPT
IF ACCEPTED() = ?Button1
MESSAGE('Button1 Action')
END
IF ACCEPTED() = ?Button2
MESSAGE('Button2 Action')
!test_SendMessage(0{Prop:Handle},WM_COMMAND,16385,0) ! 1. it
works despite of lParam
!test_SendMessage(0{Prop:Handle},WM_COMMAND,16385,?Button1{Prop:Handle})
! 2. it works
!test_SendMessage(0{Prop:Handle},WM_COMMAND,16387,0) ! 3. it
not works - OK
END
IF EVENT() = EVENT:Timer
!0{Prop:Timer} = 0 ! stop the timer
test_SendMessage(0{Prop:Handle},WM_COMMAND,40000,0) ! 4. it
runs control with a focus
END
END
Tags: bug | No Comments »
I have spent some days to write the tray class. My old 3rdParty product xXPPopup contains the tray class. I have decided that CFC Library should contain the same class. Of course much time has passed, so I rewrote the class completely.
Today, I have installed the Windows 7 specially to test the tray class. I do not use Windows Vista. But now I think that Windows 7 deserves attention. The new class contains a method that allows to show a ballon tooltip with a specified icon! That is the really cool feature
I think that I will test the class next week. I will write the documentation also. I will upload the class after that. Of course, the class will be included in CFC Library.
Tags: CFC Library, tray | No Comments »
Wow!
faq.clarionmag.com
Tags: Clarion Magazine | No Comments »
Today I have wrote the documentation for the class CFC_WndProc.
It is the class for subclassing. It was written some years ago. I use it everywhere on this day. The class included in CFC library of course. You can download the class, documentation (html) and examples here.
Tags: CFC Library, subclassing | No Comments »
There are some moments about resizing of the toolbar’s buttons.
By and large the system itself decides what size to set for the button. That is why I set the style TBSTYLE_AUTOSIZE by default. You can find it at the method CFCToolbar.AddButton. This flag specifies that the toolbar control should not assign the standard width to the button. Instead, the button’s width will be calculated based on the width of the text plus the image of the button (MSDN).
The height of the button depends on the height of other buttons. For example, if you have a WHOLEDROPDOWN-button or DROPDOWN-button (with arrow) the height will be increased. Also you can not create a buttons with a different height.
The method CFCToolbar.AutoSize resizes the toolbar control but not the buttons.
Any toolbar lays on the rebar-control if you use a CFC template. The height of the toolbar depends on the height of rebar. That means that the method CFCToolbar.SetButtonSize does not do anything.
So, I have made a conclusion that you can not set the button size. The size defines automatically by the system.
Maybe it is only my problem. I spent many time to solve it. But I have no results. And I’ve decide that there is not so important that I can not control the size. The system usually does it better.
Tags: CFC Library | No Comments »
I’ve updated MS SQL Field Box. I’ve added the ability to view relationships between tables and ability to execute sp_spaceused procedure.
Tags: MS SQL Field Box | No Comments »
Ingasoft company just released new product EasyListView. As I understand from review it is a wrapper for .NET listbox. That means that you can forget about the old styled Clarion listboxes. The .NET listbox looks amazing
In any case, you should pay attention to it.
Tags: EasyListView | No Comments »
Today I have told with my friend about a class which was written yesterday (see the post below). He have reminded me about ABC Free template which can save and restore listbox format. That’s why I changed the class so little ![]()
I’ve added a new method which restores the format. You need to restore format before “ABC Free” template. You can see the code of method below:
CFCNoRecordsAvailableClass.RestoreLBFormat PROCEDURE
CODE
IF LEN(CLIP(SELF.SavedFormat))
SELF.ListBoxFeq{PROP:From} = SELF.Q
SELF.ListBoxFeq{PROP:Format} = CLIP(SELF.SavedFormat)
SELF.ListBoxFeq{PROP:Disable} = SELF.SavedDisableProp
SELF.ListBoxFeq{PROP:LineHeight} = SELF.SavedLineHeight
END
Tags: CFC Library | No Comments »
I have seen the title “No records available” earlier. Some programs show it in an empty listbox. I have added this little feature in the MS SQL Field Box yesterday. You will see the next image if the table has no indexes:
Today, I have decided to make a class. This class should be able to show that title in any listboxes. And I made it. It is a very simple class. The main goal consist in the next lines:
IF NOT RECORDS(SELF.Q)
SELF.SavedFormat = SELF.ListBoxFeq{PROP:Format}
SELF.SavedLineHeight = SELF.ListBoxFeq{PROP:LineHeight}
SELF.ListBoxFeq{PROP:From} = SELF.DisplayQueue
SELF.ListBoxFeq{PROP:Format} = '1000C(2)@s255@'
SELF.ListBoxFeq{PROP:Disable} = TRUE
SELF.ListBoxFeq{PROP:LineHeight} = SELF.ListBoxFeq{PROP:Height}
ELSE
SELF.ListBoxFeq{PROP:From} = SELF.Q
SELF.ListBoxFeq{PROP:Format} = CLIP(SELF.SavedFormat)
SELF.ListBoxFeq{PROP:Disable} = FALSE
SELF.ListBoxFeq{PROP:LineHeight} = SELF.SavedLineHeight
END
All listboxes display a queue. If queue is empty I change the format of listbox. I specify the another queue for listbox (PROP:From). This queue consist of one column and contains only the one string record. This record contains the title “No records available”. Also I change the height of the listbox row. You can see how it will look below:
If listbox’s queue is not empty I just restore previously saved properties.
There is a one question: How to define when the queue is empty? And there is a simple answer: use a timer. I use a WinAPI timer. That is why I need to subclass a listbox.
You need to use only two methods for one listbox. This is the Init and Kill. You need to pass two params to Init-method. This is the browse queue and listbox equate.
CFCNoRecordsAvailableClass.Init(Queue:Browse:1,?Browse:1)
You can change the default title ‘No records available’ to your own using SetWarningStr method.
I think that source code is clear
Download a source code (C6.3 application)
Please, register a dp_class.tpl template before open the demo application.
This code works at C7 too.
Tags: CFC Library | No Comments »
MS SQL Field Box 2.3 released. I added a popup menu. This items is usefull for me ![]()

Tags: MS SQL Field Box | No Comments »

CFC Library 3.0 released. I’ve add some documentation and video ![]()
This is the first version which is released only by annual subscription. I have many ideas to improve the library. I will try to add new possibilities. It’s always nice to talk about plans
But in fact I do not have so much time to develop the library. Therefore, this changes will not happen quickly.
ps
I made this screenshot from motleysoft.com.
Tags: CFC Library | No Comments »
Today I have made the video. You can download it here.
I downloaded a new version of SnagIt. I was hoping that the new version will work better than the previous one. This is not so. Maybe the problem is in my old computer. It works well but it is too slow when the SnagIt works. And video has a small disturbance. Also, I do not know how to edit the video. SnagIt does not have any tool for this. Maybe I need an another tool but I like SnagIt for screen capturing and I like the small size of the video.
Tags: CFC Library, SnagIt, Video | No Comments »