The SB_SETTEXT message sets the text in the specified part of a status window. SB_SETTEXT  
wParam = (WPARAM) iPart | uType; 
lParam = (LPARAM) (LPSTR) szText; 
 ParametersiPartZero-based index of the part to set. If this value is 255, the status window is assumed to be a simple window having only one part.uTypeType of drawing operation. This parameter can be one of the following values:Value Meaning
0 The text is drawn with a border to appear lower than the plane of the window.
SBT_NOBORDERS The text is drawn without borders.
SBT_OWNERDRAW The text is drawn by the parent window.
SBT_POPOUT The text is drawn with a border to appear higher than the plane of the window.
SBT_RTLREADING Displays text using right-to-left reading order on Hebrew or Arabic systems.
 szTextPointer to a null-terminated string that specifies the text to set. If uType
 is SBT_OWNERDRAW, this parameter represents 32 bits of data. The parent window must interpret the data and draw the text when it receives the WM_DRAWITEM message. Return ValuesIf the operation succeeds, the return value is TRUE.
If the operation fails, the return value is FALSE.ResThe message invalidates the portion of the window that has changed, causing it to display the new text when the window next receives the WM_PAINT message.

解决方案 »

  1.   

    相关的数据有所改动
        ; -------------------------------------
        ; sbParts is a DWORD array of 4 members
        ; -------------------------------------
        mov [sbParts +  0],   100    ; pixels from left
        mov [sbParts +  4],   350    ; pixels from left
        mov [sbParts +  8],   400    ; pixels from left
        mov [sbParts + 12],    -1    ; last part
     
        上面我改了一下,你没发现你的程序运行后只有两栏吗????
      
        invoke SendMessage,hStatusbar,SB_SETPARTS,4,ADDR sbParts    invoke SendMessage,hStatusbar,SB_SETTEXT,0,addr AboutText
        invoke SendMessage,hStatusbar,SB_SETTEXT,1,addr AboutText2
        上面两行是我加的,可以在指定的某栏中显示文字    ret
    在变量声明区:    .data
        
    ClassName       db "SimpleWinClass",0
    AppName         db "StatusBar Demo",0
    SB_string    db "Status Bar!",0
    AboutText    db "vBin",0          ;<<新加的
    AboutText2    db "vBin.51.net",0  ;<<新加的
    ; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
      

  2.   

    除了上面写的,其余的都没有改。程序运行非常正常,现在我正打开着这个编译好的EXE文件窗口。
      

  3.   

    介绍WIN32 ASM的图书 哪儿有?
      

  4.   

    asm.yeah.net有详细教程,不过好像最近访问不了了。
    我这有别人整理好的罗云彬的教程和其他的一些教程,忘了在哪下的了,可以发给你。