Hallo Folks,

Exploring the internet I discovered the beautiful Visual editor form MASM: EasyCode. Recently I am using version 1.00.0004 on a notebook, under Windows 98.

This beautiful editor astonishes me. Especially the auto-correction of capitals means a lot to me. When I type in the name of a variable and it stays uncapitalized, I known I have to correct the variable-name, and don't have to wait for "build"-time to discover it. Very usefull!

But now I have a problem, which I don't know how to resolve:
I made a new Visual Project, and changed the name of the window into: Chess. In that window I made a statusbar, with 2 parts using the builtin statusbar editor. The name of the statusbar is: StatusBar1

In the .data-section I created a variable:

hStatusBar1 dd HWND

In the WM_CREATE part of the main window handler I wrote:

.if uMsg == WM_CREATE
Invoke GetWindowItem,App.Main,IDC_CHESS_STATUSBAR1
mov hStatusBar1,eax
Invoke SendMessage,hStatusBar,WM_SETTEXT,0,SADD("Test")
.ElseIf ....

The result was fine. In the first part of the statusbar the text "Test" appeared. But ofcourse I would like to use all of the parts of the statusbar, so I changed the sendmessage-statement into:

Invoke SendMessage,hStatusBar,SB_SETTEXT,1,SADD("Test")

Unfortunately the result wasn't fine. The text "Text" didn't appear in the second part of the statusbar. Even when I changed the sendmessage statement into:

Invoke SendMessage,hStatusBar,SB_SETTEXT,0,SADD("Test")

the text did'nt show up in the first part of the statusbar.
After this I also tried to send the SB_SETPARTS message to hStatusBar1, before I sent the message SB_SETTEXT. But even then there was no good result.

My question is:
Why does the message WM_SETTEXT seam to work fine, while the message SB_SETTEXT doesn't? Is this a lack in my knowledge, or is it a bug in EasyCode? How do I get SB_SETTEXT to work?

Can anybody help me?

Posted on 2004-11-07 12:17:01 by mdevries