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.
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.
解决方案 »
- 如何在MFC静态文本框中换行?
- vc 如何用vc++ 读取数据库
- 希望在这里得到实实在在的帮助~
- APP里的的哪个地方添加判断IDCANCLE
- 老能看到说得很惨的帖子,不知道是不是真的呀,好赖IT也算是个高薪产业阿!
- 魔方高手请进...........................
- 建立一个consol程序,有如下链接错误,请问如何解决
- 为什么我的CSocket sockClient.Create();无论在哪里调用都不能成功Create();
- InvalidateRect指定无效区域有什么用
- 小问题请教
- 疑难杂症:VC通过ADO来操作dbf数据库中的memo类型字段时,只能插入8K以下的数据???
- 菜鸟问题,关于进程
; -------------------------------------
; 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 ;<<新加的
; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
我这有别人整理好的罗云彬的教程和其他的一些教程,忘了在哪下的了,可以发给你。