api_richedit.sbpのメンバ名

ActiveBasicのバグと思われる不具合を発見された方は、こちらから知らせていただけると助かります。
返信する
メッセージ
作成者
KICO

api_richedit.sbpのメンバ名

#1 投稿記事 by KICO »

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

正)
cbSize
山本
Site Admin
記事: 535
登録日時: 2005年5月30日(月) 15:08
連絡する:

#2 投稿記事 by 山本 »

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

api_richedit.sbpの未使用部分

#3 投稿記事 by KICO »

"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

KICO

Re: api_richedit.sbpの未使用部分

#4 投稿記事 by KICO »

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

イグトランス
記事: 899
登録日時: 2005年5月31日(火) 17:59
お住まい: 東京都
連絡する:

Re: api_richedit.sbpの未使用部分

#5 投稿記事 by イグトランス »

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

Re: api_richedit.sbpの未使用部分

#6 投稿記事 by KICO »

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

> > 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

KICO

Re: api_richedit.sbpの未使用部分

#7 投稿記事 by KICO »

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

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

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

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

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