本文整理汇总了C++中CheckDlgButton函数的典型用法代码示例。如果您正苦于以下问题:C++ CheckDlgButton函数的具体用法?C++ CheckDlgButton怎么用?C++ CheckDlgButton使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CheckDlgButton函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: IEViewEmoticonsOptDlgProc
static BOOL CALLBACK IEViewEmoticonsOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
int i;
BOOL bChecked;
char path[MAX_PATH];
switch (msg) {
case WM_INITDIALOG:
{
char *path;
TranslateDialogDefault(hwndDlg);
SendDlgItemMessage(hwndDlg, IDC_SMILEYS_PREVIEW, BM_SETIMAGE, IMAGE_ICON, (LPARAM) smileyIcon);
bChecked = FALSE;
i = Options::getSmileyFlags();
if (i&Options::SMILEY_ENABLED) {
bChecked = TRUE;
CheckDlgButton(hwndDlg, IDC_SMILEYS, TRUE);
}
EnableWindow(GetDlgItem(hwndDlg, IDC_SMILEYS_FILENAME), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSE_SMILEYS), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_ISOLATED_SMILEYS), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_SURROUND_SMILEYS), bChecked);
// EnableWindow(GetDlgItem(hwndDlg, IDC_REPLACE_SMILEYADD), bChecked);
if (Options::getSmileyFlags() & Options::SMILEY_PROTOCOLS) {
CheckDlgButton(hwndDlg, IDC_PROTO_SMILEYS, TRUE);
} else {
bChecked = FALSE;
}
EnableWindow(GetDlgItem(hwndDlg, IDC_PROTOLIST), bChecked);
if (i&Options::SMILEY_ISOLATED) {
CheckDlgButton(hwndDlg, IDC_ISOLATED_SMILEYS, TRUE);
}
if (i&Options::SMILEY_SURROUND) {
CheckDlgButton(hwndDlg, IDC_SURROUND_SMILEYS, TRUE);
}
// if (i&Options::SMILEY_SMILEYADD) {
// CheckDlgButton(hwndDlg, IDC_REPLACE_SMILEYADD, TRUE);
// }
PROTOCOLDESCRIPTOR **protoList;
int protoCount;
CallService(MS_PROTO_ENUMPROTOCOLS, (WPARAM)&protoCount, (LPARAM)&protoList);
protoNames = new char[protoCount+1][128];
protoFilenames = new char[protoCount+1][MAX_PATH];
protoNum = 0;
for (i = 0; i < protoCount+1; i++) {
char * protocolName;
char protoName[128];
char displayName[256];
if (i==0) {
strcpy(protoNames[protoNum], "");
protocolName = "Standard";
} else if (protoList[i-1]->type == PROTOTYPE_PROTOCOL) {
strcpy(protoNames[protoNum], protoList[i-1]->szName);
CallProtoService(protoList[i-1]->szName, PS_GETNAME, sizeof(protoName), (LPARAM)protoName);
protocolName = protoName;//protoList[i-1]->szName;
} else {
continue;
}
strcpy(displayName, protocolName);
strcat(displayName, " smileys");
path = (char *) Options::getSmileyFile(protoNames[protoNum]);
if (path != NULL) {
strcpy (protoFilenames[protoNum], path);
} else {
strcpy (protoFilenames[protoNum], "");
}
SendDlgItemMessage(hwndDlg, IDC_PROTOLIST, LB_ADDSTRING, 0, (LPARAM)displayName);
protoNum++;
}
SendDlgItemMessage(hwndDlg, IDC_PROTOLIST, LB_SETCURSEL, 0, 0);
SetDlgItemText(hwndDlg, IDC_SMILEYS_FILENAME, protoFilenames[0]);
lastProtoItem = 0;
return TRUE;
}
case WM_COMMAND:
{
switch (LOWORD(wParam)) {
case IDC_SMILEYS_FILENAME:
if ((HWND)lParam==GetFocus() && HIWORD(wParam)==EN_CHANGE)
SendMessage(GetParent(GetParent(hwndDlg)), PSM_CHANGED, 0, 0);
break;
case IDC_SMILEYS_PREVIEW:
{
int iItem = SendDlgItemMessage(hwndDlg, IDC_PROTOLIST, LB_GETCURSEL, 0, 0);
GetDlgItemText(hwndDlg, IDC_SMILEYS_FILENAME, path, sizeof(path));
if (SmileyMap::loadLibrary("IEVIewPreview", path)) {
SmileyMap *map = SmileyMap::getSmileyMap("IEVIewPreview");
if (map!=NULL) {
RECT rc;
GetWindowRect(GetDlgItem(hwndDlg, IDC_SMILEYS_PREVIEW), &rc);
map->getWindow()->show(NULL, 0, 0, rc.left, rc.bottom);
}
} else {
SetDlgItemText(hwndDlg, IDC_SMILEYS_FILENAME, protoFilenames[iItem]);
}
}
break;
case IDC_ISOLATED_SMILEYS:
case IDC_SURROUND_SMILEYS:
// case IDC_REPLACE_SMILEYADD:
SendMessage(GetParent(GetParent(hwndDlg)), PSM_CHANGED, 0, 0);
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:mgoodies-svn,代码行数:101,代码来源:Options.cpp
示例2: AddCheatCallB
//.........这里部分代码省略.........
case VK_END:
SendMessage(hwndDlg, WM_VSCROLL, SB_BOTTOM, 0);
break;
}
return(-2);
}
break;
case WM_CLOSE:
case WM_QUIT:
goto gornk;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case 300: /* List box selection changed. */
if (HIWORD(wParam) == LBN_SELCHANGE) {
char *s;
uint32 a;
uint8 v;
int status;
int c, type;
selcheat = SendDlgItemMessage(hwndDlg, 300, LB_GETCURSEL, 0, (LPARAM)(LPSTR)0);
if (selcheat < 0) {
FixCheatSelButtons(hwndDlg, 0);
break;
}
FixCheatSelButtons(hwndDlg, 1);
FCEUI_GetCheat(selcheat, &s, &a, &v, &c, &status, &type);
SetDlgItemText(hwndDlg, 200, (LPTSTR)s);
SetDlgItemText(hwndDlg, 201, (LPTSTR)U16ToStr(a));
SetDlgItemText(hwndDlg, 202, (LPTSTR)U8ToStr(v));
SetDlgItemText(hwndDlg, 203, (c == -1) ? (LPTSTR)"" : (LPTSTR)IToStr(c));
CheckDlgButton(hwndDlg, 204, type ? BST_CHECKED : BST_UNCHECKED);
}
break;
case 108:
switch (HIWORD(wParam)) {
case LBN_SELCHANGE:
{
char TempArray[32];
SendDlgItemMessage(hwndDlg, 108, LB_GETTEXT, SendDlgItemMessage(hwndDlg, 108, LB_GETCURSEL, 0, (LPARAM)(LPSTR)0), (LPARAM)(LPCTSTR)TempArray);
TempArray[4] = 0;
SetDlgItemText(hwndDlg, 201, (LPTSTR)TempArray);
}
break;
case LBN_SETFOCUS:
lbfocus = 1;
break;
case LBN_KILLFOCUS:
lbfocus = 0;
break;
}
break;
}
switch (HIWORD(wParam)) {
case LBN_DBLCLK:
if (selcheat >= 0) {
if (LOWORD(wParam) == 300)
FCEUI_ToggleCheat(selcheat);
RedoCheatsLB(hwndDlg);
SendDlgItemMessage(hwndDlg, 300, LB_SETCURSEL, selcheat, 0);
}
break;
开发者ID:garbear,项目名称:fceu-next,代码行数:66,代码来源:cheat.c
示例3: GbaSlotCFlash
INT_PTR CALLBACK GbaSlotCFlash(HWND dialog, UINT msg,WPARAM wparam,LPARAM lparam)
{
switch(msg)
{
case WM_INITDIALOG:
{
switch (tmp_CFlashMode)
{
case ADDON_CFLASH_MODE_Path:
SetFocus(GetDlgItem(dialog,IDC_RFOLDER));
CheckDlgButton(dialog, IDC_RFOLDER, BST_CHECKED);
EnableWindow(GetDlgItem(dialog, IDC_PATH), TRUE);
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE2), TRUE);
EnableWindow(GetDlgItem(dialog, IDC_PATHIMG), FALSE);
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE), FALSE);
if (strlen(tmp_cflash_path)) _OKbutton = TRUE;
break;
case ADDON_CFLASH_MODE_File:
SetFocus(GetDlgItem(dialog,IDC_RFILE));
CheckDlgButton(dialog, IDC_RFILE, BST_CHECKED);
EnableWindow(GetDlgItem(dialog, IDC_PATHIMG), TRUE);
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE), TRUE);
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE2), FALSE);
EnableWindow(GetDlgItem(dialog, IDC_PATH), FALSE);
if (strlen(tmp_cflash_filename)) _OKbutton = TRUE;
break;
case ADDON_CFLASH_MODE_RomPath:
SetFocus(GetDlgItem(dialog,IDC_PATHDESMUME));
CheckDlgButton(dialog, IDC_PATHDESMUME, BST_CHECKED);
EnableWindow(GetDlgItem(dialog, IDC_PATH), FALSE);
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE2), FALSE);
EnableWindow(GetDlgItem(dialog, IDC_PATHIMG), FALSE);
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE), FALSE);
_OKbutton = TRUE;
break;
}
SetWindowText(GetDlgItem(dialog, IDC_PATHIMG), tmp_cflash_filename);
SetWindowText(GetDlgItem(dialog, IDC_PATH), tmp_cflash_path);
return FALSE;
}
case WM_COMMAND:
{
switch (LOWORD(wparam))
{
case IDC_BBROWSE:
{
int filterSize = 0, i = 0;
OPENFILENAME ofn;
char filename[MAX_PATH] = "";
ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = dialog;
const char *fileFilter = "Compact Flash image (*.img)\0*.img\0Any file (*.*)\0*.*\0";
ofn.lpstrFilter = fileFilter;
ofn.nFilterIndex = 1;
ofn.lpstrFile = filename;
ofn.nMaxFile = MAX_PATH;
ofn.lpstrDefExt = "img";
ofn.Flags = OFN_NOCHANGEDIR | OFN_CREATEPROMPT | OFN_PATHMUSTEXIST;
if(!GetOpenFileName(&ofn)) return FALSE;
SetWindowText(GetDlgItem(dialog, IDC_PATHIMG), filename);
strcpy(tmp_cflash_filename, filename);
if (!strlen(tmp_cflash_filename))
EnableWindow(OKbutton, FALSE);
else
EnableWindow(OKbutton, TRUE);
return FALSE;
}
case IDC_BBROWSE2:
{
BROWSEINFO bp={0};
bp.hwndOwner=dialog;
bp.pidlRoot=NULL;
bp.pszDisplayName=NULL;
bp.lpszTitle="Select directory for Compact Flash";
bp.ulFlags=BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE | BIF_USENEWUI;
bp.lpfn=NULL;
LPITEMIDLIST tmp = SHBrowseForFolder((LPBROWSEINFO)&bp);
if (tmp!=NULL)
{
memset(tmp_cflash_path, 0, sizeof(tmp_cflash_path));
SHGetPathFromIDList(tmp, tmp_cflash_path);
if (tmp_cflash_path[strlen(tmp_cflash_path)-1] != '\\')
tmp_cflash_path[strlen(tmp_cflash_path)] = '\\';
SetWindowText(GetDlgItem(dialog, IDC_PATH), tmp_cflash_path);
}
if (strlen(tmp_cflash_path))
EnableWindow(OKbutton, TRUE);
//.........这里部分代码省略.........
开发者ID:Ronmi,项目名称:desmume-debianlized,代码行数:101,代码来源:gbaslot_config.cpp
示例4: PrintSizeDlgProc
INT_PTR CALLBACK
PrintSizeDlgProc(HWND hdlg, UINT wmsg, WPARAM wparam, LPARAM lparam)
{
TCHAR buf[8];
GP_LPPRINT lpr = (GP_LPPRINT)GetWindowLongPtr(GetParent(hdlg), 4);
switch (wmsg) {
case WM_INITDIALOG:
wsprintf(buf, TEXT("%d"), lpr->pdef.x);
SetDlgItemText(hdlg, PSIZE_DEFX, buf);
wsprintf(buf, TEXT("%d"), lpr->pdef.y);
SetDlgItemText(hdlg, PSIZE_DEFY, buf);
wsprintf(buf, TEXT("%d"), lpr->poff.x);
SetDlgItemText(hdlg, PSIZE_OFFX, buf);
wsprintf(buf, TEXT("%d"), lpr->poff.y);
SetDlgItemText(hdlg, PSIZE_OFFY, buf);
wsprintf(buf, TEXT("%d"), lpr->psize.x);
SetDlgItemText(hdlg, PSIZE_X, buf);
wsprintf(buf, TEXT("%d"), lpr->psize.y);
SetDlgItemText(hdlg, PSIZE_Y, buf);
CheckDlgButton(hdlg, PSIZE_DEF, TRUE);
EnableWindow(GetDlgItem(hdlg, PSIZE_X), FALSE);
EnableWindow(GetDlgItem(hdlg, PSIZE_Y), FALSE);
return TRUE;
case WM_COMMAND:
switch (wparam) {
case PSIZE_DEF:
EnableWindow(GetDlgItem(hdlg, PSIZE_X), FALSE);
EnableWindow(GetDlgItem(hdlg, PSIZE_Y), FALSE);
return FALSE;
case PSIZE_OTHER:
EnableWindow(GetDlgItem(hdlg, PSIZE_X), TRUE);
EnableWindow(GetDlgItem(hdlg, PSIZE_Y), TRUE);
return FALSE;
case IDOK:
if (SendDlgItemMessage(hdlg, PSIZE_OTHER, BM_GETCHECK, 0, 0L)) {
SendDlgItemMessage(hdlg, PSIZE_X, WM_GETTEXT, 7,
(LPARAM) (LPSTR) buf);
GetInt(buf, (LPINT)&lpr->psize.x);
SendDlgItemMessage(hdlg, PSIZE_Y, WM_GETTEXT, 7,
(LPARAM) (LPSTR) buf);
GetInt(buf, (LPINT)&lpr->psize.y);
} else {
lpr->psize.x = lpr->pdef.x;
lpr->psize.y = lpr->pdef.y;
}
SendDlgItemMessage(hdlg, PSIZE_OFFX, WM_GETTEXT, 7,
(LPARAM) (LPSTR) buf);
GetInt(buf, (LPINT)&lpr->poff.x);
SendDlgItemMessage(hdlg, PSIZE_OFFY, WM_GETTEXT, 7,
(LPARAM) (LPSTR) buf);
GetInt(buf, (LPINT)&lpr->poff.y);
if (lpr->psize.x <= 0)
lpr->psize.x = lpr->pdef.x;
if (lpr->psize.y <= 0)
lpr->psize.y = lpr->pdef.y;
EndDialog(hdlg, IDOK);
return TRUE;
case IDCANCEL:
EndDialog(hdlg, IDCANCEL);
return TRUE;
} /* switch(wparam) */
break;
} /* switch(msg) */
return FALSE;
}
开发者ID:XianliangJ,项目名称:gnuplot,代码行数:68,代码来源:wprinter.c
示例5: CheckDlgButton
BOOL CDownloadProperties_IntegrityPage::OnInitDialog()
{
CPropertyPage::OnInitDialog();
fsDownload_Properties dp;
fsDownload_Properties *dp0 = m_pvDlds->at (0)->pMgr->GetDownloadMgr ()->GetDP ();
if (DP_EQ (bCheckIntegrityWhenDone, FALSE))
CheckDlgButton (IDC_PERFORMCHECKWHENDONE, dp0->bCheckIntegrityWhenDone ? BST_CHECKED : BST_UNCHECKED);
else
CheckDlgButton (IDC_PERFORMCHECKWHENDONE, BST_INDETERMINATE);
m_wndICFR.AddString (LS (L_ASK));
m_wndICFR.AddString (LS (L_RESTART));
m_wndICFR.AddString (LS (L_DONOTHING));
if (DP_EQ (enICFR, FALSE))
m_wndICFR.SetCurSel (dp0->enICFR);
LPCTSTR ppszAlgs [] = {
_T("MD5"), _T("SHA-1"), _T("SHA-2 256"), _T("SHA-2 384"), _T("SHA-2 512"),
_T("CRC 32")
};
DWORD adwAlgs [] = {
HA_MD5, HA_SHA1, HA_SHA2,
MAKELONG (HA_SHA2, HSHA2S_384), MAKELONG (HA_SHA2, HSHA2S_512),
HA_CRC32,
};
DWORD dwAlg = (DWORD)-1;
if (m_pvDlds->size () == 1)
dwAlg = dp0->dwIntegrityCheckAlgorithm;
for (int i = 0; i < sizeof (ppszAlgs) / sizeof (LPCSTR); i++)
{
m_wndAlgorithm.AddString (ppszAlgs [i]);
m_wndAlgorithm.SetItemData (i, adwAlgs [i]);
if (dwAlg == adwAlgs [i])
m_wndAlgorithm.SetCurSel (i);
}
if (m_pvDlds->size () == 1)
{
SetDlgItemText (IDC_CHECKSUM, dp0->pszCheckSum);
}
else
{
UINT anIds [] = {
IDC__CHECKSUMOFTHISFILE, IDC_CHECKSUM,
IDC__ALGORITHM, IDC_ALGORITHM
};
for (int i = 0; i < sizeof (anIds) / sizeof (UINT); i++)
GetDlgItem (anIds [i])->ShowWindow (SW_HIDE);
}
ApplyLanguage ();
UpdateEnabled ();
return TRUE;
}
开发者ID:naroya,项目名称:freedownload,代码行数:63,代码来源:DownloadProperties_IntegrityPage.cpp
示例6: CFG_OnSelChangedProc
LRESULT CALLBACK CFG_OnSelChangedProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
TCHAR szText[256];
TCHAR tmp[20];
TCHAR szFile[260];
hwndConfDialog = hDlg;
switch(uMsg)
{
case WM_INITDIALOG:
{
g_bChanged = false;
CFG_OnChildDialogInit(hDlg);
SendDlgItemMessage (hDlg,IDC_COMBO_MOD, CB_ADDSTRING, 0, (LPARAM)"ALT");
SendDlgItemMessage (hDlg,IDC_COMBO_MOD, CB_ADDSTRING, 0 ,(LPARAM)"CONTROL");
SendDlgItemMessage (hDlg,IDC_COMBO_MOD, CB_ADDSTRING, 0, (LPARAM)"SHIFT");
if(AppCFGtemp.dwMinimizeMODKey == MOD_ALT)
SendDlgItemMessage (hDlg,IDC_COMBO_MOD, CB_SETCURSEL, 0, 0);
else if(AppCFGtemp.dwMinimizeMODKey == MOD_CONTROL)
SendDlgItemMessage (hDlg,IDC_COMBO_MOD, CB_SETCURSEL, 1, 0);
else if(AppCFGtemp.dwMinimizeMODKey == MOD_SHIFT)
SendDlgItemMessage (hDlg,IDC_COMBO_MOD, CB_SETCURSEL, 2, 0);
sprintf(tmp,"%c",AppCFGtemp.cMinimizeKey);
SetDlgItemText(hDlg,IDC_EDIT_KEY,tmp);
SendDlgItemMessage (hDlg,IDC_EDIT_KEY, EM_SETLIMITTEXT,1, 0);
CheckDlgButton(hDlg,IDC_CHECK_CONNECT_CLOSE,AppCFGtemp.bCloseOnConnect);
CheckDlgButton(hDlg,IDC_CHECK1,AppCFGtemp.bAutostart);
CheckDlgButton(hDlg,IDC_CHECK_SHORTNAME,AppCFGtemp.bUseShortCountry);
CheckDlgButton(hDlg,IDC_CHECK_REG_WEB_PROTOCOLS,AppCFGtemp.bRegisterWebProtocols);
CheckDlgButton(hDlg,IDC_CHECK_NO_MAP_RESIZE,AppCFGtemp.bNoMapResize);
CheckDlgButton(hDlg,IDC_CHECK_REFRESH_AT_START_UP,AppCFGtemp.bAutoRefreshServerlist);
LVCOLUMN lvColumn;
//initialize the columns
lvColumn.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM ;
lvColumn.fmt = LVCFMT_LEFT;
HWND hwndLVexes;
hwndLVexes = GetDlgItem(hDlg,IDC_LIST_CFG_EXES);
lvColumn.cx = 80;
lvColumn.pszText = (LPSTR)g_lang.GetString("ColumnName");
ListView_InsertColumn(hwndLVexes, 0, &lvColumn);
lvColumn.cx = 120;
lvColumn.pszText = (LPSTR)g_lang.GetString("LaunchByScript");
ListView_InsertColumn(hwndLVexes, 1, &lvColumn);
lvColumn.cx = 180;
lvColumn.pszText = (LPSTR)g_lang.GetString("ColumnExePath");
ListView_InsertColumn(hwndLVexes, 3, &lvColumn);
lvColumn.pszText = (LPSTR)g_lang.GetString("ColumnCommand");
ListView_InsertColumn(hwndLVexes, 4, &lvColumn);
DWORD dwExStyle=0;
dwExStyle = ListView_GetExtendedListViewStyle(hwndLVexes);
dwExStyle |= LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP ;
ListView_SetExtendedListViewStyle(hwndLVexes,dwExStyle);
CheckDlgButton(hDlg,IDC_CHECK2,AppCFGtemp.bUse_minimize);
CheckDlgButton(hDlg,IDC_CHECK_SCR_RESTORE,AppCFGtemp.bUSE_SCREEN_RESTORE );
sprintf(szText,"%d",AppCFGtemp.iAutoRefreshEveryMinuteInterval);
SetDlgItemText(hDlg,IDC_EDIT_AUTO_REFRESH_INTERVAL,szText);
sprintf(szText,"%d",(AppCFGtemp.socktimeout.tv_sec*1000)+AppCFGtemp.socktimeout.tv_usec);
SetDlgItemText(hDlg,IDC_EDIT_SOCK_TIMEOUT_S,szText);
sprintf(szText,"%d",AppCFGtemp.dwRetries);
SetDlgItemText(hDlg,IDC_EDIT_CFG_RETRIES,szText);
CheckDlgButton(hDlg,IDC_CHECK_XMPP_ACTIVE,AppCFGtemp.bXMPP_Active);
SetDlgItemText(hDlg,IDC_EDIT_XMPP_USERNAME,AppCFGtemp.szXMPP_USERNAME);
SetDlgItemText(hDlg,IDC_EDIT_XMPP_PASSWORD,AppCFGtemp.szXMPP_PASSWORD);
SetDlgItemText(hDlg,IDC_EDIT_XMPP_SERVER,AppCFGtemp.szXMPP_SERVER);
CheckDlgButton(hDlg,IDC_CHECK_BUDDY_NOTIFY,AppCFGtemp.bBuddyNotify);
CheckDlgButton(hDlg,IDC_CHECK_USE_WAV_FILE,AppCFGtemp.bUseBuddySndNotify);
SetDlgItemText(hDlg,IDC_EDIT_WAV_FILE,AppCFGtemp.szNotifySoundWAVfile);
SetDlgItemText(hDlg,IDC_EDIT_MIRC,g_sMIRCoutput.c_str());
CheckDlgButton(hDlg,IDC_CHECK_EXT_ACTIVE,AppCFGtemp.bUse_EXT_APP);
CheckDlgButton(hDlg,IDC_CHECK_EXT_ACTIVE2,AppCFGtemp.bUse_EXT_APP2);
CheckDlgButton(hDlg,IDC_CHECK_MIRC,AppCFGtemp.bUseMIRC);
g_lang.EnumerateLanguage();
for( map<string,string>::iterator ii=g_lang.m_Languages.begin(); ii!=g_lang.m_Languages.end(); ++ii)
{
//.........这里部分代码省略.........
开发者ID:elitak,项目名称:gamescanner,代码行数:101,代码来源:config.cpp
示例7: DlgProc_Phone
/**
* name: DlgProc_EditPhone()
* desc: dialog procedure
*
* return: 0 or 1
**/
INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
LPCBEXITEM cbi = (LPCBEXITEM)GetUserData(hDlg);
static int noRecursion = 0;
switch (msg) {
case WM_INITDIALOG:
{
UINT i, item, countryCount;
LPIDSTRLIST pCountries;
HWND hCombo = GetDlgItem(hDlg, EDIT_COUNTRY);
cbi = (LPCBEXITEM)lParam;
if (!cbi) return FALSE;
SetUserData(hDlg, lParam);
SendDlgItemMessage(hDlg, IDC_HEADERBAR, WM_SETICON, 0, (LPARAM)IcoLib_GetIcon(ICO_DLG_PHONE, TRUE));
if (db_get_b(NULL, MODNAME, SET_ICONS_BUTTONS, 1)) {
SendDlgItemMessage(hDlg, IDOK, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIcon(ICO_BTN_OK));
SendDlgItemMessage(hDlg, IDCANCEL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIcon(ICO_BTN_CANCEL));
}
// translate Userinfo buttons
{
TCHAR szButton[MAX_PATH];
HWND hBtn;
hBtn = GetDlgItem(hDlg, IDOK);
GetWindowText(hBtn, szButton, _countof(szButton));
SetWindowText(hBtn, TranslateTS(szButton));
hBtn = GetDlgItem(hDlg, IDCANCEL);
GetWindowText(hBtn, szButton, _countof(szButton));
SetWindowText(hBtn, TranslateTS(szButton));
}
if (*cbi->pszVal) SetWindowText(hDlg, LPGENT("Edit phone number"));
if (cbi->wFlags & CBEXIF_SMS) CheckDlgButton(hDlg, CHECK_SMS, BST_CHECKED);
TranslateDialogDefault(hDlg);
EnableWindow(GetDlgItem(hDlg, IDOK), *cbi->pszVal);
SendDlgItemMessage(hDlg, EDIT_AREA, EM_LIMITTEXT, 31, 0);
SendDlgItemMessage(hDlg, EDIT_NUMBER, EM_LIMITTEXT, 63, 0);
SendDlgItemMessage(hDlg, EDIT_CATEGORY, EM_LIMITTEXT, cbi->ccCat - 1, 0);
SendDlgItemMessage(hDlg, EDIT_PHONE, EM_LIMITTEXT, cbi->ccVal - 1, 0);
GetCountryList(&countryCount, &pCountries);
for (i = 0; i < countryCount; i++) {
if (pCountries[i].nID == 0 || pCountries[i].nID == 0xFFFF) continue;
item = SendMessage(hCombo, CB_ADDSTRING, NULL, (LPARAM)pCountries[i].ptszTranslated);
SendMessage(hCombo, CB_SETITEMDATA, item, pCountries[i].nID);
}
SetDlgItemText(hDlg, EDIT_PHONE, cbi->pszVal);
SetDlgItemText(hDlg, EDIT_CATEGORY, cbi->pszCat);
EnableWindow(GetDlgItem(hDlg, EDIT_CATEGORY), !(cbi->wFlags & CBEXIF_CATREADONLY));
}
return TRUE;
case WM_CTLCOLORSTATIC:
SetBkColor((HDC)wParam, RGB(255, 255, 255));
return (INT_PTR)GetStockObject(WHITE_BRUSH);
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
if (HIWORD(wParam) == BN_CLICKED) {
TCHAR szText[MAXDATASIZE];
int errorPos;
if (!GetDlgItemText(hDlg, EDIT_PHONE, szText, _countof(szText)) || !CheckPhoneSyntax(szText, cbi->pszVal, cbi->ccVal, errorPos) || errorPos > -1) {
MsgErr(hDlg, TranslateT("The phone number should start with a + and consist of\nnumbers, spaces, brackets and hyphens only."));
break;
}
// save category string
GetDlgItemText(hDlg, EDIT_CATEGORY, cbi->pszCat, cbi->ccCat);
// save SMS flag
if ((int)IsDlgButtonChecked(hDlg, CHECK_SMS) != ((cbi->wFlags & CBEXIF_SMS) == CBEXIF_SMS))
cbi->wFlags ^= CBEXIF_SMS;
}
//fall through
case IDCANCEL:
if (HIWORD(wParam) == BN_CLICKED)
EndDialog(hDlg, wParam);
break;
case EDIT_COUNTRY:
if (HIWORD(wParam) != CBN_SELCHANGE)
break;
case EDIT_AREA:
case EDIT_NUMBER:
if (LOWORD(wParam) != EDIT_COUNTRY && HIWORD(wParam) != EN_CHANGE) break;
if (noRecursion) break;
EnableWindow(GetDlgItem(hDlg, IDOK), TRUE);
//.........这里部分代码省略.........
开发者ID:Seldom,项目名称:miranda-ng,代码行数:101,代码来源:ctrl_contact.cpp
示例8: OptionsProc
INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
{
switch(msg){
case WM_INITDIALOG:{
DWORD style;
g_opHdlg=hdlg;
bOptionsInit=TRUE;
TranslateDialogDefault(hdlg);
if(g_iButtonsCount!=db_get_b(NULL, PLGNAME,"ButtonsCount", 0))
{
LOGFONT logFont;
HFONT hFont;
bNeedRestart=TRUE;
EnableWindow(GetDlgItem(hdlg,IDC_BUTTONSLIST),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_BLISTADD),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_BLISTREMOVE),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_MENUTREE),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_MTREEADD),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_MTREEREMOVE),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_MENUVALUE),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_RCLICKVALUE),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_BUTTONNAME),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_INQMENU),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_ISSERVNAME),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_MENUNAME),FALSE);
ShowWindow(GetDlgItem(hdlg,IDC_WARNING),SW_SHOW);
hFont = (HFONT)SendDlgItemMessage(hdlg, IDC_WARNING, WM_GETFONT, 0, 0);
GetObject(hFont, sizeof(logFont), &logFont);
logFont.lfWeight = FW_BOLD;
hFont = CreateFontIndirect(&logFont);
SendDlgItemMessage(hdlg, IDC_WARNING, WM_SETFONT, (WPARAM)hFont, 0);
break;
}
g_iOPButtonsCount=g_iButtonsCount;
hButtonsList=GetDlgItem(hdlg,IDC_BUTTONSLIST);
hMenuTree=GetDlgItem(hdlg,IDC_MENUTREE);
style = GetWindowLongPtr(hButtonsList,GWL_STYLE);
style |=TVS_NOHSCROLL;
SetWindowLongPtr(hButtonsList,GWL_STYLE, style);
style = GetWindowLongPtr(hMenuTree,GWL_STYLE);
style |=TVS_NOHSCROLL;
SetWindowLongPtr(hMenuTree,GWL_STYLE, style);
BuildButtonsList(hButtonsList);
if (!TreeView_GetCount(hButtonsList))
EnableWindow(GetDlgItem(hdlg,IDC_RCLICKVALUE),FALSE);
mir_subclassWindow( GetDlgItem(hdlg,IDC_BUTTONNAME), EditSubclassProc);
mir_subclassWindow( GetDlgItem(hdlg,IDC_MENUNAME), EditSubclassProc);
EnableWindow(GetDlgItem(hdlg,IDC_MENUVALUE),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_INQMENU),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_ISSERVNAME),FALSE);
CheckDlgButton(hdlg,IDC_RAUTOSEND,(g_bRClickAuto=db_get_b(NULL,PLGNAME,"RClickAuto",0)) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hdlg,IDC_LAUTOSEND,(g_bLClickAuto=db_get_b(NULL,PLGNAME,"LClickAuto",0)) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hdlg,IDC_ENABLEQUICKMENU,(g_bQuickMenu=db_get_b(NULL, PLGNAME,"QuickMenu", 1)) ? BST_CHECKED : BST_UNCHECKED);
bOptionsInit=FALSE;
}break;
case WM_LBUTTONUP:
if(drag) {
TVHITTESTINFO hti;
HTREEITEM htiAfter=NULL;
ButtonData* bd=NULL;
TVITEM tvi;
RECT rc;
BYTE height;
BOOLEAN bAsChild = FALSE;
TreeView_SetInsertMark(hMenuTree, NULL, 0 );
ReleaseCapture();
SetCursor( LoadCursor( NULL, IDC_ARROW ));
hti.pt.x = ( SHORT )LOWORD( lparam );
hti.pt.y = ( SHORT )HIWORD( lparam );
ClientToScreen(hdlg,&hti.pt);
ScreenToClient(hMenuTree,&hti.pt);
TreeView_HitTest( hMenuTree, &hti );
if(TreeView_GetParent(hMenuTree,hti.hItem)&&TreeView_GetChild(hMenuTree,hDragItem))
break;
if(TreeView_GetChild(hMenuTree,hti.hItem)&&TreeView_GetChild(hMenuTree,hDragItem))
break;
if ( hti.flags & TVHT_ABOVE ) {
htiAfter = TVI_FIRST;
}
else
if ( hti.flags & ( TVHT_NOWHERE|TVHT_BELOW )) {
htiAfter = TVI_LAST;
}
else
//.........这里部分代码省略.........
开发者ID:martok,项目名称:miranda-ng,代码行数:101,代码来源:options.cpp
示例9: OptionsProc
INT_PTR CALLBACK OptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
SendDlgItemMessage(hwndDlg, IDC_MAXCHANNEL, CB_RESETCONTENT, 0, 0);
for (int i = 1; i <= MAXCHAN; i++)
SendDlgItemMessage(hwndDlg, IDC_MAXCHANNEL, CB_ADDSTRING, 0, (LPARAM)_itot(i, tmp, 10));
SendDlgItemMessage(hwndDlg, IDC_MAXCHANNEL, CB_SETCURSEL, sndLimSnd - 1, 0);
SetDlgItemText(hwndDlg, IDC_CURRPATH, CurrBassPath);
hwndOptSlider = GetDlgItem(hwndDlg, IDC_VOLUME);
SendDlgItemMessage(hwndDlg, IDC_VOLUME, TBM_SETRANGE, FALSE, MAKELONG(SLIDER_MIN, SLIDER_MAX));
SendDlgItemMessage(hwndDlg, IDC_VOLUME, TBM_SETPOS, TRUE, Volume);
SendDlgItemMessage(hwndDlg, IDC_VOLUME, TBM_SETPAGESIZE, 0, 5);
{
SYSTEMTIME systime = { 0 };
systime.wHour = HIBYTE(TimeWrd1);
systime.wMinute = LOBYTE(TimeWrd1);
systime.wYear = 2000;
systime.wMonth = 1;
systime.wDay = 1;
SendDlgItemMessage(hwndDlg, IDC_TIME1, DTM_SETFORMAT, 0, (LPARAM)_T("HH:mm"));
SendDlgItemMessage(hwndDlg, IDC_TIME1, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&systime);
systime.wHour = HIBYTE(TimeWrd2);
systime.wMinute = LOBYTE(TimeWrd2);
SendDlgItemMessage(hwndDlg, IDC_TIME2, DTM_SETFORMAT, 0, (LPARAM)_T("HH:mm"));
SendDlgItemMessage(hwndDlg, IDC_TIME2, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&systime);
}
CheckDlgButton(hwndDlg, IDC_PREVIEW, EnPreview ? BST_CHECKED : BST_UNCHECKED);
for (int i = IDC_CHECKBOX1; i < IDC_CHECKBOX10 + 1; i++)
if (StatMask & (1 << (i - IDC_CHECKBOX1)))
CheckDlgButton(hwndDlg, i, BST_CHECKED);
if (QuietTime) {
EnableWindow(GetDlgItem(hwndDlg, IDC_TIME1), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_TIME2), TRUE);
CheckDlgButton(hwndDlg, IDC_QUIETTIME, BST_CHECKED);
}
if (hBass == NULL) {
EnableWindow(GetDlgItem(hwndDlg, IDC_VOLUME), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_MAXCHANNEL), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_OUTDEVICE), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_QUIETTIME), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_PREVIEW), FALSE);
for (int i = IDC_CHECKBOX1; i < IDC_CHECKBOX10 + 1; i++)
EnableWindow(GetDlgItem(hwndDlg, i), FALSE);
}
else {
DWORD bassver = BASS_GetVersion();
mir_sntprintf(tmp, TranslateT("un4seen's bass version: %d.%d.%d.%d"), bassver >> 24, (bassver >> 16) & 0xff, (bassver >> 8) & 0xff, bassver & 0xff);
SetDlgItemText(hwndDlg, IDC_BASSVERSION, tmp);
SendDlgItemMessage(hwndDlg, IDC_OUTDEVICE, CB_RESETCONTENT, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_OUTDEVICE, CB_ADDSTRING, 0, (LPARAM)TranslateT("--default device--"));
SendDlgItemMessage(hwndDlg, IDC_OUTDEVICE, CB_SETCURSEL, 0, 0);
BASS_DEVICEINFO info;
ptrT tszDeviceName(db_get_tsa(NULL, ModuleName, OPT_OUTDEVICE));
for (int i = 1; BASS_GetDeviceInfo(i + newBass, &info); i++) {
SendDlgItemMessage(hwndDlg, IDC_OUTDEVICE, CB_ADDSTRING, 0, _A2T(info.name));
if (!mir_tstrcmp(tszDeviceName, _A2T(info.name)))
SendDlgItemMessage(hwndDlg, IDC_OUTDEVICE, CB_SETCURSEL, i, 0);
}
}
return TRUE;
case WM_HSCROLL:
if (hBass != NULL)
if (LOWORD(wParam) == SB_ENDSCROLL || LOWORD(wParam) == SB_THUMBTRACK) {
Volume = SendDlgItemMessage(hwndDlg, IDC_VOLUME, TBM_GETPOS, 0, 0);
BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, Volume * 100);
SendMessage(hwndSlider, TBM_SETPOS, TRUE, Volume);
Preview = TRUE;
if (EnPreview)
SkinPlaySound("AlertMsg");
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
break;
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
if (hBass != NULL) {
SYSTEMTIME systime = { 0 };
GetDlgItemText(hwndDlg, IDC_OUTDEVICE, tmp, _countof(tmp));
db_set_ts(NULL, ModuleName, OPT_OUTDEVICE, tmp);
Volume = (DWORD)SendDlgItemMessage(hwndDlg, IDC_VOLUME, TBM_GETPOS, 0, 0);
db_set_b(NULL, ModuleName, OPT_VOLUME, Volume);
sndLimSnd = SendDlgItemMessage(hwndDlg, IDC_MAXCHANNEL, CB_GETCURSEL, 0, 0) + 1;
//.........这里部分代码省略.........
开发者ID:Seldom,项目名称:miranda-ng,代码行数:101,代码来源:Main.cpp
示例10: JabberAddBookmarkDlgProc
static INT_PTR CALLBACK JabberAddBookmarkDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
JabberAddBookmarkDlgParam* param = (JabberAddBookmarkDlgParam*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
TCHAR text[512];
JABBER_LIST_ITEM *item;
switch (msg) {
case WM_INITDIALOG:
param = (JabberAddBookmarkDlgParam*)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
param->ppro->m_hwndJabberAddBookmark = hwndDlg;
TranslateDialogDefault(hwndDlg);
if (item = param->m_item) {
if (!mir_tstrcmp(item->type, _T("conference"))) {
if (!_tcschr(item->jid, _T('@'))) { //no room name - consider it is transport
CheckDlgButton(hwndDlg, IDC_AGENT_RADIO, BST_CHECKED);
EnableWindow(GetDlgItem(hwndDlg, IDC_NICK), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), FALSE);
}
else CheckDlgButton(hwndDlg, IDC_ROOM_RADIO, BST_CHECKED);
}
else {
CheckDlgButton(hwndDlg, IDC_URL_RADIO, BST_CHECKED);
EnableWindow(GetDlgItem(hwndDlg, IDC_NICK), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), FALSE);
CheckDlgButton(hwndDlg, IDC_CHECK_BM_AUTOJOIN, BST_UNCHECKED);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_BM_AUTOJOIN), FALSE);
}
EnableWindow(GetDlgItem(hwndDlg, IDC_ROOM_RADIO), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_URL_RADIO), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_AGENT_RADIO), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_BM_AUTOJOIN), FALSE);
if (item->jid) SetDlgItemText(hwndDlg, IDC_ROOM_JID, item->jid);
if (item->name) SetDlgItemText(hwndDlg, IDC_NAME, item->name);
if (item->nick) SetDlgItemText(hwndDlg, IDC_NICK, item->nick);
if (item->password) SetDlgItemText(hwndDlg, IDC_PASSWORD, item->password);
if (item->bAutoJoin) CheckDlgButton(hwndDlg, IDC_CHECK_BM_AUTOJOIN, BST_CHECKED);
if (IsDlgButtonChecked(hwndDlg, IDC_ROOM_RADIO) == BST_CHECKED)
EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_BM_AUTOJOIN), TRUE);
}
else {
EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE);
CheckDlgButton(hwndDlg, IDC_ROOM_RADIO, BST_CHECKED);
}
return TRUE;
case WM_COMMAND:
switch (HIWORD(wParam)) {
case BN_CLICKED:
switch (LOWORD (wParam)) {
case IDC_ROOM_RADIO:
EnableWindow(GetDlgItem(hwndDlg, IDC_NICK), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_BM_AUTOJOIN), TRUE);
break;
case IDC_AGENT_RADIO:
case IDC_URL_RADIO:
EnableWindow(GetDlgItem(hwndDlg, IDC_NICK), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), FALSE);
CheckDlgButton(hwndDlg, IDC_CHECK_BM_AUTOJOIN, BST_UNCHECKED);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_BM_AUTOJOIN), FALSE);
break;
}
}
switch (LOWORD(wParam)) {
case IDC_ROOM_JID:
if ((HWND)lParam==GetFocus() && HIWORD(wParam)==EN_CHANGE)
EnableWindow(GetDlgItem(hwndDlg, IDOK), GetDlgItemText(hwndDlg, IDC_ROOM_JID, text, _countof(text)));
break;
case IDOK:
{
GetDlgItemText(hwndDlg, IDC_ROOM_JID, text, _countof(text));
TCHAR *roomJID = NEWTSTR_ALLOCA(text);
if (param->m_item)
param->ppro->ListRemove(LIST_BOOKMARK, param->m_item->jid);
item = param->ppro->ListAdd(LIST_BOOKMARK, roomJID);
if (IsDlgButtonChecked(hwndDlg, IDC_URL_RADIO) == BST_CHECKED)
replaceStrT(item->type, _T("url"));
else
replaceStrT(item->type, _T("conference"));
GetDlgItemText(hwndDlg, IDC_NICK, text, _countof(text));
replaceStrT(item->nick, text);
GetDlgItemText(hwndDlg, IDC_PASSWORD, text, _countof(text));
replaceStrT(item->password, text);
GetDlgItemText(hwndDlg, IDC_NAME, text, _countof(text));
replaceStrT(item->name, (text[0] == 0) ? roomJID : text);
item->bAutoJoin = (IsDlgButtonChecked(hwndDlg, IDC_CHECK_BM_AUTOJOIN) == BST_CHECKED);
//.........这里部分代码省略.........
开发者ID:Seldom,项目名称:miranda-ng,代码行数:101,代码来源:jabber_bookmarks.cpp
示例11: DIALOGMsgProcEnc
BOOL CALLBACK DIALOGMsgProcEnc(HWND hWndDlg, UINT Message, WPARAM wParam, LPARAM lParam)
{
switch(Message)
{
case WM_INITDIALOG:
{
char buf[50];
char *Quality[]={"Default","10","20","30","40","50","60","70","80","90","100","110","120","130","140","150","200","300","400","500",0};
char *BitRate[]={"Auto","8","18","20","24","32","40","48","56","64","96","112","128","160","192","224","256","320","384",0};
char *BandWidth[]={"Auto","Full","4000","8000","11025","16000","22050","24000","32000","44100","48000",0};
CMyEncCfg cfg(false);
SetWindowPos(GetDlgItem(hWndDlg,IDC_CHK_TAG),GetDlgItem(hWndDlg,IDC_GRP_TAG),0,0,0,0,SWP_NOMOVE | SWP_NOSIZE);
INIT_CB(hWndDlg,IDC_CB_QUALITY,Quality,0);
INIT_CB(hWndDlg,IDC_CB_BITRATE,BitRate,0);
INIT_CB(hWndDlg,IDC_CB_BANDWIDTH,BandWidth,0);
INIT_CB_GENRES(hWndDlg,IDC_CB_GENRE,ID3Genres,0);
SendMessage(GetDlgItem(hWndDlg, IDC_BTN_ARTFILE), BM_SETIMAGE, IMAGE_BITMAP, (LPARAM) hBmBrowse);
#ifdef IDC_BTN_BROWSE
SendMessage(GetDlgItem(hWndDlg, IDC_BTN_BROWSE), BM_SETIMAGE, IMAGE_BITMAP, (LPARAM) hBmBrowse);
if(!cfg.OutDir || !*cfg.OutDir)
{
GetCurrentDirectory(MAX_PATH,config_AACoutdir);
FREE_ARRAY(cfg.OutDir);
cfg.OutDir=strdup(config_AACoutdir);
}
else
strcpy(config_AACoutdir,cfg.OutDir);
SetDlgItemText(hWndDlg, IDC_E_BROWSE, cfg.OutDir);
#endif
if(cfg.EncCfg.mpegVersion==MPEG4)
CheckDlgButton(hWndDlg,IDC_RADIO_MPEG4,TRUE);
else
CheckDlgButton(hWndDlg,IDC_RADIO_MPEG2,TRUE);
switch(cfg.EncCfg.aacObjectType)
{
case MAIN:
CheckDlgButton(hWndDlg,IDC_RADIO_MAIN,TRUE);
break;
case LOW:
CheckDlgButton(hWndDlg,IDC_RADIO_LOW,TRUE);
break;
case SSR:
CheckDlgButton(hWndDlg,IDC_RADIO_SSR,TRUE);
break;
case LTP:
CheckDlgButton(hWndDlg,IDC_RADIO_LTP,TRUE);
DISABLE_LTP
break;
}
switch(cfg.EncCfg.outputFormat)
{
case RAW:
CheckDlgButton(hWndDlg,IDC_RADIO_RAW,TRUE);
break;
case ADTS:
CheckDlgButton(hWndDlg,IDC_RADIO_ADTS,TRUE);
break;
}
CheckDlgButton(hWndDlg, IDC_CHK_ALLOWMIDSIDE, cfg.EncCfg.allowMidside);
CheckDlgButton(hWndDlg, IDC_CHK_USETNS, cfg.EncCfg.useTns);
CheckDlgButton(hWndDlg, IDC_CHK_USELFE, cfg.EncCfg.useLfe);
if(cfg.UseQuality)
CheckDlgButton(hWndDlg,IDC_RADIO_QUALITY,TRUE);
else
CheckDlgButton(hWndDlg,IDC_RADIO_BITRATE,TRUE);
switch(cfg.EncCfg.quantqual)
{
case 100:
SendMessage(GetDlgItem(hWndDlg, IDC_CB_QUALITY), CB_SETCURSEL, 0, 0);
break;
default:
if(cfg.EncCfg.quantqual<10)
cfg.EncCfg.quantqual=10;
if(cfg.EncCfg.quantqual>500)
cfg.EncCfg.quantqual=500;
sprintf(buf,"%lu",cfg.EncCfg.quantqual);
SetDlgItemText(hWndDlg, IDC_CB_QUALITY, buf);
break;
}
switch(cfg.EncCfg.bitRate)
{
case 0:
SendMessage(GetDlgItem(hWndDlg, IDC_CB_BITRATE), CB_SETCURSEL, 0, 0);
break;
default:
sprintf(buf,"%lu",cfg.EncCfg.bitRate);
SetDlgItemText(hWndDlg, IDC_CB_BITRATE, buf);
break;
}
switch(cfg.EncCfg.bandWidth)
{
//.........这里部分代码省略.........
开发者ID:BlackMael,项目名称:DirectEncode,代码行数:101,代码来源:EncDialog.cpp
示例12: UpdateControls
void UpdateControls(HWND hwnd)
{
int proto = nProtocol;
if (GlobalNudge.useByProtocol)
{
proto = GetSelProto(hwnd,NULL);
ActualNudge = NULL;
for(NudgeElementList *n = NudgeList;n != NULL; n = n->next)
{
if(n->item.iProtoNumber == proto)
ActualNudge = &n->item;
}
}
else
ActualNudge = &DefaultNudge;
SetDlgItemInt(hwnd, IDC_SENDTIME, GlobalNudge.sendTimeSec,FALSE);
SetDlgItemInt(hwnd, IDC_RECVTIME, GlobalNudge.recvTimeSec,FALSE);
SetDlgItemInt(hwnd, IDC_RESENDDELAY, GlobalNudge.resendDelaySec,FALSE);
CheckDlgButton(hwnd, IDC_USEBYPROTOCOL, (WPARAM) GlobalNudge.useByProtocol);
if (ActualNudge)// fix NULL pointer then no nudge support protocols
{
CheckDlgButton(hwnd, IDC_CHECKPOP, (WPARAM) ActualNudge->showPopup);
CheckDlgButton(hwnd, IDC_CHECKCLIST, (WPARAM) ActualNudge->shakeClist);
CheckDlgButton(hwnd, IDC_CHECKCHAT, (WPARAM) ActualNudge->shakeChat);
CheckDlgButton(hwnd, IDC_CHECKSTATUS, (WPARAM) ActualNudge->showStatus);
CheckDlgButton(hwnd, IDC_AUTORESEND, (WPARAM) ActualNudge->autoResend);
CheckDlgButton(hwnd, IDC_OPENMESSAGE, (WPARAM) ActualNudge->openMessageWindow);
CheckDlgButton(hwnd, IDC_OPENCONTACTLIST, (WPARAM) ActualNudge->openContactList);
CheckDlgButton(hwnd, IDC_IGNORE, (WPARAM) ActualNudge->useIgnoreSettings);
EnableWindow(GetDlgItem(hwnd,IDC_RESENDDELAY),ActualNudge->autoResend);
CheckDlgButton(hwnd,IDC_CHECKST0,ActualNudge->statusFlags & NUDGE_ACC_ST0 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwnd,IDC_CHECKST1,ActualNudge->statusFlags & NUDGE_ACC_ST1 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwnd,IDC_CHECKST2,ActualNudge->statusFlags & NUDGE_ACC_ST2 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwnd,IDC_CHECKST3,ActualNudge->statusFlags & NUDGE_ACC_ST3 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwnd,IDC_CHECKST4,ActualNudge->statusFlags & NUDGE_ACC_ST4 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwnd,IDC_CHECKST5,ActualNudge->statusFlags & NUDGE_ACC_ST5 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwnd,IDC_CHECKST6,ActualNudge->statusFlags & NUDGE_ACC_ST6 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwnd,IDC_CHECKST7,ActualNudge->statusFlags & NUDGE_ACC_ST7 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwnd,IDC_CHECKST8,ActualNudge->statusFlags & NUDGE_ACC_ST8 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwnd,IDC_CHECKST9,ActualNudge->statusFlags & NUDGE_ACC_ST9 ? BST_CHECKED : BST_UNCHECKED);
SetDlgItemText(hwnd,IDC_SENDTEXT,ActualNudge->senText);
SetDlgItemText(hwnd,IDC_RECVTEXT,ActualNudge->recText);
}
else
{
EnableWindow(GetDlgItem(hwnd,IDC_PROTOLIST),FALSE);
}
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:50,代码来源:options.cpp
示例13: GetDlgItem
void CPPgGeneral::LoadSettings(void)
{
GetDlgItem(IDC_NICK)->SetWindowText(thePrefs.GetUserNickVC());
for(int i = 0; i < m_language.GetCount(); i++)
if(m_language.GetItemData(i) == thePrefs.GetLanguageID())
m_language.SetCurSel(i);
if(thePrefs.m_bAutoStart)
CheckDlgButton(IDC_STARTWIN,1);
else
CheckDlgButton(IDC_STARTWIN,0);
//Deleted by thilon on 2008.03.20
//if(thePrefs.startMinimized)
// CheckDlgButton(IDC_STARTMIN,1);
//else
// CheckDlgButton(IDC_STARTMIN,0);
if (thePrefs.onlineSig)
CheckDlgButton(IDC_ONLINESIG,1);
else
CheckDlgButton(IDC_ONLINESIG,0);
if (thePrefs.m_bShowBroswer)
CheckDlgButton(IDC_WEBBROWSER,1); // Added by thilon on 2006.08.03, WebBroswer
else
CheckDlgButton(IDC_WEBBROWSER,0);
if(thePrefs.beepOnError)
CheckDlgButton(IDC_BEEPER,1);
else
CheckDlgButton(IDC_BEEPER,0);
if(thePrefs.confirmExit)
CheckDlgButton(IDC_EXIT,1);
else
CheckDlgButton(IDC_EXIT,0);
if(thePrefs.splashscreen)
CheckDlgButton(IDC_SPLASHON,1);
else
CheckDlgButton(IDC_SPLASHON,0);
if(thePrefs.bringtoforeground)
CheckDlgButton(IDC_BRINGTOFOREGROUND,1);
else
CheckDlgButton(IDC_BRINGTOFOREGROUND,0);
if(thePrefs.updatenotify)
CheckDlgButton(IDC_CHECK4UPDATE,1);
else
CheckDlgButton(IDC_CHECK4UPDATE,0);
if(thePrefs.m_bEnableMiniMule)
CheckDlgButton(IDC_MINIMULE,1);
else
CheckDlgButton(IDC_MINIMULE,0);
CString strBuffer;
strBuffer.Format(_T("%i %s"),thePrefs.versioncheckdays,GetResString(IDS_DAYS2));
GetDlgItem(IDC_DAYS)->SetWindowText(strBuffer);
switch(thePrefs.GetCloseMode())
{
case 0:
m_CtrlCloseMode.SetCurSel(0);
break;
case 1:
m_CtrlCloseMode.SetCurSel(1);
break;
case 2:
m_CtrlCloseMode.SetCurSel(2);
break;
}
//缓存模式
switch(m_iFileBufferSize)
{
case 524288:
m_DownloadBuffSizeCtrl.SetCurSel(0);
break;
case 1048576:
m_DownloadBuffSizeCtrl.SetCurSel(1);
break;
case 2097152:
m_DownloadBuffSizeCtrl.SetCurSel(2);
break;
case 4194304:
m_DownloadBuffSizeCtrl.SetCurSel(3);
break;
case 8388608:
m_DownloadBuffSizeCtrl.SetCurSel(4);
break;
case 16777216:
m_DownloadBuffSizeCtrl.SetCurSel(5);
break;
}
// added by vc-yavey on 20100429 : config rss <begin>
//.........这里部分代码省略.........
开发者ID:techpub,项目名称:archive-code,代码行数:101,代码来源:PPgGeneral.cpp
示例14: IEViewTemplatesOptDlgProc
static BOOL CALLBACK IEViewTemplatesOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
int i;
BOOL bChecked;
char path[MAX_PATH];
switch (msg) {
case WM_INITDIALOG:
{
char *path;
TranslateDialogDefault(hwndDlg);
bChecked = FALSE;
if (Options::getTemplatesFlags() & Options::TEMPLATES_ENABLED) {
bChecked = TRUE;
CheckDlgButton(hwndDlg, IDC_TEMPLATES, TRUE);
}
if (Options::getTemplatesFlags() & Options::LOG_SHOW_FILE) {
CheckDlgButton(hwndDlg, IDC_LOG_SHOW_FILE, TRUE);
}
if (Options::getTemplatesFlags() & Options::LOG_SHOW_URL) {
CheckDlgButton(hwndDlg, IDC_LOG_SHOW_URL, TRUE);
}
if (Options::getTemplatesFlags() & Options::LOG_SHOW_STATUSCHANGE) {
CheckDlgButton(hwndDlg, IDC_LOG_SHOW_STATUSCHANGE, TRUE);
}
if (Options::getTemplatesFlags() & Options::LOG_SHOW_NICKNAMES) {
CheckDlgButton(hwndDlg, IDC_LOG_SHOW_NICKNAMES, TRUE);
}
if (Options::getTemplatesFlags() & Options::LOG_SHOW_TIME) {
CheckDlgButton(hwndDlg, IDC_LOG_SHOW_TIME, TRUE);
}
if (Options::getTemplatesFlags() & Options::LOG_SHOW_DATE) {
CheckDlgButton(hwndDlg, IDC_LOG_SHOW_DATE, TRUE);
}
if (Options::getTemplatesFlags() & Options::LOG_SHOW_SECONDS) {
CheckDlgButton(hwndDlg, IDC_LOG_SHOW_SECONDS, TRUE);
}
if (Options::getTemplatesFlags() & Options::LOG_LONG_DATE) {
CheckDlgButton(hwndDlg, IDC_LOG_LONG_DATE, TRUE);
}
if (Options::getTemplatesFlags() & Options::LOG_RELATIVE_DATE) {
CheckDlgButton(hwndDlg, IDC_LOG_RELATIVE_DATE, TRUE);
}
if (Options::getTemplatesFlags() & Options::LOG_GROUP_MESSAGES) {
CheckDlgButton(hwndDlg, IDC_LOG_GROUP_MESSAGES, TRUE);
}
EnableWindow(GetDlgItem(hwndDlg, IDC_TEMPLATES_FILENAME), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSE_TEMPLATES), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_TEMPLATES_FILENAME_RTL), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSE_TEMPLATES_RTL), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_LOG_SHOW_FILE), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_LOG_SHOW_URL), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_LOG_SHOW_STATUSCHANGE), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_LOG_SHOW_NICKNAMES), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_LOG_SHOW_TIME), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_LOG_SHOW_DATE), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_LOG_SHOW_SECONDS), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_LOG_LONG_DATE), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_LOG_RELATIVE_DATE), bChecked);
EnableWindow(GetDlgItem(hwndD
|
请发表评论