GetStockObject是一個Windows API函式,該函式檢索預定義的備用筆、刷子、字型或者調色板的句柄,函式原型是HGDIOBJ GetStockObject(int)。
基本介紹
- 中文名:GetStockObject
- 外文名:GetStockObject
- 類別:Windows API函式
- 功能:檢索預定義
- 原型:HGDIOBJ GetStockObject(int)
GetStockObject是一個Windows API函式,該函式檢索預定義的備用筆、刷子、字型或者調色板的句柄,函式原型是HGDIOBJ GetStockObject(int)。
GetStockObject是一個Windows API函式,該函式檢索預定義的備用筆、刷子、字型或者調色板的句柄,函式原型是HGDIOBJ GetStockObject(int)。中文...
wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); //視窗背景 wndclass.hCursor = LoadCursor(NULL,IDC_ARROW); //滑鼠 wndclass.hIcon = Load...
wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;wndclass.lpszMenuName = NULL ;wndclass.lpszClassName = szAppName ;...
wndclass.hbrBackground = GetStockObject (WHITE_BRUSH) ;wndclass.lpszMenuName = NULL ;wndclass.lpszClassName = szAppName ;
針的情況,這句話也仍然適用。讓我們隨意地生成一些句柄,比如你用GetStockOb ject()以得到一些句柄,你會發現,它們的值總在區間0x01900011到0xba040389。前者...
wcex.hbrBackground = (HBRUSH) GetStockObject( WHITE_BRUSH );wcex.lpszMenuName = NULL;wcex.lpszClassName = "My Class";
SelectObject (hdc,GetStockObject (SYSTEM_FⅨED_FONT)) ;SetTextColor (hdc,GetSysColor (COLOR_BTNTEXT)) ;SetBkColor (hdc,GetSysColor (COLOR_BTNFACE)) ...
wndclass.hbrBackground =(HBRUSH) GetStockObject(BLACK_BRUSH); wndclass.lpszClassName =WND_CLS_NAME; //下面是利用wndcalss結構體的信息註冊一個視窗類 if...
wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); //背景wc.lpszMenuName = 0; //選單指針wc.lpszClassName = szWindowClass; //窗體類名wc....
FillRect(hdc, &r, GetStockObject(GRAY_BRUSH))。速查 Windows NT:3.1及以上版本;Windows:95及以上版本;Windows CE:不支持;頭檔案:wingdi.h;...
wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;wndclass.lpszMenuName = NULL ;wndclass.lpszClassName = szAppName ;...
wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;wndclass.lpszMenuName = NULL ;wndclass.lpszClassName = szAppName ;...
SelectObject(hDC,hFont);TextOut(hDC,0,0,szStr,lstrlen(szStr));DeleteObject(SelectObject(hDC,GetStockObject(SYSTEM_FONT)));...
wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;wndclass.lpszMenuName = NULL ;wndclass.lpszClassName = szAppName ;...
wndclass.hbrBackground=(HBRUSH)(GetStockObject(WHITE_BRUSH)); //視窗背景為白色 wndclass.lpszMenuName=NULL; //視窗無選單 wndclass.lpszClassName=lpszClass...
使用DC_BRUSH或DC_PEN參數的GetStockObject函式可以與SetDCPenColor和SetDCBrushColor函式互換。ICM:如果ICM可用就執行顏色管理。速查:Windows NT:5.0及以上版本;Windows:...
hInstance=hInstance;wndclass.hIcon=LoadIcon(NULL,IDI_APPLICATION);wndclass.hCursor=LoadCursor(NULL,IDC_ARROW);wndclass.hbrBackground=(HBRUSH)GetStockObject(...
設定顏色可以參見設定筆或畫筆顏色的例子,使用DC_BRUSH或DC_PEN參數的GetStockObject函式可與SetDCPenColor和SetDCBrushColor函式交換使用。
DeleteObject(SelectObject(hDC,GetStockObject(SYSTEM_FONT)));ReleaseDC(hwnd,hDC);}(4)中的±對輸出是有影響的,見下圖。亦即:當邏輯坐標系y軸與設備坐標系y...
由參數hbr定義的畫刷必須是由CreateHatchBrush、CreatePatternBrush或CreateSolidBrush創建的,或者是由使用GetStockObject獲得的。如果RECT結構中的底部成員的值少於或等於...
SelectObject(hdc,GetStockObject(BLACK_PEN)); DrawBezier(hdc,apt); ReleaseDC(hwnd,hdc); } return0; caseWM_PAINT: InvalidateRect(hwnd,NULL,TRUE); hdc...
NULL,AfxRegisterWndClass(NULL,0,(HBRUSH)::GetStockObject(WHITE_BRUSH),0),"實驗程式",WS_OVERLAPPEDWINDOW,rect,NULL,NULL,NULL);...
DeleteObject ((HBRUSH)SetClassLong (hwnd, GCL_HBRBACKGROUND, (LONG)GetStockObject (WHITE_BRUSH))) ;for (i = 0 ; i < 3 ; i++)...
GetClientRect(hwnd, (LPRECT)&rect);DPtoLP(hDC, (LPPOINT)&rect, 2);/* Select a gray brush. */hbrOld = SelectObject(hDC, GetStockObject(GRAY_...
此外,你可以用GetStockObject來獲得一個庫存畫刷句柄。如果指定一個顏色值,必須是標準系統顏色(所選擇的顏色必須加1)如FillRect(hdc, &rect, (HBRUSH)(COLOR_...
(HBRUSH) ::GetStockObject(WHITE_BRUSH), ::LoadIcon(NULL, IDI_APPLICATION));}catch (CResourceException* pEx){ AfxMessageBox(_T("Couldn't register ...
CFont *pFont=CFont::FromHandle((HFONT)::GetStockObject(ANSI_VAR_FONT));CRect rect1(150,20,350,100);m_combobox.Create(WS_CHILD|WS_VISIBLE|CBS_...