关于在pb中修改字体的属性

yahoosohu 2001-08-12 09:57:02
调用winApi函数 choosefont ,ocx控件COMDLG32.ocx修改字体的属性,如:字体名称,
字体样式,字体大小,颜色等属性时,不只该样调出字体的颜色属性。各位高收入有知道的请帮忙,不胜感激!
...全文
206 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Methodor 2001-08-12
  • 打赏
  • 举报
回复
structure:
type OS_ChooseColor from structure
long lstructsize
unsignedlong hwndowner
unsignedlong hinstance
long rgbresult
blob lpcustcolors
long flags
long lcustdata
long lpfnhook
long lptemplatename
end type
function:
function boolean ChooseColorA( REF os_ChooseColor lpcc ) library "comdlg32.dll"
public function boolean of_choosecolor (ref long al_rgbresult, readonly long al_owner, integer ai_para);os_ChooseColor lstr_ChooseColor
long ll_CustomInitColors[16]
blob{64} lbl_CustomColors

// initialize choosecolor information
// convert the default custom color array to a blob variable blobedit(ibl_customcolors,1,il_custominitcolors)
// let the structure element point to the blob array
lstr_choosecolor.lpcustcolors = lbl_customcolors

// set the size
lstr_choosecolor.lStructSize = 36

// no owner
choose case ai_para
case 0
SetNull(lstr_choosecolor.hwndOwner)
case 1
lstr_choosecolor.hwndOwner=al_owner
case else
SetNull(lstr_choosecolor.hwndOwner)
end choose

// set flag
lstr_choosecolor.flags = 1

boolean lb_ok
lstr_ChooseColor.rgbresult = al_rgbresult
lb_ok = ChooseColorA ( lstr_choosecolor )
al_rgbresult = lstr_ChooseColor.rgbresult
return lb_ok
~~

1,077

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧