本文整理汇总了C++中GetClassLong函数的典型用法代码示例。如果您正苦于以下问题:C++ GetClassLong函数的具体用法?C++ GetClassLong怎么用?C++ GetClassLong使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetClassLong函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: get_window_icon_big
HICON get_window_icon_big(HWND hwnd, bool allow_from_class)
{
HICON hIcon = 0;
SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
if (!hIcon)
SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
if (!hIcon)
SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
if (allow_from_class) {
if (!hIcon)
hIcon = (HICON)GetClassLong(hwnd, GCL_HICON);
if (!hIcon)
hIcon = (HICON)GetClassLong(hwnd, GCL_HICONSM);
}
if (!hIcon)
SendMessageTimeout(hwnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (LPDWORD)&hIcon);
return hIcon;
}
开发者ID:svn2github,项目名称:ros-explorer,代码行数:25,代码来源:taskbar.cpp
示例2: dc
void CSizingControlBar::OnNcPaint()
{
// get window DC that is clipped to the non-client area
CWindowDC dc(this);
CRect rcClient, rcBar;
GetClientRect(rcClient);
ClientToScreen(rcClient);
GetWindowRect(rcBar);
rcClient.OffsetRect(-rcBar.TopLeft());
rcBar.OffsetRect(-rcBar.TopLeft());
CDC mdc;
mdc.CreateCompatibleDC(&dc);
CBitmap bm;
bm.CreateCompatibleBitmap(&dc, rcBar.Width(), rcBar.Height());
CBitmap* pOldBm = mdc.SelectObject(&bm);
// draw borders in non-client area
CRect rcDraw = rcBar;
DrawBorders(&mdc, rcDraw);
// erase the NC background
#ifdef _WIN64
mdc.FillRect(rcDraw, CBrush::FromHandle(
(HBRUSH) GetClassLong(m_hWnd, GCLP_HBRBACKGROUND)));
#else
mdc.FillRect(rcDraw, CBrush::FromHandle(
(HBRUSH) GetClassLong(m_hWnd, GCL_HBRBACKGROUND)));
#endif
if (m_dwSCBStyle & SCBS_SHOWEDGES)
{
CRect rcEdge; // paint the sizing edges
for (int i = 0; i < 4; i++)
if (GetEdgeRect(rcBar, GetEdgeHTCode(i), rcEdge))
mdc.Draw3dRect(rcEdge, ::GetSysColor(COLOR_BTNHIGHLIGHT),
::GetSysColor(COLOR_BTNSHADOW));
}
NcPaintGripper(&mdc, rcClient);
// client area is not our bussiness :)
dc.IntersectClipRect(rcBar);
dc.ExcludeClipRect(rcClient);
dc.BitBlt(0, 0, rcBar.Width(), rcBar.Height(), &mdc, 0, 0, SRCCOPY);
ReleaseDC(&dc);
mdc.SelectObject(pOldBm);
bm.DeleteObject();
mdc.DeleteDC();
}
开发者ID:banduladh,项目名称:meplayer,代码行数:55,代码来源:sizecbar.cpp
示例3: CImageList
void CTaskSwitcher32Dlg::FilterList()
{
m_windowList2.DeleteAllItems();
window_list *list = window_item::get_window_list();
CImageList *pImageList = new CImageList(); pImageList->Create( 16, 16, ILC_COLOR32 | ILC_MASK | ILC_PERITEMMIRROR, 0, 10);
m_windowList2.SetImageList( pImageList, LVSIL_SMALL);
int default_idx = pImageList->Add( m_hIcon );
for ( unsigned int i = 0; i < list->size(); i++ )
{
window_item *item = (*list)[i];
bool ok = true;
if ( this->search.length() > 0 )
{
int pos = item->get_lower_title().find( this->search ) ;
int pos2 = item->get_process_name().find( this->search );
if ( pos == std::string::npos && pos2 == std::string::npos )
ok = false;
}
if ( ok )
{
HWND hwnd = item->get_handle();
HICON hIcon = NULL;
SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
if (!hIcon) SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
if (!hIcon) SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
if (!hIcon) hIcon = (HICON)GetClassLong(hwnd, GCL_HICON);
if (!hIcon) hIcon = (HICON)GetClassLong(hwnd, GCL_HICONSM);
int imageidx = -1;
if ( hIcon != NULL )
{
HICON iconCopy = CopyIcon( hIcon );
imageidx = pImageList->Add( iconCopy );
DestroyIcon( iconCopy );
}
else
{
imageidx = 1;
}
int idx = m_windowList2.InsertItem( 0, item->get_title().c_str(), imageidx );
m_windowList2.SetItem( idx, 1, LVIF_TEXT | LVIF_IMAGE, item->get_process_name().c_str(), imageidx, 0, 0, 0 );
m_windowList2.SetItemData( idx, (DWORD_PTR) item );
}
}
m_windowList2.SetItemState( 0, LVIS_SELECTED, LVIS_SELECTED );
m_windowList2.SetSelectionMark( 0 );
}
开发者ID:jacksondk,项目名称:taskswitcher32,代码行数:54,代码来源:TaskSwitcher32Dlg.cpp
示例4: SetWindowLongPtr
///////////////////////////////////////////////////////////////////////
/// Function: WindowClassProc
///
/// Author: $author$
/// Date: 4/6/2012
///////////////////////////////////////////////////////////////////////
static LRESULT CALLBACK WindowClassProc
(HWND hWnd,
UINT msg,
WPARAM wParam,
LPARAM lParam)
{
LRESULT lResult = 0;
XosWinWindow* target = 0;
WNDPROC windowSubclassProc = 0;
DWORD wndExtra;
DWORD wndIndex;
DWORD wndClassExtra;
DWORD wndClassIndex;
if (sizeof(XosWinWindow*) <= (wndExtra = GetClassLong(hWnd, GCL_CBWNDEXTRA)))
if (0 <= (wndIndex = wndExtra-sizeof(XosWinWindow*)))
if ((target = (XosWinWindow*)(GetWindowLongPtr(hWnd, wndIndex))))
{
lResult = target->OnWindowMessage(hWnd, msg, wParam, lParam);
return lResult;
}
else
if ((WM_NCCREATE == msg))
{
CREATESTRUCT* cs;
if ((cs = (CREATESTRUCT*)(lParam)))
if ((target = (XosWinWindow*)(cs->lpCreateParams)))
if (sizeof(windowSubclassProc) <= (wndClassExtra = GetClassLong(hWnd, GCL_CBCLSEXTRA)))
if (0 <= (wndClassIndex = wndClassExtra-sizeof(windowSubclassProc)))
if ((windowSubclassProc = (WNDPROC)(GetClassLongPtr(hWnd, wndClassIndex))))
{
SetWindowLongPtr(hWnd, wndIndex, (LONG_PTR)(target));
if (!(target->Attached())) target->Attach(hWnd);
lResult = target->OnWindowMessage(hWnd, msg, wParam, lParam);
return lResult;
}
}
if (sizeof(windowSubclassProc) <= (wndClassExtra = GetClassLong(hWnd, GCL_CBCLSEXTRA)))
if (0 <= (wndClassIndex = wndClassExtra-sizeof(windowSubclassProc)))
windowSubclassProc = (WNDPROC)(GetClassLongPtr(hWnd, wndClassIndex));
if (windowSubclassProc)
lResult = CallWindowProc
(windowSubclassProc, hWnd, msg, wParam, lParam);
else
lResult = DefWindowProc(hWnd, msg, wParam, lParam);
return lResult;
}
开发者ID:medusade,项目名称:mxde,代码行数:55,代码来源:XosWinWindowSuperClass.hpp
示例5: refresh_happiness_bitmap
/**************************************************************************
...
**************************************************************************/
static void refresh_happiness_bitmap(HBITMAP bmp,
struct city *pcity,
enum citizen_feeling index)
{
enum citizen_category citizens[MAX_CITY_SIZE];
RECT rc;
int i;
int num_citizens = get_city_citizen_types(pcity, index, citizens);
int pix_width = HAPPINESS_PIX_WIDTH * tileset_small_sprite_width(tileset);
int offset = MIN(tileset_small_sprite_width(tileset), pix_width / num_citizens);
/* int true_pix_width = (num_citizens - 1) * offset + tileset_small_sprite_width(tileset); */
HDC hdc = CreateCompatibleDC(NULL);
HBITMAP old=SelectObject(hdc,bmp);
rc.left=0;
rc.top=0;
rc.right=pix_width;
rc.bottom=tileset_small_sprite_height(tileset);
FillRect(hdc,&rc,(HBRUSH)GetClassLong(root_window,GCL_HBRBACKGROUND));
for (i = 0; i < num_citizens; i++) {
draw_sprite(get_citizen_sprite(tileset, citizens[i], i, pcity),
hdc, i * offset, 0);
}
SelectObject(hdc,old);
DeleteDC(hdc);
}
开发者ID:zielmicha,项目名称:freeciv-mirror,代码行数:31,代码来源:happiness.c
示例6: SetClassLong
int CAnsiWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CWnd::OnCreate(lpCreateStruct) == -1)
return -1;
SetClassLong(GetSafeHwnd(), GCL_STYLE, GetClassLong(GetSafeHwnd(), GCL_STYLE)-CS_VREDRAW);
while ( m_strList.GetCount () < pDoc->m_nScrollSize )
m_strList.AddTail("");
// Init colors
m_nCurrentBg = 0;
m_nCurrentFg =7;
//===================================================================================================================
((CMainFrame*)AfxGetMainWnd())->m_editBar.GetDlgItem(IDC_EDIT)->SetFont(&pDoc->m_fntText);
CRect rect;
GetClientRect(&rect);
// To init screen dimentions in characters !!!
SetScrollSettings();
return 0;
}
开发者ID:chenwei600,项目名称:jmc,代码行数:26,代码来源:AnsiWnd.cpp
示例7: sys_directx_set_close_button_callback
/* sys_directx_set_close_button_callback:
* Sets the close button callback function.
*/
static int sys_directx_set_close_button_callback(void (*proc)(void))
{
DWORD class_style;
HMENU sys_menu;
HWND allegro_wnd = win_get_window();
user_close_proc = proc;
/* get the old class style */
class_style = GetClassLong(allegro_wnd, GCL_STYLE);
/* and the system menu handle */
sys_menu = GetSystemMenu(allegro_wnd, FALSE);
/* enable or disable the no_close_button flag and the close menu option */
if (proc) {
class_style &= ~CS_NOCLOSE;
EnableMenuItem(sys_menu, SC_CLOSE, MF_BYCOMMAND | MF_ENABLED);
}
else {
class_style |= CS_NOCLOSE;
EnableMenuItem(sys_menu, SC_CLOSE, MF_BYCOMMAND | MF_GRAYED);
}
/* change the class to the new style */
SetClassLong(allegro_wnd, GCL_STYLE, class_style);
/* Redraw the whole window to display the changes of the button.
* (we use this because UpdateWindow() only works for the client area)
*/
RedrawWindow(allegro_wnd, NULL, NULL, RDW_FRAME | RDW_INVALIDATE | RDW_UPDATENOW);
return 0;
}
开发者ID:dodamn,项目名称:pkg-allegro4.2,代码行数:37,代码来源:wsystem.c
示例8: __declspec
extern "C" __declspec(dllexport) LRESULT CALLBACK PoeWndProc(int nCode, WPARAM wParam, LPARAM lParam) {
PCWPSTRUCT msg = (PCWPSTRUCT)lParam;
if (origCursor == 0) {
origCursor = (HCURSOR)GetClassLong(msg->hwnd,GCL_HCURSOR);
}
if (nCode < 0) {
return CallNextHookEx(NULL,nCode,wParam,lParam);
}
if (msg->message == windowMessage) {
// time to do magic and stuff.
numPulses = 0;
currentCursor = 0;
SetClassLong(msg->hwnd, GCL_HCURSOR,(LONG)cursors[currentCursor]);
SetCursor(cursors[currentCursor]);
SetTimer(msg->hwnd,PULSE_TIMER,100,TimerProc);
return TRUE;
}
return CallNextHookEx(NULL,nCode,wParam,lParam);
}
开发者ID:AaronOpfer,项目名称:PoEPulse,代码行数:27,代码来源:main.cpp
示例9: SetClassLong
int CAnsiWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CWnd::OnCreate(lpCreateStruct) == -1)
return -1;
SetClassLong(GetSafeHwnd(), GCL_STYLE, GetClassLong(GetSafeHwnd(), GCL_STYLE)-CS_VREDRAW);
while ( m_strList.GetCount () < nScrollSize )
m_strList.AddTail("");
m_TotalLinesReceived = 0;
// Init colors
m_nCurrentBg = 0;
m_nCurrentFg =7;
//===================================================================================================================
CRect rect;
GetClientRect(&rect);
// To init screen dimentions in characters !!!
SetScrollSettings();
return 0;
}
开发者ID:konelav,项目名称:jmc,代码行数:26,代码来源:AnsiWnd.cpp
示例10: GetClassLong
BOOL CDetailCustomDlg::OnInitDialog()
{
CPropertyPage::OnInitDialog();
DWORD style = GetClassLong(m_lstOptions, GCL_STYLE);
SetClassLong(m_lstOptions, GCL_STYLE, style & ~CS_DBLCLKS);
IcqContact *contact = ((CViewDetailDlg *) GetParent())->contact;
bitset<NR_CONTACT_FLAGS> &f = contact->flags;
for (int id = IDS_OPTION_FIRST; id <= IDS_OPTION_LAST; id++) {
CString str;
str.LoadString(id);
int i = m_lstOptions.AddString(str);
m_lstOptions.SetCheck(i, f.test(i));
}
CheckDlgButton(IDC_CUSTOM_SOUND, contact->flags.test(CF_CUSTOMSOUND));
enableGreeting();
OnCustomSound();
m_cmbSound.SetCurSel(curSel);
for (int i = 0; i < NR_CUSTOM_SOUNDS; i++)
soundFiles[i] = contact->soundFiles[i].c_str();
SetDlgItemText(IDC_FILE, soundFiles[curSel]);
SetDlgItemText(IDC_GREETING, contact->greeting.c_str());
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:bugou,项目名称:test,代码行数:28,代码来源:DetailCustomDlg.cpp
示例11: GetClassLong
///////////////////////////////////////////////////////////////////////
/// Function: DialogWindow
///
/// Author: $author$
/// Date: 1/29/2012
///////////////////////////////////////////////////////////////////////
static XosWinDialogWindow* DialogWindow
(HWND hWnd,
UINT msg,
WPARAM wParam,
LPARAM lParam)
{
int wndExtra = GetClassLong(hWnd, GCL_CBWNDEXTRA);
if (wndExtra < XosWinDialogWindowClass::WindowExtra())
return 0;
int wndExtraOffset = XosWinDialogWindowClass::WindowExtraOffset();
XosWinDialogWindow* dialogWindow = (XosWinDialogWindow*)
(GetWindowLongPtr(hWnd, wndExtraOffset));
switch(msg)
{
case WM_INITDIALOG:
SetWindowLongPtr(hWnd, wndExtraOffset, lParam);
if ((dialogWindow = (XosWinDialogWindow*)(lParam)))
dialogWindow->Attach(hWnd);
break;
case WM_DESTROY:
SetWindowLongPtr(hWnd, wndExtraOffset, 0);
break;
}
return dialogWindow;
}
开发者ID:medusade,项目名称:mxde,代码行数:37,代码来源:XosWinDialogWindow.hpp
示例12: ShowNotifyIcon
VOID ShowNotifyIcon(HWND hWnd, BOOL bAdd)
{
NOTIFYICONDATA nid;
ZeroMemory(&nid,sizeof(nid));
nid.cbSize=sizeof(NOTIFYICONDATA);
nid.hWnd=hWnd;
nid.uID=0;
nid.uFlags=NIF_ICON | NIF_MESSAGE | NIF_TIP;
nid.uCallbackMessage=WM_TRAYMESSAGE;
nid.hIcon = (HICON)GetClassLong(hWnd, GCL_HICONSM);
nid.uVersion = 0;
GetWindowText(hWnd, nid.szTip, sizeof(nid.szTip));
wcscat_s(nid.szTip, sizeof(nid.szTip), L"\nDouble-click to maximize");
if(bAdd)
{
for(int i = 0; i < 60; i++)
{
if(Shell_NotifyIcon(NIM_ADD, &nid))
break;
Sleep(1000);
}
}
else
Shell_NotifyIcon(NIM_DELETE, &nid);
}
开发者ID:dhirallin,项目名称:PlayMailer,代码行数:27,代码来源:MinimizeToTray.cpp
示例13: GetClassLong
//---------------------------------------------------------------------------
TColCombo::TColCombo(HANDLE Par,bool Tabstop,HFONT fnt)
{
VNumItems=0;for (int n=0;n<MAX_CC_ITEMS;n++)VItem[n]=NULL;
VVisible=0;VLeft=0;VTop=0;VWidth=100;VHeight=200;
VBoxGap=0;VBoxSurround=2;VBoxWidth=25;
VParent=Par;
for (VId=50000;VId<100000;VId++)if (GetDlgItem(VParent,VId)==NULL) break;
Font=fnt;if (Font==NULL)Font=(HFONT)SendMessage(VParent,WM_GETFONT,0,0);
VHandle=CreateWindowEx(0,"COMBOBOX","",
CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_OWNERDRAWFIXED |
WS_BORDER | (Tabstop==true ? WS_TABSTOP:0) | WS_CHILDWINDOW | WS_VSCROLL
,VLeft,VTop,VWidth,VHeight,
VParent,(HANDLE) VId,(HANDLE) GetClassLong(VParent,GCL_HMODULE),0);
if (IsWindow(VHandle)==0){VHandle=NULL;return;}
SendMessage(VHandle,WM_SETFONT,(WPARAM)Font,0);
HANDLE tempdc=CreateCompatibleDC(0);
HANDLE oldfnt=SelectObject(tempdc,Font);
SIZE sz;GetTextExtentPoint32(tempdc,"HjTTLMjpq",strlen("HjTTLMjpq"),&sz);
SelectObject(tempdc,oldfnt);
DeleteDC(tempdc);
FontHeight=sz.cy;VItemHeight=FontHeight;VSelItemHeight=FontHeight+2;
SendMessage(VHandle,CB_SETITEMHEIGHT,-1,VSelItemHeight);
SendMessage(VHandle,CB_SETITEMHEIGHT,0,VItemHeight);
}
开发者ID:TheRelentless,项目名称:steem-engine,代码行数:29,代码来源:colcombo.cpp
示例14: LoadBitmap
/* ボタンコントロール作成 */
HWND ButtonControl::CreateButton(
LPCWSTR lpszText,
LPRECT lpRect,
HWND hWndParent, // 親ウィンドウまたはオーナーウィンドウのハンドル
HMENU hMenu, // メニューハンドルまたは子ウィンドウ ID
HINSTANCE hInstance, // アプリケーションインスタンスのハンドル
int nNorm, // ノーマルのときのリソースビットマップID
int nSel, // 押したときのリソースビットマップID
int nHover, // ホバーのときのリソースビットマップID
int nDis // ディセーブルのときのリソースビットマップID
)
{
m_hBmpNorm = LoadBitmap(hInstance, MAKEINTRESOURCE(nNorm));
m_hBmpSel = LoadBitmap(hInstance, MAKEINTRESOURCE(nSel));
m_hBmpHover = LoadBitmap(hInstance, MAKEINTRESOURCE(nHover));
m_hBmpDis = LoadBitmap(hInstance, MAKEINTRESOURCE(nDis));
m_nWidth = lpRect->right - lpRect->left;
m_nHeight = lpRect->bottom - lpRect->top;
const HWND hWnd = CreateWindowEx(0, L"BUTTON", lpszText, WS_CHILD | WS_VISIBLE | BS_OWNERDRAW, lpRect->left, lpRect->top, m_nWidth, m_nHeight, hWndParent, hMenu, hInstance, NULL);
if (!hWnd) return NULL;
SetClassLong(hWnd, GCL_STYLE, GetClassLong(hWnd, GCL_STYLE) & ~CS_DBLCLKS);
SetProp(hWnd, SZCECOWIZBUTTONPROC, this); // ウィンドウハンドルのプロパテにオブジェクトのポインタを関連付ける
m_DefBtnProc = (WNDPROC)SetWindowLong(hWnd, GWL_WNDPROC, (LONG)GlobalButtonProc);
return hWnd;
}
开发者ID:kenjinote,项目名称:CalcPlus,代码行数:26,代码来源:ButtonControl.cpp
示例15: GetWindowLong
BOOL CSonicSkin::Attach(HWND hWnd)
{
m_hWnd = hWnd;
if(g_UI.Attach(hWnd, this) == FALSE)
{
return FALSE;
}
// erase NC rect
DWORD dwStyle = GetWindowLong(hWnd, GWL_STYLE);
DWORD dwClsStyle = GetClassLong(hWnd, GCL_STYLE);
DWORD dwExStyle = GetWindowLong(hWnd, GWL_EXSTYLE);
SetClassLong(hWnd, GCL_STYLE, dwClsStyle | CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS);
SetWindowLong(hWnd, GWL_STYLE, (dwStyle & ~WS_CAPTION & ~DS_MODALFRAME & ~DS_3DLOOK & ~DS_FIXEDSYS & ~DS_SETFONT) | WS_CLIPCHILDREN);
SetWindowLong(hWnd, GWL_EXSTYLE, (dwExStyle & ~WS_EX_DLGMODALFRAME));
SetWindowPos(hWnd, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER | SWP_DRAWFRAME | SWP_NOCOPYBITS);
// initialize
if(m_bg.pText->IsValid() == FALSE)
{
TCHAR szText[256];
GetWindowText(m_hWnd, szText, Tsizeof(szText));
m_bg.pText->Format(_T("%s"), szText);
}
else
{
SetWindowText(m_hWnd, m_bg.pText->GetTextWithoutCtrl());
}
CRect rtClient;
GetClientRect(m_hWnd, &rtClient);
m_pPaint->Create(FALSE, rtClient.Width(), rtClient.Height(), m_hWnd);
return TRUE;
}
开发者ID:kevinzhwl,项目名称:nxuiengine,代码行数:35,代码来源:SonicSkin.cpp
示例16: FillRect
void
DoubleBuffer::EraseBackground()
{
HBRUSH backgroundbrush = (HBRUSH)GetClassLong(m_hwnd, GCLP_HBRBACKGROUND);
FillRect(m_buffer.m_hmemdc, &m_buffer.m_rect, backgroundbrush);
}
开发者ID:ArsalanYaqoob,项目名称:sqlyog-community,代码行数:7,代码来源:DoubleBuffer.cpp
示例17: get_icon
static HICON
get_icon(HWND hwnd, int large)
{
HICON icon;
if (!SendMessageTimeout(hwnd, WM_GETICON, large ? ICON_BIG : ICON_SMALL,
0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR) & icon))
return NULL;
if (icon)
return icon;
/*
* Modern versions of Windows uses the voodoo value of 2 instead of 0
* for the small icons.
*/
if (!large)
{
if (!SendMessageTimeout(hwnd, WM_GETICON, 2,
0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR) & icon))
return NULL;
}
if (icon)
return icon;
icon = (HICON) GetClassLong(hwnd, large ? GCL_HICON : GCL_HICONSM);
if (icon)
return icon;
return NULL;
}
开发者ID:Oyatsumi,项目名称:ulteo4Kode4kids,代码行数:33,代码来源:hookdll.c
示例18: SetClassLong
BOOL CSkinDlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
//产生阴影
SetClassLong(this->m_hWnd, GCL_STYLE, GetClassLong(this->m_hWnd, GCL_STYLE) | CS_DROPSHADOW);
// 设置此对话框的图标。 当应用程序主窗口不是对话框时,框架将自动
// 执行此操作
SetIcon(m_hIcon, TRUE); // 设置大图标
SetIcon(m_hIcon, FALSE); // 设置小图标
// TODO: 在此添加额外的初始化代码
m_btnOK.Load(IDB_Button, 86);
m_btnCancel.Load(IDB_Button, 86);
m_btnClose.Load(IDB_Close, 39);
m_btnClose.SetAutoSize(FALSE);
m_btnMini.Load(IDB_Mini, 28);
m_btnMini.SetAutoSize(FALSE);
CRect rcEdit;
m_edt1.GetWindowRect(&rcEdit);
ScreenToClient(&rcEdit);
m_edt1.MoveWindow(rcEdit.left, rcEdit.top, rcEdit.Width(), rcEdit.Height() + 1);
m_edt1.MoveWindow(rcEdit.left, rcEdit.top, rcEdit.Width(), rcEdit.Height() - 1);
// m_Edit1 不设置其他属性,让它保持类默认,一切属性都是在类中初始化好了的
m_edt1.SetWindowText(_T("没有雅黑你怎么办呢?"));
return TRUE; // 除非将焦点设置到控件,否则返回 TRUE
}
开发者ID:HoCheung1993,项目名称:Jovi-s-Software,代码行数:27,代码来源:SkinDlgDlg.cpp
示例19: SetClassLong
int CSmcView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
SetClassLong(GetSafeHwnd(), GCL_STYLE, GetClassLong(GetSafeHwnd(), GCL_STYLE)-CS_VREDRAW);
return 0;
}
开发者ID:chenwei600,项目名称:jmc,代码行数:8,代码来源:smcView.cpp
示例20: GetExtra
//读取数据
void GetExtra( HWND hWnd )
{
long nClass = GetClassLong( hWnd, 196 );
long nWnd = GetWindowLong( hWnd, 0 );
char szText[256] = { 0 };
sprintf( szText, "窗口类:%s,窗口:%d", (char*)nClass, nWnd );
MessageBox( hWnd, szText, "Infor", MB_OK );
}
开发者ID:isongbo,项目名称:MyCode,代码行数:9,代码来源:WinCreate.cpp
注:本文中的GetClassLong函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论