这篇教程C++ GetPropW函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetPropW函数的典型用法代码示例。如果您正苦于以下问题:C++ GetPropW函数的具体用法?C++ GetPropW怎么用?C++ GetPropW使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetPropW函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: warning_procstatic INT_PTR WINAPI warning_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam){ switch(msg) { case WM_INITDIALOG: { if(!init_warning_dialog(hwnd, (install_ctx_t*)lparam)) EndDialog(hwnd, 0); return TRUE; } case WM_COMMAND: switch(wparam) { case ID_AXINSTALL_INSTALL_BTN: { install_ctx_t *ctx = GetPropW(hwnd, ctxW); if(ctx) ctx->cancel = FALSE; EndDialog(hwnd, 0); return FALSE; } case IDCANCEL: EndDialog(hwnd, 0); return FALSE; } case WM_TIMER: update_counter(GetPropW(hwnd, ctxW), hwnd); return TRUE; } return FALSE;}
开发者ID:Kelimion,项目名称:wine,代码行数:28,
示例2: ThemeDetroyWndContextvoid ThemeDetroyWndContext(HWND hWnd){ PWND_CONTEXT pContext; DWORD ProcessId; /*Do not destroy WND_CONTEXT of a window that belong to another process */ GetWindowThreadProcessId(hWnd, &ProcessId); if(ProcessId != GetCurrentProcessId()) { return; } pContext = (PWND_CONTEXT)GetPropW(hWnd, (LPCWSTR)MAKEINTATOM(atWndContrext)); if(pContext == NULL) { return; } if(pContext->HasThemeRgn) { user32ApiHook.SetWindowRgn(hWnd, 0, TRUE); } HeapFree(GetProcessHeap(), 0, pContext); SetPropW( hWnd, (LPCWSTR)MAKEINTATOM(atWndContrext), NULL);}
开发者ID:RareHare,项目名称:reactos,代码行数:27,
示例3: COMCTL32_SubclassProc/*********************************************************************** * COMCTL32_SubclassProc (internal) * * Window procedure for all subclassed windows. * Saves the current subclassing stack position to support nested messages */static LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam){ LPSUBCLASS_INFO stack; LPSUBCLASSPROCS proc; LRESULT ret; TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)/n", hWnd, uMsg, wParam, lParam); stack = GetPropW (hWnd, COMCTL32_wSubclass); if (!stack) { ERR ("Our sub classing stack got erased for %p!! Nothing we can do/n", hWnd); return 0; } /* Save our old stackpos to properly handle nested messages */ proc = stack->stackpos; stack->stackpos = stack->SubclassProcs; stack->running++; ret = DefSubclassProc(hWnd, uMsg, wParam, lParam); stack->running--; stack->stackpos = proc; if (!stack->SubclassProcs && !stack->running) { TRACE("Last Subclass removed, cleaning up/n"); /* clean up our heap and reset the original window procedure */ if (IsWindowUnicode (hWnd)) SetWindowLongPtrW (hWnd, GWLP_WNDPROC, (DWORD_PTR)stack->origproc); else SetWindowLongPtrA (hWnd, GWLP_WNDPROC, (DWORD_PTR)stack->origproc); Free (stack); RemovePropW( hWnd, COMCTL32_wSubclass ); } return ret;}
开发者ID:DeltaYang,项目名称:wine,代码行数:40,
示例4: DefSubclassProcLRESULT WINAPI DefSubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam){ LPSUBCLASS_INFO stack; LRESULT ret; TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)/n", hWnd, uMsg, wParam, lParam); /* retrieve our little stack from the Properties */ stack = GetPropW (hWnd, COMCTL32_wSubclass); if (!stack) { ERR ("Our sub classing stack got erased for %p!! Nothing we can do/n", hWnd); return 0; } /* If we are at the end of stack then we have to call the original * window procedure */ if (!stack->stackpos) { if (IsWindowUnicode (hWnd)) ret = CallWindowProcW (stack->origproc, hWnd, uMsg, wParam, lParam); else ret = CallWindowProcA (stack->origproc, hWnd, uMsg, wParam, lParam); } else { const SUBCLASSPROCS *proc = stack->stackpos; stack->stackpos = stack->stackpos->next; /* call the Subclass procedure from the stack */ ret = proc->subproc (hWnd, uMsg, wParam, lParam, proc->id, proc->ref); } return ret;}
开发者ID:DeltaYang,项目名称:wine,代码行数:31,
示例5: shell_embedding_procstatic LRESULT WINAPI shell_embedding_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam){ WebBrowser *This; static const WCHAR wszTHIS[] = {'T','H','I','S',0}; if(msg == WM_CREATE) { This = *(WebBrowser**)lParam; SetPropW(hwnd, wszTHIS, This); }else { This = GetPropW(hwnd, wszTHIS); } switch(msg) { case WM_SIZE: return resize_window(This, LOWORD(lParam), HIWORD(lParam)); case WM_DOCHOSTTASK: return process_dochost_tasks(&This->doc_host); case WM_SETFOCUS: notify_on_focus(This, TRUE); break; case WM_KILLFOCUS: notify_on_focus(This, FALSE); break; } return DefWindowProcW(hwnd, msg, wParam, lParam);}
开发者ID:Moteesh,项目名称:reactos,代码行数:28,
示例6: LLabel_OnPaintstatic void LLabel_OnPaint(HWND hwnd){ PAINTSTRUCT ps; RECT rc; int state; HFONT hFont; int style = DT_SINGLELINE | DT_VCENTER; BeginPaint(hwnd, &ps); GetClientRect(hwnd, &rc); state = SaveDC(ps.hdc); SetBkMode(ps.hdc, TRANSPARENT); hFont = CreateFontIndirectW((LPLOGFONTW)GetWindowLongPtrW(hwnd, 4)); SelectFont(ps.hdc, hFont); SetTextColor(ps.hdc, RGB(0, 0, 255)); if(IsWindowUnicode(hwnd)){ if(GetPropW(hwnd, LL_ALIGNW)) style |= DT_RIGHT; else style |= DT_LEFT; DrawTextW(ps.hdc, (wchar_t *)GetWindowLongPtrW(hwnd, 0), -1, &rc, style); } else{ if(GetProp(hwnd, LL_ALIGN)) style |= DT_RIGHT; else style |= DT_LEFT; DrawText(ps.hdc, (char *)GetWindowLongPtr(hwnd, 0), -1, &rc, style); } RestoreDC(ps.hdc, state); DeleteFont(hFont); EndPaint(hwnd, &ps);}
开发者ID:mju-oss-13-a,项目名称:team5-NoteMaster,代码行数:33,
示例7: SetLLTextWstatic void SetLLTextW(HWND hwnd, wchar_t * lpText){ wchar_t * pText; SIZE sz; HDC hdc; int state; HFONT hFont; RECT rc; GetWindowRect(hwnd, &rc); MapWindowPoints(HWND_DESKTOP, GetParent(hwnd), (LPPOINT)&rc, 2); pText = (wchar_t *)GetWindowLongPtrW(hwnd, 0); if(pText) free(pText); pText = (wchar_t *)calloc(wcslen(lpText) + 2, sizeof(wchar_t)); wcscpy(pText, lpText); SetWindowLongPtrW(hwnd, 0, (LONG_PTR)pText); hdc = GetDC(hwnd); state = SaveDC(hdc); hFont = CreateFontIndirectW((LPLOGFONTW)GetWindowLongPtrW(hwnd, 4)); SelectFont(hdc, hFont); GetTextExtentPoint32W(hdc, lpText, wcslen(lpText) + 1, &sz); RestoreDC(hdc, state); ReleaseDC(hwnd, hdc); DeleteFont(hFont); if(GetPropW(hwnd, LL_ALIGNW)) SetWindowPos(hwnd, 0, rc.right - sz.cx, rc.top, sz.cx, sz.cy, SWP_SHOWWINDOW); else SetWindowPos(hwnd, 0, 0, 0, sz.cx, sz.cy, SWP_NOMOVE | SWP_SHOWWINDOW);}
开发者ID:mju-oss-13-a,项目名称:team5-NoteMaster,代码行数:29,
示例8: ColorDlgProc/*********************************************************************** * ColorDlgProc32 [internal] * */static INT_PTR CALLBACK ColorDlgProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ){ int res; LPCCPRIV lpp = GetPropW( hDlg, szColourDialogProp ); if (message != WM_INITDIALOG) { if (!lpp) return FALSE; res = 0; if (CC_HookCallChk(lpp->lpcc)) res = CallWindowProcA( (WNDPROC)lpp->lpcc->lpfnHook, hDlg, message, wParam, lParam); if ( res ) return res; } /* FIXME: SetRGB message if (message && message == msetrgb) return HandleSetRGB(hDlg, lParam); */ switch (message) { case WM_INITDIALOG: return CC_WMInitDialog(hDlg, wParam, lParam); case WM_NCDESTROY: DeleteDC(lpp->hdcMem); DeleteObject(lpp->hbmMem); HeapFree(GetProcessHeap(), 0, lpp); RemovePropW( hDlg, szColourDialogProp ); break; case WM_COMMAND: if (CC_WMCommand( hDlg, wParam, lParam, HIWORD(wParam), (HWND) lParam)) return TRUE; break; case WM_PAINT: if (CC_WMPaint(hDlg)) return TRUE; break; case WM_LBUTTONDBLCLK: if (CC_MouseCheckResultWindow(hDlg, lParam)) return TRUE; break; case WM_MOUSEMOVE: if (CC_WMMouseMove(hDlg, lParam)) return TRUE; break; case WM_LBUTTONUP: /* FIXME: ClipCursor off (if in color graph)*/ if (CC_WMLButtonUp(hDlg)) return TRUE; break; case WM_LBUTTONDOWN:/* FIXME: ClipCursor on (if in color graph)*/ if (CC_WMLButtonDown(hDlg, lParam)) return TRUE; break; } return FALSE ;}
开发者ID:RareHare,项目名称:reactos,代码行数:64,
示例9: HostWndProcstatic LRESULT HostWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){ WNDPROC fnOldProc; fnOldProc = (WNDPROC)GetPropW(hwnd, WNDPROP_SCCTRLW); if (!fnOldProc) return DefWindowProcW(hwnd, uMsg, wParam, lParam); switch (uMsg) { case WM_NCDESTROY: // detach RemovePropW(hwnd, WNDPROP_SCCTRLW); CallWindowProcW(fnOldProc, hwnd, uMsg, wParam, lParam); SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (LONG_PTR)fnOldProc); return 0; case WM_ERASEBKGND: if (wParam) { RECT rc; if (GetClientRect(hwnd, &rc)) { SetBkColor((HDC)wParam, ml_color(WADLG_WNDBG)); ExtTextOutW((HDC)wParam, 0, 0, ETO_OPAQUE, &rc, L"", 0, 0); } } return 1; case WM_SETFOCUS: if (htmlControl) { htmlControl->setFocus(TRUE); return 0; } break; } return CallWindowProcW(fnOldProc, hwnd, uMsg, wParam, lParam);}
开发者ID:ZeroTheSavior,项目名称:remotecontrol-for-winamp,代码行数:34,
示例10: CC_SwitchToFullSize/*********************************************************************** * CC_SwitchToFullSize [internal] */static void CC_SwitchToFullSize( HWND hDlg, COLORREF result, LPCRECT lprect ){ int i; LPCCPRIV lpp = GetPropW( hDlg, szColourDialogProp ); EnableWindow( GetDlgItem(hDlg, 0x2cf), FALSE); CC_PrepareColorGraph(hDlg); for (i = 0x2bf; i < 0x2c5; i++) ShowWindow( GetDlgItem(hDlg, i), SW_SHOW); for (i = 0x2d3; i < 0x2d9; i++) ShowWindow( GetDlgItem(hDlg, i), SW_SHOW); ShowWindow( GetDlgItem(hDlg, 0x2c9), SW_SHOW); ShowWindow( GetDlgItem(hDlg, 0x2c8), SW_SHOW); ShowWindow( GetDlgItem(hDlg, 1090), SW_SHOW); if (lprect) SetWindowPos(hDlg, 0, 0, 0, lprect->right-lprect->left, lprect->bottom-lprect->top, SWP_NOMOVE|SWP_NOZORDER); ShowWindow( GetDlgItem(hDlg, 0x2be), SW_SHOW); ShowWindow( GetDlgItem(hDlg, 0x2c5), SW_SHOW); CC_EditSetRGB(hDlg, result); CC_EditSetHSL(hDlg, lpp->h, lpp->s, lpp->l); ShowWindow( GetDlgItem( hDlg, 0x2c6), SW_SHOW); UpdateWindow( GetDlgItem(hDlg, 0x2c6) );}
开发者ID:RareHare,项目名称:reactos,代码行数:30,
示例11: nsembed_procstatic LRESULT WINAPI nsembed_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam){ NSContainer *This; nsresult nsres; static const WCHAR wszTHIS[] = {'T','H','I','S',0}; if(msg == WM_CREATE) { This = *(NSContainer**)lParam; SetPropW(hwnd, wszTHIS, This); }else { This = (NSContainer*)GetPropW(hwnd, wszTHIS); } switch(msg) { case WM_SIZE: TRACE("(%p)->(WM_SIZE)/n", This); nsres = nsIBaseWindow_SetSize(This->window, LOWORD(lParam), HIWORD(lParam), TRUE); if(NS_FAILED(nsres)) WARN("SetSize failed: %08lx/n", nsres); } return DefWindowProcW(hwnd, msg, wParam, lParam);}
开发者ID:howard5888,项目名称:wineT,代码行数:26,
示例12: GetWindowSubclassBOOL WINAPI GetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uID, DWORD_PTR *pdwRef){ const SUBCLASS_INFO *stack; const SUBCLASSPROCS *proc; TRACE ("(%p, %p, %lx, %p)/n", hWnd, pfnSubclass, uID, pdwRef); /* See if we have been called for this window */ stack = GetPropW (hWnd, COMCTL32_wSubclass); if (!stack) return FALSE; proc = stack->SubclassProcs; while (proc) { if ((proc->id == uID) && (proc->subproc == pfnSubclass)) { *pdwRef = proc->ref; return TRUE; } proc = proc->next; } return FALSE;}
开发者ID:DeltaYang,项目名称:wine,代码行数:25,
示例13: CC_WMMouseMove/*********************************************************************** * CC_WMMouseMove [internal] */static LRESULT CC_WMMouseMove( HWND hDlg, LPARAM lParam ){ LPCCPRIV lpp = GetPropW( hDlg, szColourDialogProp ); int r, g, b; if (lpp->capturedGraph) { int *ptrh = NULL, *ptrs = &lpp->l; if (lpp->capturedGraph == 0x2c6) { ptrh = &lpp->h; ptrs = &lpp->s; } if (CC_MouseCheckColorGraph( hDlg, lpp->capturedGraph, ptrh, ptrs, lParam)) { r = CC_HSLtoRGB('R', lpp->h, lpp->s, lpp->l); g = CC_HSLtoRGB('G', lpp->h, lpp->s, lpp->l); b = CC_HSLtoRGB('B', lpp->h, lpp->s, lpp->l); lpp->lpcc->rgbResult = RGB(r, g, b); CC_EditSetRGB(hDlg, lpp->lpcc->rgbResult); CC_EditSetHSL(hDlg,lpp->h, lpp->s, lpp->l); CC_PaintCross(hDlg, lpp->h, lpp->s); CC_PaintTriangle(hDlg, lpp->l); CC_PaintSelectedColor(hDlg, lpp->lpcc->rgbResult); } else { ReleaseCapture(); lpp->capturedGraph = 0; } return 1; } return 0;}
开发者ID:RareHare,项目名称:reactos,代码行数:37,
示例14: load_desktop_driverstatic HMODULE load_desktop_driver( HWND hwnd ){ static const WCHAR display_device_guid_propW[] = { '_','_','w','i','n','e','_','d','i','s','p','l','a','y','_', 'd','e','v','i','c','e','_','g','u','i','d',0 }; static const WCHAR key_pathW[] = { 'S','y','s','t','e','m','//', 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','//', 'C','o','n','t','r','o','l','//', 'V','i','d','e','o','//','{',0}; static const WCHAR displayW[] = {'}','//','0','0','0','0',0}; static const WCHAR driverW[] = {'G','r','a','p','h','i','c','s','D','r','i','v','e','r',0}; HMODULE ret = 0; HKEY hkey; DWORD size; WCHAR path[MAX_PATH]; WCHAR key[(sizeof(key_pathW) + sizeof(displayW)) / sizeof(WCHAR) + 40]; UINT guid_atom = HandleToULong( GetPropW( hwnd, display_device_guid_propW )); USER_CheckNotLock(); strcpy( driver_load_error, "The explorer process failed to start." ); /* default error */ if (!guid_atom) { SendMessageW( hwnd, WM_NULL, 0, 0 ); /* wait for the desktop process to be ready */ guid_atom = HandleToULong( GetPropW( hwnd, display_device_guid_propW )); } memcpy( key, key_pathW, sizeof(key_pathW) ); if (!GlobalGetAtomNameW( guid_atom, key + strlenW(key), 40 )) return 0; strcatW( key, displayW ); if (RegOpenKeyW( HKEY_LOCAL_MACHINE, key, &hkey )) return 0; size = sizeof(path); if (!RegQueryValueExW( hkey, driverW, NULL, NULL, (BYTE *)path, &size )) { if (!(ret = LoadLibraryW( path ))) ERR( "failed to load %s/n", debugstr_w(path) ); TRACE( "%s %p/n", debugstr_w(path), ret ); } else { size = sizeof(driver_load_error); RegQueryValueExA( hkey, "DriverError", NULL, NULL, (BYTE *)driver_load_error, &size ); } RegCloseKey( hkey ); return ret;}
开发者ID:mstefani,项目名称:wine-stable,代码行数:46,
示例15: CC_WMLButtonUp/*********************************************************************** * CC_WMLButtonUp [internal] */LRESULT CC_WMLButtonUp( HWND hDlg, WPARAM wParam, LPARAM lParam ){ LPCCPRIV lpp = (LPCCPRIV) GetPropW( hDlg, szColourDialogProp ); if (lpp->capturedGraph) { lpp->capturedGraph = 0; ReleaseCapture(); CC_PaintCross(hDlg, lpp->h, lpp->s); return 1; } return 0;}
开发者ID:WASSUM,项目名称:longene_travel,代码行数:15,
示例16: UPDOWN_Buddy_SubclassProc/*********************************************************************** * UPDOWN_Buddy_SubclassProc used to handle messages sent to the buddy * control. */static LRESULT CALLBACKUPDOWN_Buddy_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){ WNDPROC superClassWndProc = (WNDPROC)GetPropW(hwnd, BUDDY_SUPERCLASS_WNDPROC); TRACE("hwnd=%p, wndProc=%p, uMsg=%04x, wParam=%08lx, lParam=%08lx/n", hwnd, superClassWndProc, uMsg, wParam, lParam); if (uMsg == WM_KEYDOWN) { HWND upDownHwnd = GetPropW(hwnd, BUDDY_UPDOWN_HWND); UPDOWN_KeyPressed(UPDOWN_GetInfoPtr(upDownHwnd), (int)wParam); } else if (uMsg == WM_MOUSEWHEEL) { HWND upDownHwnd = GetPropW(hwnd, BUDDY_UPDOWN_HWND); UPDOWN_MouseWheel(UPDOWN_GetInfoPtr(upDownHwnd), (int)wParam); } return CallWindowProcW( superClassWndProc, hwnd, uMsg, wParam, lParam);}
开发者ID:devyn,项目名称:wine,代码行数:25,
示例17: CC_WMLButtonUp/*********************************************************************** * CC_WMLButtonUp [internal] */static LRESULT CC_WMLButtonUp( HWND hDlg ){ LPCCPRIV lpp = GetPropW( hDlg, szColourDialogProp ); if (lpp->capturedGraph) { lpp->capturedGraph = 0; ReleaseCapture(); CC_PaintCross(hDlg, lpp->h, lpp->s); return 1; } return 0;}
开发者ID:RareHare,项目名称:reactos,代码行数:16,
示例18: BrsFolderDlgProc/************************************************************************* * BrsFolderDlgProc32 (not an exported API function) */static INT_PTR CALLBACK BrsFolderDlgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ){ browse_info *info; TRACE("hwnd=%p msg=%04x 0x%08lx 0x%08lx/n", hWnd, msg, wParam, lParam ); if (msg == WM_INITDIALOG) return BrsFolder_OnCreate( hWnd, (browse_info*) lParam ); info = (browse_info*) GetPropW( hWnd, szBrowseFolderInfo ); switch (msg) { case WM_NOTIFY: return BrsFolder_OnNotify( info, (UINT)wParam, (LPNMHDR)lParam); case WM_COMMAND: return BrsFolder_OnCommand( info, wParam ); case BFFM_SETSTATUSTEXTA: TRACE("Set status %s/n", debugstr_a((LPSTR)lParam)); SetWindowTextA(GetDlgItem(hWnd, IDD_STATUS), (LPSTR)lParam); break; case BFFM_SETSTATUSTEXTW: TRACE("Set status %s/n", debugstr_w((LPWSTR)lParam)); SetWindowTextW(GetDlgItem(hWnd, IDD_STATUS), (LPWSTR)lParam); break; case BFFM_ENABLEOK: TRACE("Enable %ld/n", lParam); EnableWindow(GetDlgItem(hWnd, 1), (lParam)?TRUE:FALSE); break; case BFFM_SETOKTEXT: /* unicode only */ TRACE("Set OK text %s/n", debugstr_w((LPWSTR)wParam)); SetWindowTextW(GetDlgItem(hWnd, 1), (LPWSTR)wParam); break; case BFFM_SETSELECTIONA: return BrsFolder_OnSetSelectionA(info, (LPVOID)lParam, (BOOL)wParam); case BFFM_SETSELECTIONW: return BrsFolder_OnSetSelectionW(info, (LPVOID)lParam, (BOOL)wParam); case BFFM_SETEXPANDED: /* unicode only */ return BrsFolder_OnSetExpanded(info, (LPVOID)lParam, (BOOL)wParam, NULL); } return FALSE;}
开发者ID:HBelusca,项目名称:NasuTek-Odyssey,代码行数:54,
示例19: CC_WMLButtonDown/*********************************************************************** * CC_WMLButtonDown [internal] */static LRESULT CC_WMLButtonDown( HWND hDlg, LPARAM lParam ){ LPCCPRIV lpp = GetPropW( hDlg, szColourDialogProp ); int r, g, b, i; i = 0; if (CC_MouseCheckPredefColorArray(lpp, hDlg, 0x2d0, 6, 8, lParam)) i = 1; else if (CC_MouseCheckUserColorArray(lpp, hDlg, 0x2d1, 2, 8, lParam)) i = 1; else if (CC_MouseCheckColorGraph(hDlg, 0x2c6, &lpp->h, &lpp->s, lParam)) { i = 2; lpp->capturedGraph = 0x2c6; } else if (CC_MouseCheckColorGraph(hDlg, 0x2be, NULL, &lpp->l, lParam)) { i = 2; lpp->capturedGraph = 0x2be; } if ( i == 2 ) { SetCapture(hDlg); r = CC_HSLtoRGB('R', lpp->h, lpp->s, lpp->l); g = CC_HSLtoRGB('G', lpp->h, lpp->s, lpp->l); b = CC_HSLtoRGB('B', lpp->h, lpp->s, lpp->l); lpp->lpcc->rgbResult = RGB(r, g, b); } if ( i == 1 ) { r = GetRValue(lpp->lpcc->rgbResult); g = GetGValue(lpp->lpcc->rgbResult); b = GetBValue(lpp->lpcc->rgbResult); lpp->h = CC_RGBtoHSL('H', r, g, b); lpp->s = CC_RGBtoHSL('S', r, g, b); lpp->l = CC_RGBtoHSL('L', r, g, b); } if (i) { CC_EditSetRGB(hDlg, lpp->lpcc->rgbResult); CC_EditSetHSL(hDlg,lpp->h, lpp->s, lpp->l); CC_PaintCross(hDlg, lpp->h, lpp->s); CC_PaintTriangle(hDlg, lpp->l); CC_PaintSelectedColor(hDlg, lpp->lpcc->rgbResult); return TRUE; } return FALSE;}
开发者ID:RareHare,项目名称:reactos,代码行数:54,
示例20: _replaceOncestatic void _replaceOnce(HWND hwnd){ int index1, index2, count; HWND hEdit = (HWND)GetPropW(hwnd, EDIT_PROP); PSUGGESTION ps; count = SendDlgItemMessageW(hwnd, IDC_LST_MISPRINTS, LB_GETCOUNT, 0, 0); index1 = SendDlgItemMessageW(hwnd, IDC_LST_MISPRINTS, LB_GETCURSEL, 0, 0); index2 = SendDlgItemMessageW(hwnd, IDC_LST_SUGGESTIONS, LB_GETCURSEL, 0, 0); if(index1 == LB_ERR || index2 == LB_ERR) return; ps = (PSUGGESTION)SendDlgItemMessageW(hwnd, IDC_LST_MISPRINTS, LB_GETITEMDATA, index1, 0); _replaceInEdit(hwnd, hEdit, ps, index1, index2, count); _removeEntry(hwnd, index1, count);}
开发者ID:lunakid,项目名称:PNotesz,代码行数:14,
示例21: GetPropA/* * @implemented */HANDLE WINAPIGetPropA(HWND hWnd, LPCSTR lpString){ PWSTR lpWString; UNICODE_STRING UString; HANDLE Ret; if (HIWORD(lpString)) { RtlCreateUnicodeStringFromAsciiz(&UString, (LPSTR)lpString); lpWString = UString.Buffer; if (lpWString == NULL) { return(FALSE); } Ret = GetPropW(hWnd, lpWString); RtlFreeUnicodeString(&UString); } else { Ret = GetPropW(hWnd, (LPWSTR)lpString); } return(Ret);}
开发者ID:RPG-7,项目名称:reactos,代码行数:26,
示例22: RemoveWindowSubclassBOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uID){ LPSUBCLASS_INFO stack; LPSUBCLASSPROCS prevproc = NULL; LPSUBCLASSPROCS proc; BOOL ret = FALSE; TRACE ("(%p, %p, %lx)/n", hWnd, pfnSubclass, uID); /* Find the Subclass to remove */ stack = GetPropW (hWnd, COMCTL32_wSubclass); if (!stack) return FALSE; proc = stack->SubclassProcs; while (proc) { if ((proc->id == uID) && (proc->subproc == pfnSubclass)) { if (!prevproc) stack->SubclassProcs = proc->next; else prevproc->next = proc->next; if (stack->stackpos == proc) stack->stackpos = stack->stackpos->next; Free (proc); ret = TRUE; break; } prevproc = proc; proc = proc->next; } if (!stack->SubclassProcs && !stack->running) { TRACE("Last Subclass removed, cleaning up/n"); /* clean up our heap and reset the original window procedure */ if (IsWindowUnicode (hWnd)) SetWindowLongPtrW (hWnd, GWLP_WNDPROC, (DWORD_PTR)stack->origproc); else SetWindowLongPtrA (hWnd, GWLP_WNDPROC, (DWORD_PTR)stack->origproc); Free (stack); RemovePropW( hWnd, COMCTL32_wSubclass ); } return ret;}
开发者ID:DeltaYang,项目名称:wine,代码行数:48,
示例23: serverwnd_procstatic LRESULT WINAPI serverwnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam){ HTMLDocumentObj *This; static const WCHAR wszTHIS[] = {'T','H','I','S',0}; if(msg == WM_CREATE) { This = *(HTMLDocumentObj**)lParam; SetPropW(hwnd, wszTHIS, This); }else { This = GetPropW(hwnd, wszTHIS); } switch(msg) { case WM_CREATE: This->hwnd = hwnd; break; case WM_PAINT: paint_document(This); break; case WM_SIZE: TRACE("(%p)->(WM_SIZE)/n", This); if(This->nscontainer) { INT ew=0, eh=0; if(!(This->hostinfo.dwFlags & (DOCHOSTUIFLAG_NO3DOUTERBORDER|DOCHOSTUIFLAG_NO3DBORDER))) { ew = GetSystemMetrics(SM_CXEDGE); eh = GetSystemMetrics(SM_CYEDGE); } SetWindowPos(This->nscontainer->hwnd, NULL, ew, eh, LOWORD(lParam) - 2*ew, HIWORD(lParam) - 2*eh, SWP_NOZORDER | SWP_NOACTIVATE); } break; case WM_TIMER: return on_timer(This); case WM_SETFOCUS: TRACE("(%p) WM_SETFOCUS/n", This); nsIWebBrowserFocus_Activate(This->nscontainer->focus); break; case WM_MOUSEACTIVATE: return MA_ACTIVATE; } return DefWindowProcW(hwnd, msg, wParam, lParam);}
开发者ID:pstrealer,项目名称:wine,代码行数:47,
示例24: FontFamilyEnumProc16/*********************************************************************** * FontFamilyEnumProc (COMMDLG.19) */INT16 WINAPI FontFamilyEnumProc16( SEGPTR logfont, SEGPTR metrics, UINT16 nFontType, LPARAM lParam ){ HWND hwnd=HWND_32(LOWORD(lParam)); HWND hDlg=GetParent(hwnd); LPCHOOSEFONT16 lpcf; LOGFONT16 *lplf = MapSL( logfont ); TEXTMETRIC16 *lpmtrx16 = MapSL(metrics); ENUMLOGFONTEXW elf32w; NEWTEXTMETRICEXW nmtrx32w; lpcf = (LPCHOOSEFONT16)GetPropW(hDlg, strWineFontData16); FONT_LogFont16To32W(lplf, &(elf32w.elfLogFont)); FONT_Metrics16To32W(lpmtrx16, &nmtrx32w); return AddFontFamily(&elf32w, &nmtrx32w, nFontType, (LPCHOOSEFONTW)lpcf->lpTemplateName, hwnd,NULL);}
开发者ID:howard5888,项目名称:wineT,代码行数:20,
|