api_richedit.sbpのメンバ名

返信する


答えを正確に入力してください。答えられるかどうかでスパムボットか否かを判定します。

BBCode: ON
[img]: ON
[url]: ON
スマイリー: OFF

トピックのレビュー
   

展開ビュー トピックのレビュー: api_richedit.sbpのメンバ名

Re: api_richedit.sbpの未使用部分

by KICO » 2005年10月28日(金) 20:24

「CHARFORMAT2構造体」のszFaceNameメンバのサイズ指定がVer4.10.02(修正版)でも
szFaceName[LF_FACESIZE-1]になってますが、これで正しいのでしょうか?

wWeight(フォントの太さを指定)以降の設定が出来無いのですが、別の所に問題があるのでしょうか?

「2バイトのダミーを入れる」か「szFaceName[LF_FACESIZE+1] As Byte」 にすると出来るのですが。

これは、「プログラミング掲示板」で質問すべきでしょうが・・・
宜しくお願いします。

未定義の定数がありました。
Const CFE_AUTOBACKCOLOR = CFM_BACKCOLOR

Re: api_richedit.sbpの未使用部分

by KICO » 2005年10月07日(金) 22:53

イグトランス様、ありがとう御座います。

> > szFaceName[LF_FACESIZE*2+1] As Byte <---変更箇所
> これはVBがUnicodeを使っているからでしょう。

誤)
szFaceName[LF_FACESIZE]-1] As Byte

正)
szFaceName[LF_FACESIZE+1] As Byte

コード: 全て選択


Type CHARFORMAT2
    cbSize As DWord
    dwMask As DWord
    dwEffects As DWord
    yHeight As Long
    yOffset As Long
    crTextColor As DWord
    bCharSet As Byte
    bPitchAndFamily As Byte
    szFaceName[LF_FACESIZE+1] As Byte  <---変更箇所
    wWeight As Word
    sSpacing As Integer
    crBackColor As DWord
    lcid As DWord
    dwReserved As DWord
    sStyle As Integer
    wKerning As Word
    bUnderlineType As Byte
    bAnimation As Byte
    bRevAuthor As Byte
    bReserved1 As Byte
End Type

Re: api_richedit.sbpの未使用部分

by イグトランス » 2005年10月07日(金) 18:39

> http://www.vbvbvb.com/jp/gtips/0451/gSe ... ormat.html
> szFaceName[LF_FACESIZE*2+1] As Byte <---変更箇所
これはVBがUnicodeを使っているからでしょう。
ABではELM(LF_FACESIZE)で問題ないはずです。

Re: api_richedit.sbpの未使用部分

by KICO » 2005年10月07日(金) 16:44

http://www.vbvbvb.com/jp/gtips/0451/gSe ... ormat.html
では、下記の様に、「フォントフェイスのサイズ」を2倍にして設定?

コード: 全て選択


Type CHARFORMAT2
	cbSize As DWord
	dwMask As DWord
	dwEffects As DWord
	yHeight As Long
	yOffset As Long
	crTextColor As DWord
	bCharSet As Byte
	bPitchAndFamily As Byte
	szFaceName[LF_FACESIZE*2+1] As Byte  <---変更箇所
	wWeight As Word
	sSpacing As Integer
	crBackColor As DWord
	lcid As DWord
	dwReserved As DWord
	sStyle As Integer
	wKerning As Word
	bUnderlineType As Byte
	bAnimation As Byte
	bRevAuthor As Byte
	bReserved1 As Byte
End Type

api_richedit.sbpの未使用部分

by KICO » 2005年10月06日(木) 15:44

"api_richedit.sbp"(全バージョン)の「CHARFORMAT2構造体」の未使用部分にダミーが必要では?

コード: 全て選択


Type CHARFORMAT2
	cbSize As DWord
	dwMask As DWord
	dwEffects As DWord
	yHeight As Long
	yOffset As Long
	crTextColor As DWord
	bCharSet As Byte
	bPitchAndFamily As Byte
	szFaceName[LF_FACESIZE-1] As Byte
	wWeight As Word
	sSpacing As Integer
	dummy As Word  <----- 未使用部分
	crBackColor As DWord
	lcid As DWord
	dwReserved As DWord
	sStyle As Integer
	wKerning As Word
	bUnderlineType As Byte
	bAnimation As Byte
	bRevAuthor As Byte
	bReserved1 As Byte
End Type

by 山本 » 2005年10月06日(木) 15:25

ご報告ありがとうございます。
次回のバージョンアップで修正します。

api_richedit.sbpのメンバ名

by KICO » 2005年10月06日(木) 12:15

"api_richedit.sbp"(全バージョン)の「CHARFORMAT2構造体」のサイズ指定のメンバ名が間違っています。
誤)
cdSize

正)
cbSize

ページトップ