This section contains information about the programming elements used with scroll bars.
(このセクションは、スクロールバー プログラミング の構成に関する情報を含んでいます。)
A window can display a data object, such as a document or a bitmap, that is larger than the window's client area.
(ウィンドウはデータや文書、またはビットマップなど、そのウィンドウのクライアント領域より大きいオブジェクトを表示することができます。)
When provided with a scroll bar, the user can scroll a data object in the client area to bring into view the portions of the object that extend beyond the borders of the window.
(スクロール バー が提供されると、ユーザーはウインドウの境界線を越えた対象の部分を視界の中へ持って来るために、クライアント領域のデータ対象をスクロールすることができます。)
About Scroll Bar (スクロールバーについて)A scroll bar consists of a shaded shaft with an arrow button at each end and a scroll box (sometimes called a thumb) between the arrow buttons.
Using Scroll Bars (スクロールバーを使う)When creating an overlapped, pop-up, or child window, you can add standard scroll bars by using the CreateWindowEx function and specifying WS_HSCROLL, WS_VSCROLL, or both styles.
EnableScrollBarThe EnableScrollBar function enables or disables one or both scroll bar arrows.
GetScrollBarInfoThe GetScrollBarInfo function retrieves information about the specified scroll bar.
GetScrollInfoThe GetScrollInfo function retrieves the parameters of a scroll bar, including the minimum and maximum scrolling positions, the page size, and the position of the scroll box (thumb).
GetScrollPosThe GetScrollPos function retrieves the current position of the scroll box (thumb) in the specified scroll bar. The current position is a relative value that depends on the current scrolling range. For example, if the scrolling range is 0 through 100 and the scroll box is in the middle of the bar, the current position is 50.
Note The GetScrollPos function is provided for backward compatibility. New applications should use the GetScrollInfo function.GetScrollRangeThe GetScrollRange function retrieves the current minimum and maximum scroll box (thumb) positions for the specified scroll bar.
Note The GetScrollRange function is provided for compatibility only. New applications should use the GetScrollInfo function.ScrollDCThe ScrollDC function scrolls a rectangle of bits horizontally and vertically.
ScrollWindowThe ScrollWindow function scrolls the contents of the specified window's client area.
Note The ScrollWindow function is provided for backward compatibility. New applications should use the ScrollWindowEx function.ScrollWindowExThe ScrollWindowEx function scrolls the contents of the specified window's client area.
SetScrollInfoThe SetScrollInfo function sets the parameters of a scroll bar, including the minimum and maximum scrolling positions, the page size, and the position of the scroll box (thumb). The function also redraws the scroll bar, if requested.
SetScrollPosThe SetScrollPos function sets the position of the scroll box (thumb) in the specified scroll bar and, if requested, redraws the scroll bar to reflect the new position of the scroll box.
Note The SetScrollPos function is provided for backward compatibility. New applications should use the SetScrollInfo function.SetScrollRangeThe SetScrollRange function sets the minimum and maximum scroll box positions for the specified scroll bar.
Note The SetScrollRange function is provided for backward compatibility. New applications should use the SetScrollInfo function.ShowScrollBarThe ShowScrollBar function shows or hides the specified scroll bar.
SBM_ENABLE_ARROWSAn application sends the SBM_ENABLE_ARROWS message to enable or disable one or both arrows of a scroll bar control.
SBM_GETPOSThe SBM_GETPOS message is sent to retrieve the current position of the scroll box of a scroll bar control. The current position is a relative value that depends on the current scrolling range. For example, if the scrolling range is 0 through 100 and the scroll box is in the middle of the bar, the current position is 50.
Applications should not send this message directly. Instead, they should use the GetScrollPos function. A window receives this message through its WindowProc function. Applications which implement a custom scroll bar control must respond to these messages for the GetScrollPos function to function properly.
SBM_GETRANGEThe SBM_GETRANGE message is sent to retrieve the minimum and maximum position values for the scroll bar control.
Applications should not send this message directly. Instead, they should use the GetScrollRange function. A window receives this message through its WindowProc function. Applications which implement a custom scroll bar control must respond to these messages for the GetScrollRange function to work properly.
SBM_GETSCROLLBARINFOSent by an application to retrieve information about the specified scroll bar.
SBM_GETSCROLLINFOThe SBM_GETSCROLLINFO message is sent to retrieve the parameters of a scroll bar.
Applications should not send this message directly. Instead, they should use the GetScrollInfo function. A window receives this message through its WindowProc function. Applications which implement a custom scroll bar control must respond to these messages for the GetScrollInfo function to work properly.
SBM_SETPOSThe SBM_SETPOS message is sent to set the position of the scroll box (thumb) and, if requested, redraw the scroll bar to reflect the new position of the scroll box.
Applications should not send this message directly. Instead, they should use the SetScrollPos function. A window receives this message through its WindowProc function. Applications which implement a custom scroll bar control must respond to these messages for the SetScrollPos function to work properly.
SBM_SETRANGEThe SBM_SETRANGE message is sent to set the minimum and maximum position values for the scroll bar control.
Applications should not send this message directly. Instead, they should use the SetScrollRange function. A window receives this message through its WindowProc function. Applications which implement a custom scroll bar control must respond to these messages for the SetScrollRange function to work properly.
SBM_SETRANGEREDRAWAn application sends the SBM_SETRANGEREDRAW message to a scroll bar control to set the minimum and maximum position values and to redraw the control.
SBM_SETSCROLLINFOThe SBM_SETSCROLLINFO message is sent to set the parameters of a scroll bar.
Applications should not send this message directly. Instead, they should use the SetScrollInfo function. A window receives this message through its WindowProc function. Applications which implement a custom scroll bar control must respond to these messages for the SetScrollInfo function to function properly.
WM_CTLCOLORSCROLLBARThe WM_CTLCOLORSCROLLBAR message is sent to the parent window of a scroll bar control when the control is about to be drawn. By responding to this message, the parent window can use the display context handle to set the background color of the scroll bar control.
A window receives this message through its WindowProc function.
WM_HSCROLLThe WM_HSCROLL message is sent to a window when a scroll event occurs in the window's standard horizontal scroll bar. This message is also sent to the owner of a horizontal scroll bar control when a scroll event occurs in the control.
A window receives this message through its WindowProc function.
WM_VSCROLLThe WM_VSCROLL message is sent to a window when a scroll event occurs in the window's standard vertical scroll bar. This message is also sent to the owner of a vertical scroll bar control when a scroll event occurs in the control.
A window receives this message through its WindowProc function.
SCROLLBARINFOThe SCROLLBARINFO structure contains scroll bar information.
SCROLLINFOThe SCROLLINFO structure contains scroll bar parameters to be set by the SetScrollInfo function (or SBM_SETSCROLLINFO message), or retrieved by the GetScrollInfo function (or SBM_GETSCROLLINFO message).
Scroll Bar Control StylesTo create a scroll bar control using the CreateWindow or CreateWindowEx function specify the SCROLLBAR class, appropriate window style constants, and a combination of the following scroll bar control styles. Some of the styles create a scroll bar control that uses a default width or height. However, you must always specify the x- and y-coordinates and the other dimensions of the scroll bar when you call CreateWindow or CreateWindowEx.
VB 6.0 でConvertINetMultiByteToUnicode の引数に65001 が使われていて、
意味不明だった為、VC のinclude フォルダを調べてみたメモ。
WINNLS.H にページコードの定数があった、
これがConvertINetMultiByteToUnicode の第2引数の様だ。
VB 6.0 は内部的にUNICODE で動いているのでUNICODE に直すのは普通なのかもしれないが、
文字コードは変数に格納する時に、文字列として格納するかとか、バイトの配列として格納するとか、
微妙に仕様言語や、ぷラットフォームが使っている文字エンコードの扱いによって違うので鵜呑みに出来ない、
その上ブラウザなどから得た情報は、ブラウザが文字種別を解釈してそれを渡しているのか、
それとも解釈せずに渡しているのかとかも考えた方がいい様だし、特に、
RegisterClipboardFormat とかのAPI を使うときはWindows の当たり前的な仕様も考えないと
いけない、なので今度はRegisterClipboardFormat のフォーマットの種類や、
ブラウザで用いられるOLE というかドラッグアンドドロップで操作出来る情報をを調べないといけないかな、
自身の都合上(かなり独り言)。
//
// Code Page Default Values.
//
#define CP_ACP 0 // default to ANSI code page
#define CP_OEMCP 1 // default to OEM code page
#define CP_MACCP 2 // default to MAC code page
#define CP_THREAD_ACP 3 // current thread's ANSI code page
#define CP_SYMBOL 42 // SYMBOL translations
#define CP_UTF7 65000 // UTF-7 translation
#define CP_UTF8 65001 // UTF-8 translation
ついでに国も同じくWINNLS.H にあった。
//
// Country Codes.
//
#define CTRY_DEFAULT 0
#define CTRY_ALBANIA 355 // Albania
#define CTRY_ALGERIA 213 // Algeria
#define CTRY_ARGENTINA 54 // Argentina
#define CTRY_AUSTRALIA 61 // Australia
#define CTRY_AUSTRIA 43 // Austria
#define CTRY_BAHRAIN 973 // Bahrain
#define CTRY_BELARUS 375 // Belarus
#define CTRY_BELGIUM 32 // Belgium
#define CTRY_BELIZE 501 // Belize
#define CTRY_BOLIVIA 591 // Bolivia
#define CTRY_BRAZIL 55 // Brazil
#define CTRY_BRUNEI_DARUSSALAM 673 // Brunei Darussalam
#define CTRY_BULGARIA 359 // Bulgaria
#define CTRY_CANADA 2 // Canada
#define CTRY_CARIBBEAN 1 // Caribbean
#define CTRY_CHILE 56 // Chile
#define CTRY_COLOMBIA 57 // Colombia
#define CTRY_COSTA_RICA 506 // Costa Rica
#define CTRY_CROATIA 385 // Croatia
#define CTRY_CZECH 420 // Czech Republic
#define CTRY_DENMARK 45 // Denmark
#define CTRY_DOMINICAN_REPUBLIC 1 // Dominican Republic
#define CTRY_ECUADOR 593 // Ecuador
#define CTRY_EGYPT 20 // Egypt
#define CTRY_EL_SALVADOR 503 // El Salvador
#define CTRY_ESTONIA 372 // Estonia
#define CTRY_FAEROE_ISLANDS 298 // Faeroe Islands
#define CTRY_FINLAND 358 // Finland
#define CTRY_FRANCE 33 // France
#define CTRY_GERMANY 49 // Germany
#define CTRY_GREECE 30 // Greece
#define CTRY_GUATEMALA 502 // Guatemala
#define CTRY_HONDURAS 504 // Honduras
#define CTRY_HONG_KONG 852 // Hong Kong
#define CTRY_HUNGARY 36 // Hungary
#define CTRY_ICELAND 354 // Iceland
#define CTRY_INDIA 91 // India
#define CTRY_INDONESIA 62 // Indonesia
#define CTRY_IRAN 981 // Iran
#define CTRY_IRAQ 964 // Iraq
#define CTRY_IRELAND 353 // Ireland
#define CTRY_ISRAEL 972 // Israel
#define CTRY_ITALY 39 // Italy
#define CTRY_JAMAICA 1 // Jamaica
#define CTRY_JAPAN 81 // Japan
#define CTRY_JORDAN 962 // Jordan
#define CTRY_KENYA 254 // Kenya
#define CTRY_KUWAIT 965 // Kuwait
#define CTRY_LATVIA 371 // Latvia
#define CTRY_LEBANON 961 // Lebanon
#define CTRY_LIBYA 218 // Libya
#define CTRY_LIECHTENSTEIN 41 // Liechtenstein
#define CTRY_LITHUANIA 370 // Lithuania
#define CTRY_LUXEMBOURG 352 // Luxembourg
#define CTRY_MACAU 853 // Macau
#define CTRY_MACEDONIA 389 // Republic of Macedonia
#define CTRY_MALAYSIA 60 // Malaysia
#define CTRY_MEXICO 52 // Mexico
#define CTRY_MONACO 33 // Principality of Monaco
#define CTRY_MOROCCO 212 // Morocco
#define CTRY_NETHERLANDS 31 // Netherlands
#define CTRY_NEW_ZEALAND 64 // New Zealand
#define CTRY_NICARAGUA 505 // Nicaragua
#define CTRY_NORWAY 47 // Norway
#define CTRY_OMAN 968 // Oman
#define CTRY_PAKISTAN 92 // Islamic Republic of Pakistan
#define CTRY_PANAMA 507 // Panama
#define CTRY_PARAGUAY 595 // Paraguay
#define CTRY_PERU 51 // Peru
#define CTRY_PHILIPPINES 63 // Republic of the Philippines
#define CTRY_POLAND 48 // Poland
#define CTRY_PORTUGAL 351 // Portugal
#define CTRY_PRCHINA 86 // People's Republic of China
#define CTRY_PUERTO_RICO 1 // Puerto Rico
#define CTRY_QATAR 974 // Qatar
#define CTRY_ROMANIA 40 // Romania
#define CTRY_RUSSIA 7 // Russia
#define CTRY_SAUDI_ARABIA 966 // Saudi Arabia
#define CTRY_SERBIA 381 // Serbia
#define CTRY_SINGAPORE 65 // Singapore
#define CTRY_SLOVAK 421 // Slovak Republic
#define CTRY_SLOVENIA 386 // Slovenia
#define CTRY_SOUTH_AFRICA 27 // South Africa
#define CTRY_SOUTH_KOREA 82 // South Korea
#define CTRY_SPAIN 34 // Spain
#define CTRY_SWEDEN 46 // Sweden
#define CTRY_SWITZERLAND 41 // Switzerland
#define CTRY_SYRIA 963 // Syria
#define CTRY_TAIWAN 886 // Taiwan Region
#define CTRY_THAILAND 66 // Thailand
#define CTRY_TRINIDAD_Y_TOBAGO 1 // Trinidad y Tobago
#define CTRY_TUNISIA 216 // Tunisia
#define CTRY_TURKEY 90 // Turkey
#define CTRY_UAE 971 // U.A.E.
#define CTRY_UKRAINE 380 // Ukraine
#define CTRY_UNITED_KINGDOM 44 // United Kingdom
#define CTRY_UNITED_STATES 1 // United States
#define CTRY_URUGUAY 598 // Uruguay
#define CTRY_VENEZUELA 58 // Venezuela
#define CTRY_VIET_NAM 84 // Viet Nam
#define CTRY_YEMEN 967 // Yemen
#define CTRY_ZIMBABWE 263 // Zimbabwe