本文整理汇总了C++中LPARAM函数的典型用法代码示例。如果您正苦于以下问题:C++ LPARAM函数的具体用法?C++ LPARAM怎么用?C++ LPARAM使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LPARAM函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: LPGENT
int TwitterProto::OnOptionsInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.position = 271828;
odp.hInstance = g_hInstance;
odp.ptszGroup = LPGENT("Network");
odp.ptszTitle = m_tszUserName;
odp.dwInitParam = LPARAM(this);
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.ptszTab = LPGENT("Basic");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
odp.pfnDlgProc = options_proc;
Options_AddPage(wParam, &odp);
if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
odp.ptszTab = LPGENT("Popups");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_POPUPS);
odp.pfnDlgProc = popup_options_proc;
Options_AddPage(wParam, &odp);
}
return 0;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:23,代码来源:proto.cpp
示例2: FindButton
LRESULT CNSToolbar2::OnToolbarButtonSizeChanged(WPARAM wParam, LPARAM lParam)
{
HWND hWnd = (HWND) lParam;
CToolbarButton *pButton = (CToolbarButton*)CWnd::FromHandle(hWnd);
int nButtonIndex = FindButton(pButton);
if(nButtonIndex != -1)
{
if(CheckMaxButtonSizeChanged(pButton, TRUE) || CheckMaxButtonSizeChanged(pButton, FALSE))
{
ChangeButtonSizes();
LayoutButtons(-1);
GetParentFrame()->RecalcLayout();
GetParent()->SendMessage(CASTUINT(TOOLBAR_WIDTH_CHANGED), 0, LPARAM(m_hWnd));
}
}
return 1;
}
开发者ID:vicamo,项目名称:b2g_mozilla-central,代码行数:23,代码来源:toolbar2.cpp
示例3: DlgProc
BOOL CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_CLOSE:
DestroyWindow(hDlg);
return TRUE;
case WM_COMMAND:
{
int Id = LOWORD(wParam);
switch (Id)
{
case IDC_BUTTON1:
{
TCHAR buff[10];
GetDlgItemText(hDlg, IDC_EDIT1, buff, 10);
x1 = _wtoi(buff);
GetDlgItemText(hDlg, IDC_EDIT2, buff, 10);
y1 = _wtoi(buff);
GetDlgItemText(hDlg, IDC_EDIT3, buff, 10);
x2 = _wtoi(buff);
GetDlgItemText(hDlg, IDC_EDIT4, buff, 10);
y2 = _wtoi(buff);
SetWindowText(::hWnd, L"Draw...");
SendMessage(::hWnd, 1998, WPARAM(NULL), LPARAM(NULL));
}
return TRUE;
}
}
}
return FALSE;
}
开发者ID:haiirost,项目名称:DrawButton,代码行数:37,代码来源:DrawButton.cpp
示例4: LoadIcon
HWND CULMDIChildWnd::Create(TCHAR* szWindowName,
int x,
int y,
int cx,
int cy,
short IconID,
HWND hClientWnd,
short BGColor,
DWORD dwChildStyle)
{
m_hParentWnd=hClientWnd;
WNDCLASS wc;
wc.style = 0;
wc.lpfnWndProc = (WNDPROC) WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = ULOther::ULGetResourceHandle();
wc.hIcon = LoadIcon(wc.hInstance,MAKEINTRESOURCE(IconID));
wc.hCursor = LoadCursor( NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH) BGColor;
wc.lpszMenuName = NULL;
#ifndef UNICODE
wc.lpszClassName = "ULCHILDWND";
#else
wc.lpszClassName = L"ULCHILDWND";
#endif//UNICODE
RegisterClass(&wc);
m_hWnd=CreateMDIWindow(wc.lpszClassName,szWindowName,dwChildStyle,
x,y,cx,cy,hClientWnd,ULOther::ULGetResourceHandle(),LPARAM(this));
return m_hWnd;
}
开发者ID:piroxiljin,项目名称:ullib,代码行数:36,代码来源:ULMDIChildWnd.cpp
示例5: LPARAM
int CVkProto::OnOptionsInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = hInst;
odp.ptszTitle = m_tszUserName;
odp.dwInitParam = LPARAM(this);
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE;
odp.ptszGroup = LPGENT("Network");
odp.ptszTab = LPGENT("Account");
odp.position = 1;
odp.pDialog = new CVkOptionAccountForm(this);
Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("Advanced");
odp.position = 2;
odp.pDialog = new CVkOptionAdvancedForm(this);
Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("News and notifications");
odp.position = 3;
odp.pDialog = new CVkOptionFeedsForm(this);
Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("View");
odp.position = 4;
odp.pDialog = new CVkOptionViewForm(this);
Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("Menu");
odp.position = 5;
odp.pDialog = new CVkOptionMenuForm(this);
Options_AddPage(wParam, &odp);
return 0;
}
开发者ID:wyrover,项目名称:miranda-ng,代码行数:36,代码来源:vk_options.cpp
示例6: CtrlFileYes
static int CtrlFileYes(char *NameF) //Проверка наличия файла
{
int ret;
if(CtrlFileYesNo(NameF) == 0) return 0; //Файла нет - Проверка наличия файла
if(prCopy == 0)
ret = DialogBoxParam(MainInst, MAKEINTRESOURCE(IDD_DLG_FILE_YES),
MainWin, Dlg_FileYes, LPARAM(NameF));
switch(prCopy) //Признак действия при групповом копировании
{ case 0: break;
case 1: ret = IDOK; break; //Нажата кнопка Заменять все
case 2: ret = Comp_TimeF(); break; //Нажата кнопка Заменять старые
case 3: ret = IDC_SCIP; break; //Нажата кнопка Пропускать все
case 4: return Mk_NewName(NameF); //Нажата кнопка Переименовывать автоматически
}
switch (ret)
{ case IDCANCEL: *NameF = 0; return -1; //Отмена режима копирования
case IDC_SCIP: *NameF = 0; return -2; //Нажата кнопка пропустить
case IDC_RENAME: return 1; //Нажата кнопка Переименование
case IDOK: //Нажата кнопка Заменить
if(DeleteFile(NameF) != 0) return 0;
return ErrorSys2((Lan+56)->msg, NameF); //"Ошибка при удалении файла"
}
return -1;
}
开发者ID:mpapierski,项目名称:from-hdd-lg-to-pc,代码行数:24,代码来源:hdd_lg_func_io_1.cpp
示例7: MySystemProc
void MySystemProc(HWND hWnd)
{
// HICON hIcon;
HWINSTA winStationhWnd;
winStationhWnd = GetProcessWindowStation(); //Get Current Process Window Handle
EnumDesktops(winStationhWnd, EnumDesktopProc, NULL);
i = desktopList.begin();
while (i != desktopList.end()) {
if (wcscmp(*i, TEXT("Winlogon")) && wcscmp(*i, TEXT("Disconnect"))) {
HDESK desktopHwnd = OpenDesktop(*i, 0, FALSE, GENERIC_ALL);
EnumDesktopWindows(desktopHwnd, EnumWindowsProc, LPARAM(desktopHwnd));
}
i++;
}
BuildToolbar(1);
CreateSimpleToolbar();
}
开发者ID:akhildabral,项目名称:AppGrabber,代码行数:24,代码来源:taskBarApp.cpp
示例8: setCheck
void TresizePage::resize2dlg(void)
{
__asm emms;
setCheck(IDC_CHB_RESIZE,cfgGet(IDFF_isResize));
char pomS[256];
SendDlgItemMessage(m_hwnd,IDC_ED_RESIZEDX,WM_SETTEXT,0,LPARAM(_itoa(cfgGet(IDFF_resizeDx),pomS,10)));
SendDlgItemMessage(m_hwnd,IDC_ED_RESIZEDY,WM_SETTEXT,0,LPARAM(_itoa(cfgGet(IDFF_resizeDy),pomS,10)));
sprintf(pomS,"Luma gaussian blur: %3.2f" ,float(cfgGet(IDFF_resizeGblurLum )/100.0));
SendDlgItemMessage(m_hwnd,IDC_LBL_RESIZE_GBLUR_LUM ,WM_SETTEXT,0,LPARAM(pomS));
sprintf(pomS,"Chroma gaussian blur: %3.2f",float(cfgGet(IDFF_resizeGblurChrom )/100.0));
SendDlgItemMessage(m_hwnd,IDC_LBL_RESIZE_GBLUR_CHROM ,WM_SETTEXT,0,LPARAM(pomS));
sprintf(pomS,"Luma sharpen: %3.2f" ,float(cfgGet(IDFF_resizeSharpenLum )/100.0));
SendDlgItemMessage(m_hwnd,IDC_LBL_RESIZE_SHARPEN_LUM ,WM_SETTEXT,0,LPARAM(pomS));
sprintf(pomS,"Chroma sharpen: %3.2f" ,float(cfgGet(IDFF_resizeSharpenChrom)/100.0));
SendDlgItemMessage(m_hwnd,IDC_LBL_RESIZE_SHARPEN_CHROM,WM_SETTEXT,0,LPARAM(pomS));
SendDlgItemMessage(m_hwnd,IDC_TBR_RESIZE_GBLUR_LUM ,TBM_SETPOS,TRUE,cfgGet(IDFF_resizeGblurLum ));
SendDlgItemMessage(m_hwnd,IDC_TBR_RESIZE_GBLUR_CHROM ,TBM_SETPOS,TRUE,cfgGet(IDFF_resizeGblurChrom ));
SendDlgItemMessage(m_hwnd,IDC_TBR_RESIZE_SHARPEN_LUM ,TBM_SETPOS,TRUE,cfgGet(IDFF_resizeSharpenLum ));
SendDlgItemMessage(m_hwnd,IDC_TBR_RESIZE_SHARPEN_CHROM,TBM_SETPOS,TRUE,cfgGet(IDFF_resizeSharpenChrom));
setCheck(IDC_CHB_RESIZE_FIRST,cfgGet(IDFF_resizeFirst));
SendDlgItemMessage(m_hwnd,IDC_CBX_RESIZE_METHOD,CB_SETCURSEL,cfgGet(IDFF_resizeMethod),0);
}
开发者ID:BackupTheBerlios,项目名称:ffdshow-svn,代码行数:24,代码来源:CresizePage.cpp
示例9: defined
//.........这里部分代码省略.........
}
#endif // _DEBUG
// ... update the handle
if(!pwdPath->FindNextHandle((pThis->m_pHandles)[nSignaledPath+1]))
{
pThis->m_hrError=
HRESULT_FROM_WIN32(::GetLastError());
break;
}
// The extended information is available, but it is not valid
continue;
}
}
while(TRUE)
{
if(pwdPath->m_bExtended)
{
// Extended information is available
memcpy(szFileName,(LPCTSTR)&pfnInfo->FileName[0],
pfnInfo->FileNameLength);
szFileName[pfnInfo->
FileNameLength/sizeof(TCHAR)]=_T('\0');
if(pfnInfo->Action == FILE_ACTION_RENAMED_OLD_NAME)
{
pfnInfo=(FILE_NOTIFY_INFORMATION*)(((char*)pfnInfo)+
pfnInfo->NextEntryOffset);
memcpy(szNewFileName, (LPCTSTR)&pfnInfo->FileName[0],
pfnInfo->FileNameLength);
szNewFileName[pfnInfo->
FileNameLength/sizeof(TCHAR)]=_T('\0');
}
else
{
szNewFileName[0]=_T('\0');
}
pfwnNotifier= new COXFileWatchNotifier(pwdPath->m_sPath,
pwdPath->m_bWatchSubTree,pwdPath->m_dwWatchFilter,
TRUE,pfnInfo->Action,szFileName,szNewFileName);
}
else
#endif // defined(_UNICODE) && (_WIN32_WINNT >= 0x400)
{
// ... there is no extended information
pfwnNotifier= new COXFileWatchNotifier(pwdPath->m_sPath,
pwdPath->m_bWatchSubTree,pwdPath->m_dwWatchFilter,
FALSE,0,NULL,NULL);
}
// Notify the derived class or ...
if(!pThis->OnNotify(*pfwnNotifier) &&
pwdPath->m_hwndWindowToNotify!=NULL)
{
// ... post/send message
UINT nItemIndex=pThis->m_arFileWatchNotifiers.
AddItem(pfwnNotifier);
if(pwdPath->m_bPost)
{
::PostMessage(pwdPath->m_hwndWindowToNotify,
WM_OX_FILE_NOTIFY,nItemIndex,LPARAM(0));
}
else
{
::SendMessage(pwdPath->m_hwndWindowToNotify,
WM_OX_FILE_NOTIFY,nItemIndex,LPARAM(0));
}
}
else
{
// the notifier object is not queued so delete it
delete pfwnNotifier;
}
#if defined(_UNICODE) && (_WIN32_WINNT >= 0x400)
// Extended info is supported
if(!pwdPath->m_bExtended || pfnInfo->NextEntryOffset == 0)
{
break;
}
else
{
// ... go to the next entry in the buffer...
pfnInfo = (FILE_NOTIFY_INFORMATION*)(((char*)pfnInfo)+
pfnInfo->NextEntryOffset);
}
} // while(TRUE);
#endif // defined(_UNICODE) && (_WIN32_WINNT >= 0x400)
// ... update the handle
if(!pwdPath->FindNextHandle((pThis->m_pHandles)[nSignaledPath+1]))
{
pThis->m_hrError = HRESULT_FROM_WIN32(::GetLastError());
break;
}
}
开发者ID:drupalhunter-team,项目名称:TrackMonitor,代码行数:101,代码来源:OXFileWatcher.cpp
示例10: UpdateClientEdge
void CMDIChildWnd::OnMDIActivate(HWND hAct,HWND hDeAct)
{
UpdateClientEdge();
WindowProc(WM_MDIACTIVATE,WPARAM(hAct),LPARAM(hDeAct));
}
开发者ID:eladkarako,项目名称:locate32,代码行数:5,代码来源:WindowClasses.cpp
示例11: Recognizer
/**
This method initializes SAPI and creates the objects used by subclasses,
it does not start the lipsync process.
*/
bool sapi_lipsync::initializeObjects()
{
HRESULT hr = S_OK;
m_err = L"";
try
{
// create the recognizer (inproc)
hr = this->m_recog.CoCreateInstance(CLSID_SpInprocRecognizer);
if (hr != S_OK)
{
m_err = L"Error: Can't create SAPI Speech Recognizer (ISpRecognizer)";
throw (hr);
}
// create the recognition context from the recognizer
hr = this->m_recog->CreateRecoContext(&this->m_recogCntxt);
if (hr != S_OK)
{
m_err = L"Error: Cannot create SAPI Recognition Context (ISpRecoContext)";
throw (hr);
}
hr = m_recogCntxt->SetNotifyCallbackFunction(&this->sapi_callback, 0, LPARAM(this));
if (hr != S_OK)
{
m_err = L"Error: Cannot set notify callback function. (SetNofifyCallbackFunction)";
throw (hr);
}
// initialize and disable the grammar
hr = m_recogCntxt->CreateGrammar(GID_LIPSYNC, &m_grammar);
if (hr != S_OK)
{
m_err = L"Error: Failed to create grammar for lipsync";
throw (hr);
}
// not totally sure here!
hr = m_grammar->SetGrammarState(SPGS_DISABLED); //Let subclasses handle the grammer state
if (hr != S_OK)
{
m_err = L"Error: Failed to disable the grammar.";
throw (hr);
}
// need a phoneme converter to map SPHONEID into phoneme strings
hr = SpCreatePhoneConverter(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
NULL, NULL, &this->m_phnCvt);
if (hr != S_OK)
{
m_err = L"Error: Failed create phoneme converter";
throw (hr);
}
// Set interest level for events, we want all events, just in case.
hr = m_recogCntxt->SetInterest(ullInterest, ullInterest);
if (hr != S_OK)
{
m_err = L"Error: Cannot correctly set notifications for the Speech Recognizer";
throw(hr);
}
// turn off recognizer while we initialize things. HMMM
//m_recog->SetRecoState(SPRST_INACTIVE);
}
catch (HRESULT& _hr)
{
hr = _hr;
}
return (hr == S_OK);
}
开发者ID:xianyinchen,项目名称:Horde3DGameEngine,代码行数:72,代码来源:sapi_lipsync.cpp
示例12: PostMessage
void CWizardSprayAnalyze::PostLogMessage(const TCHAR* pStr)
{
PostMessage(CWM_STATUSUPDATE, 0, LPARAM(new CString(pStr)));
}
开发者ID:GordonSmith,项目名称:eclide,代码行数:4,代码来源:WizardSprayAnalyze.cpp
示例13: arx_assert
//.........这里部分代码省略.........
info.version.patch = 4;
if(SDL_GetWindowWMInfo(m_window, reinterpret_cast<SDL_SysWMinfo *>(&info))) {
switch(info.subsystem) {
case ARX_SDL_SYSWM_UNKNOWN:
break;
case ARX_SDL_SYSWM_WINDOWS:
system = "Windows";
break;
case ARX_SDL_SYSWM_X11:
system = "X11";
break;
#if SDL_VERSION_ATLEAST(2, 0, 3)
case ARX_SDL_SYSWM_WINRT:
system = "WinRT";
break;
#endif
case ARX_SDL_SYSWM_DIRECTFB:
system = "DirectFB";
break;
case ARX_SDL_SYSWM_COCOA:
system = "Cocoa";
break;
case ARX_SDL_SYSWM_UIKIT:
system = "UIKit";
break;
#if SDL_VERSION_ATLEAST(2, 0, 2)
case ARX_SDL_SYSWM_WAYLAND:
system = "Wayland";
break;
case ARX_SDL_SYSWM_MIR:
system = "Mir";
break;
#endif
#if SDL_VERSION_ATLEAST(2, 0, 4)
case ARX_SDL_SYSWM_ANDROID:
system = "Android";
break;
#endif
}
}
}
int red = 0, green = 0, blue = 0, alpha = 0, depth = 0, doublebuffer = 0;
SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &red);
SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &green);
SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &blue);
SDL_GL_GetAttribute(SDL_GL_ALPHA_SIZE, &alpha);
SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &depth);
SDL_GL_GetAttribute(SDL_GL_DOUBLEBUFFER, &doublebuffer);
LogInfo << "Window: " << system << " r:" << red << " g:" << green << " b:" << blue
<< " a:" << alpha << " depth:" << depth << " aa:" << msaa << "x"
<< " doublebuffer:" << doublebuffer;
break;
}
// Use the executable icon for the window
#if ARX_PLATFORM == ARX_PLATFORM_WIN32
{
SDL_SysWMinfo info;
SDL_VERSION(&info.version);
if(SDL_GetWindowWMInfo(m_window, &info) && info.subsystem == SDL_SYSWM_WINDOWS) {
platform::WideString filename;
filename.allocate(filename.capacity());
while(true) {
DWORD size = GetModuleFileNameW(NULL, filename.data(), filename.size());
if(size < filename.size()) {
filename.resize(size);
break;
}
filename.allocate(filename.size() * 2);
}
HICON largeIcon = 0;
HICON smallIcon = 0;
ExtractIconExW(filename, 0, &largeIcon, &smallIcon, 1);
if(smallIcon) {
SendMessage(info.info.win.window, WM_SETICON, ICON_SMALL, LPARAM(smallIcon));
}
if(largeIcon) {
SendMessage(info.info.win.window, WM_SETICON, ICON_BIG, LPARAM(largeIcon));
}
}
}
#endif
setVSync(m_vsync);
SDL_ShowWindow(m_window);
SDL_ShowCursor(SDL_DISABLE);
m_renderer->initialize();
onCreate();
onToggleFullscreen(m_fullscreen);
updateSize(true);
onShow(true);
onFocus(true);
return true;
}
开发者ID:striezel,项目名称:ArxLibertatis,代码行数:101,代码来源:SDL2Window.cpp
示例14: SendDlgItemMessage
void ToutPage::init(void)
{
SendDlgItemMessage(m_hwnd,IDC_BT_ASPECT,WM_SETFONT,WPARAM(parent->arrowsFont),LPARAM(false));
SendDlgItemMessage(m_hwnd,IDC_BT_FPS,WM_SETFONT,WPARAM(parent->arrowsFont),LPARAM(false));
}
开发者ID:JERUKA9,项目名称:ffdshow-tryouts,代码行数:5,代码来源:Cout.cpp
示例15: qt_win_get_existing_directory
QString qt_win_get_existing_directory(const QFileDialogArgs &args)
{
QString currentDir = QDir::currentPath();
QString result;
QWidget *parent = args.parent;
if (parent)
parent = parent->window();
else
parent = QApplication::activeWindow();
if (parent)
parent->createWinId();
QDialog modal_widget;
modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
modal_widget.setParent(parent, Qt::Window);
QApplicationPrivate::enterModal(&modal_widget);
QString initDir = QDir::toNativeSeparators(args.directory);
wchar_t path[MAX_PATH];
wchar_t initPath[MAX_PATH];
initPath[0] = 0;
path[0] = 0;
tTitle = args.caption;
#if !defined(Q_WS_WINCE)
BROWSEINFO bi;
#else
qt_BROWSEINFO bi;
#endif
Q_ASSERT(!parent ||parent->testAttribute(Qt::WA_WState_Created));
bi.hwndOwner = (parent ? parent->winId() : 0);
bi.pidlRoot = NULL;
//### This does not seem to be respected? - the dialog always displays "Browse for folder"
bi.lpszTitle = (wchar_t*)tTitle.utf16();
bi.pszDisplayName = initPath;
bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT | BIF_NEWDIALOGSTYLE;
bi.lpfn = winGetExistDirCallbackProc;
bi.lParam = LPARAM(&initDir);
qt_win_resolve_libs();
if (ptrSHBrowseForFolder) {
LPITEMIDLIST pItemIDList = ptrSHBrowseForFolder((BROWSEINFO*)&bi);
if (pItemIDList) {
ptrSHGetPathFromIDList(pItemIDList, path);
IMalloc *pMalloc;
if (ptrSHGetMalloc(&pMalloc) == NOERROR) {
pMalloc->Free(pItemIDList);
pMalloc->Release();
result = QString::fromWCharArray(path);
}
}
}
tTitle = QString();
QApplicationPrivate::leaveModal(&modal_widget);
qt_win_eatMouseMove();
if (!result.isEmpty())
result.replace(QLatin1Char('\\'), QLatin1Char('/'));
return result;
}
开发者ID:Nacto1,项目名称:qt-everywhere-opensource-src-4.6.2,代码行数:63,代码来源:qfiledialog_win.cpp
示例16: sizeof
void MainWindow::CreateMainWindow()
{
OSVERSIONINFO osvi = {0};
NONCLIENTMETRICS ncm = {0};
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&osvi);
if(osvi.dwMajorVersion < 6)
ncm.cbSize = sizeof(NONCLIENTMETRICS) - 4;
else
ncm.cbSize = sizeof(NONCLIENTMETRICS);
SystemParametersInfo(SPI_GETNONCLIENTMETRICS,ncm.cbSize,&ncm,0);
m_hFontNormal = CreateFontIndirect(&ncm.lfMessageFont);
m_hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
SetMenu(m_hwnd,LoadMenu(GetModuleHandle(NULL),L"WCCMenu"));
m_hLoadProj = CreateWindow(L"Button",L"Open projection data...",
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | BS_FLAT | CCS_ADJUSTABLE,
10, 10,
200, 23,
m_hwnd,
(HMENU)ID_LOAD_PROJ,
NULL, 0);
SendMessage(m_hLoadProj, WM_SETFONT, (WPARAM)m_hFontNormal, MAKELPARAM(TRUE,0));
m_hCurrentFolder = CreateWindow(L"Static", L"No projection data selected",
WS_CHILD | WS_VISIBLE,
220, 15,
200, 15,
m_hwnd,
NULL, NULL, 0);
SendMessage(m_hCurrentFolder, WM_SETFONT, (WPARAM)m_hFontNormal, MAKELPARAM(TRUE,0));
m_hReconSettings = CreateWindow(L"Button",
L"Reconstruction settings:",
WS_CHILD | WS_VISIBLE | BS_GROUPBOX,
10, 250,
200, 285,
m_hwnd,
NULL, NULL, 0);
SendMessage(m_hReconSettings, WM_SETFONT, (WPARAM)m_hFontNormal, MAKELPARAM(TRUE,0));
for(int i=0;i<3;i++)
{
m_hDimensions[i] = CreateWindowEx(WS_EX_CLIENTEDGE,
L"Edit",
L"",
WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_LEFT,
120, 268+30*i,
40, 23,
m_hwnd,
(HMENU)ID_RECON_DIM,
NULL, 0);
SendMessage(m_hDimensions[i], WM_SETFONT, (WPARAM)m_hFontNormal, MAKELPARAM(TRUE,0));
SendMessage(m_hDimensions[i], EM_SETLIMITTEXT, (WPARAM)4, NULL);
}
m_hReconText[0] = CreateWindow(L"Static",
L"X/Y Pixels:",
WS_CHILD | WS_VISIBLE,
19, 271,
85, 15,
m_hwnd,
NULL, NULL, 0);
m_hReconText[1] = CreateWindow(L"Static",
L"Z Slices:",
WS_CHILD | WS_VISIBLE,
19, 301,
85, 15,
m_hwnd,
NULL, NULL, 0);
m_hReconText[2] = CreateWindow(L"Static",
L"Resolution (mm):",
WS_CHILD | WS_VISIBLE,
19, 331,
100, 15,
m_hwnd,
NULL, NULL, 0);
m_hReconText[3] = CreateWindow(L"Static",
L"Filter:",
WS_CHILD | WS_VISIBLE,
19, 363,
50, 15,
m_hwnd,
NULL, NULL, 0);
m_hReconText[4] = CreateWindow(L"Static",
L"Cutoff:",
WS_CHILD | WS_VISIBLE,
19, 409,
50, 15,
m_hwnd,
NULL, NULL, 0);
//.........这里部分代码省略.........
开发者ID:JStrydhorst,项目名称:win-cone-ct,代码行数:101,代码来源:win_cone_ct.cpp
示例17: switch
int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam)
{
GCHOOK *gch = (GCHOOK*)lParam;
if (!gch)
return 1;
if (_stricmp(gch->pDest->pszModule, m_szModuleName)) return 0;
switch (gch->pDest->iType) {
case GC_SESSION_TERMINATE:
{
GCThreadData* thread = MSN_GetThreadByChatId(gch->pDest->ptszID);
if (thread != NULL) {
m_arGCThreads.remove(thread);
for (int i = 0; i < thread->mJoinedContacts.getCount(); i++)
delete thread->mJoinedContacts[i];
delete thread;
}
}
break;
case GC_USER_MESSAGE:
if (gch->ptszText && gch->ptszText[0]) {
GCThreadData* thread = MSN_GetThreadByChatId(gch->pDest->ptszID);
if (thread) {
TCHAR* pszMsg = UnEscapeChatTags(NEWTSTR_ALLOCA(gch->ptszText));
rtrimt(pszMsg); // remove the ending linebreak
msnNsThread->sendMessage('N', thread->szEmail, thread->netId, UTF8(pszMsg), 0);
DBVARIANT dbv;
int bError = getTString("Nick", &dbv);
GCDEST gcd = { m_szModuleName, gch->pDest->ptszID, GC_EVENT_MESSAGE };
GCEVENT gce = { sizeof(gce), &gcd };
gce.dwFlags = GCEF_ADDTOLOG;
gce.ptszNick = bError ? _T("") : dbv.ptszVal;
gce.ptszUID = mir_a2t(MyOptions.szEmail);
gce.time = time(NULL);
gce.ptszText = gch->ptszText;
gce.bIsMe = TRUE;
CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
mir_free((void*)gce.ptszUID);
if (!bError)
db_free(&dbv);
}
}
break;
case GC_USER_CHANMGR:
DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_CHATROOM_INVITE), NULL, DlgInviteToChat,
LPARAM(new InviteChatParam(gch->pDest->ptszID, NULL, this)));
break;
case GC_USER_PRIVMESS:
{
char *email = mir_t2a(gch->ptszUID);
MCONTACT hContact = MSN_HContactFromEmail(email);
CallService(MS_MSG_SENDMESSAGE, hContact, 0);
mir_free(email);
}
break;
case GC_USER_LOGMENU:
switch (gch->dwData) {
case 10:
DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_CHATROOM_INVITE), NULL, DlgInviteToChat,
LPARAM(new InviteChatParam(gch->pDest->ptszID, NULL, this)));
break;
case 20:
MSN_KillChatSession(gch->pDest->ptszID);
break;
}
break;
case GC_USER_NICKLISTMENU:
MCONTACT hContact = MSN_HContactFromEmail(_T2A(gch->ptszUID));
switch (gch->dwData) {
case 10:
CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
break;
case 20:
CallService(MS_HISTORY_SHOWCONTACTHISTORY, hContact, 0);
break;
case 30:
MSN_Kickuser(gch);
break;
case 110:
MSN_KillChatSession(gch->pDest->ptszID);
break;
case 40:
const TCHAR *pszRole = MSN_GCGetRole(MSN_GetThreadByChatId(gch->pDest->ptszID), _T2A(gch->ptszUID));
MSN_Promoteuser(gch, (pszRole && !mir_tstrcmp(pszRole, _T("admin"))) ? "user" : "admin");
break;
//.........这里部分代码省略.........
开发者ID:Seldom,项目名称:miranda-ng,代码行数:101,代码来源:msn_chat.cpp
示例18: InitListDTrunk
void InitListDTrunk(void)
{
LV_COLUMN lvc;
DWORD dwExStyle;
_ASSERT(pdlg != NULL);
dwExStyle = LVS_EX_FULLROWSELECT | /*LVS_EX_GRIDLINES | LVS_EX_SUBITEMIMAGES |*/
LVS_EX_HEADERDRAGDROP;// | LVS_EX_TRACKSELECT;
pdlg->m_ListDTrunk.SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LPARAM(dwExStyle));
lvc.mask = LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
lvc.iSubItem = 0;
lvc.pszText = "ID" ;
lvc.cx = 30;
pdlg->m_ListDTrunk.InsertColumn(0, &lvc);
lvc.iSubItem = 1;
lvc.pszText = "Mod,Ch" ;
lvc.cx = 50;
pdlg->m_ListDTrunk.InsertColumn(1, &lvc);
lvc.iSubItem = 2;
lvc.pszText = "Type" ;
lvc.cx = 60;
pdlg->m_ListDTrunk.InsertColumn(2, &lvc);
lvc.iSubItem = 3;
lvc.pszText = "LineState" ;
lvc.cx = 70;
pdlg->m_ListDTrunk.InsertColumn(3, &lvc);
lvc.iSubItem = 4;
lvc.pszText = "State" ;
lvc.cx = 70;
pdlg->m_ListDTrunk.InsertColumn(4, &lvc);
lvc.iSubItem = 5;
lvc.pszText = "Called" ;
lvc.cx = 60;
pdlg->m_ListDTrunk.InsertColumn(5, &lvc);
lvc.iSubItem = 6;
lvc.pszText = "Calling" ;
lvc.cx = 60;
pdlg->m_ListDTrunk.InsertColumn(6, &lvc);
lvc.iSubItem = 7;
lvc.pszText = "LinkDev" ;
lvc.cx = 60;
pdlg->m_ListDTrunk.InsertColumn(7, &lvc);
lvc.iSubItem = 8;
lvc.pszText = "FailReason" ;
lvc.cx = 75;
pdlg->m_ListDTrunk.InsertColumn(8, &lvc);
lvc.iSubItem = 9;
lvc.pszText = "DTMF";
lvc.cx = 75;
pdlg->m_ListDTrunk.InsertColumn(9, &lvc);
return;
}
开发者ID:liguyu,项目名称:cppexample,代码行数:65,代码来源:DTrunk.cpp
示例19: DialogProc
INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
try
{
switch(uMsg)
{
case WM_INITDIALOG:
{
// Double Check^^ für Registrierung
if (!Registration::IsRegistered())
{
PostQuitMessage(0);
}
/*
Icon vom Fenster setzen
*/
HICON hIcon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_ICON1));
if (!hIcon)
throw (CError("Failed to load Icon", ERRORPOS));
SendMessage(hwndDlg, WM_SETICON, WPARAM (ICON_SMALL), LPARAM (hIcon));
/*
Einige Dialog - Elemente funktionieren nicht ohne die Initialisierung von CommonControls
*/
INITCOMMONCONTROLSEX iccex;
iccex.dwICC = ICC_PROGRESS_CLASS;
iccex.dwSize = sizeof(INITCOMMONCONTROLSEX);
if (!InitCommonControlsEx(&iccex))
throw (CError("InitCommonControlsEx failed", ERRORPOS));
// Global machen
g_hWindow = hwndDlg;
SetDlgItemText(hwndDlg, IDC_VERSION, VERSION);
SetDlgItemText(hwndDlg, IDC_EDIT1, "20");
SetDlgItemText(hwndDlg, IDC_EDIT4, "3.2");
SetDlgItemText(hwndDlg, IDC_EDIT5, "0");
SetDlgItemText(hwndDlg, IDC_EDIT6, "0");
g_pTM2Hack = new CTM2Hack(g_pConsole);
InitConfig();
g_pTM2Hack->SendStatusExtern = &UpdateStatus;
g_pTM2Hack->ProgressUpdateExtern = &ProgressBarControl;
// Fortschrittsbalken einstellen
SendDlgItemMessage(hwndDlg, IDC_PROGRESS1, PBM_SETRANGE, 0, MAKELPARAM(0, g_pTM2Hack->GetAddressVector()->size()));
SendDlgItemMessage(hwndDlg, IDC_PROGRESS1, PBM_SETSTEP, 1, 0);
SendDlgItemMessage(hwndDlg, IDC_HOTKEY1, HKM_SETHOTKEY, MAKEWPARAM(g_pTM2Hack->m_wNoGravityHotkey,0), 0);
SendDlgItemMessage(hwndDlg, IDC_HOTKEY1, HKM_SETRULES, 0xFE /*any modifiers*/, MAKELPARAM(HKCOMB_NONE, 0));
UpdateStatus("Waiting for Maniaplanet");
return TRUE;
}
case WM_COMMAND:
{
int wmId = LOWORD(wParam);
int wmEvent = HIWORD(wParam);
switch (wmId)
{
case IDC_CHECK1: // Meterhack
{
g_pTM2Hack->MeterHack();
break;
}
case IDC_BUTTON2: // CarJump
{
BOOL bReadSuccess = FALSE;
int iHeightValue = GetDlgItemInt(hwndDlg, IDC_EDIT1, &bReadSuccess, true);
if (bReadSuccess == FALSE)
throw (CError("Can not read from edit field", ERRORPOS));
g_pTM2Hack->DoCarJump(iHeightValue);
break;
}
case IDC_CHECK2: // Checkpoint Hack
{
g_pTM2Hack->CheckpointHack();
break;
}
case IDC_CHECK3: // BoostHack
{
g_pTM2Hack->m_BoostHack.BoostHack();
break;
}
case IDC_BUTTON3: // Boost Options
{
INT_PTR iSuccess = DialogBox(g_hInstance, MAKEINTRESOURCE(IDD_DIALOG2), hwndDlg, BoostOptionsDialogProc);
if (iSuccess == -1)
throw (CError("Failed to create DialogBox", ERRORPOS));
break;
}
case IDC_CHECK4: // No Platform Counter
{
g_pTM2Hack->NoPlatformCounterIncrease();
//.........这里部分代码省略.........
开发者ID:copymark,项目名称:TM-Trainer,代码行数:101,代码来源:MainDialogProc.cpp
示例20: DialogBoxParam
INT_PTR CAimProto::JoinChatUI(WPARAM, LPARAM)
{
DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_CHAT), NULL, join_chat_dialog, LPARAM(this));
return 0;
}
开发者ID:truefriend-cz,项目名称:miranda-ng,代码行数:5,代码来源:services.cpp
注:本文中的LPARAM函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论