本文整理匯總了C++中Edit_GetText函數的典型用法代碼示例。如果您正苦於以下問題:C++ Edit_GetText函數的具體用法?C++ Edit_GetText怎麽用?C++ Edit_GetText使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了Edit_GetText函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: Edit_GetTextLength
void SelectProxy::ApplyChoice (SpellChecker *SpellCheckerInstance)
{
TCHAR *TBuf = 0;
size_t BufSize = 0;
BufSize = Edit_GetTextLength (HUserName) + 1;
TBuf = new TCHAR [BufSize];
Edit_GetText (HUserName, TBuf, BufSize);
SpellCheckerInstance->SetProxyUserName (TBuf);
CLEAN_AND_ZERO_ARR (TBuf);
BufSize = Edit_GetTextLength (HHostName) + 1;
TBuf = new TCHAR [BufSize];
Edit_GetText (HHostName, TBuf, BufSize);
SpellCheckerInstance->SetProxyHostName (TBuf);
CLEAN_AND_ZERO_ARR (TBuf);
BufSize = Edit_GetTextLength (HPassword) + 1;
TBuf = new TCHAR [BufSize];
Edit_GetText (HPassword, TBuf, BufSize);
SpellCheckerInstance->SetProxyPassword (TBuf);
CLEAN_AND_ZERO_ARR (TBuf);
SpellCheckerInstance->SetUseProxy (Button_GetCheck (HUseProxy));
SpellCheckerInstance->SetProxyAnonymous (Button_GetCheck (HProxyAnonymous));
SpellCheckerInstance->SetProxyType (ComboBox_GetCurSel (HProxyType));
TBuf = new TCHAR[DEFAULT_BUF_SIZE];
Edit_GetText (HPort, TBuf, DEFAULT_BUF_SIZE);
TCHAR *EndPtr;
int x = _tcstol (TBuf, &EndPtr, 10);
SpellCheckerInstance->SetProxyPort (x);
CLEAN_AND_ZERO_ARR (TBuf);
GetDownloadDics ()->Refresh ();
}
示例2: set_settings
/*------------------------------------------------------------------------------------------------------------------
-- FUNCTION: set_settings
--
-- DATE: Febuary 6 2014
-- REVISIONS: none
--
-- DESIGNER: Ramzi Chennafi
-- PROGRAMMER: Ramzi Chennafi
--
-- INTERFACE: void set_settings(HWND hwnd), takes the parent window HWND as an argument.
--
-- RETURNS: void
--
-- NOTES:
-- Whenever the user hits "OK" on the settings dialog box, this function is called. The function will set the current
-- value of the SETTINGS data in the Class Long Ptr to whatever is currently present in the settings dialog box.
----------------------------------------------------------------------------------------------------------------------*/
void set_settings(HWND hwnd){
char ** tempBuffers = (char**)malloc(sizeof(char*)* 4);
for (int i = 0; i < 4; i++){
tempBuffers[i] = (char*) malloc(sizeof(char)* MAX_SIZE);
}
HWND hDlgPORT = GetDlgItem(hwnd, IDC_PORT);
HWND hDlgIP = GetDlgItem(hwnd, IDC_IP);
HWND hDlgSAVE = GetDlgItem(hwnd, IDC_SDISPLAY);
HWND hDlgSPORT = GetDlgItem(hwnd, IDC_SPORT);
HWND hDlgSPRTCL = GetDlgItem(hwnd, IDC_SPRTCL);
HWND hDlgPCKT = GetDlgItem(hwnd, IDC_PACKETSIZE);
HWND hDlgTTS = GetDlgItem(hwnd, IDC_TTS);
SETTINGS * st = (SETTINGS*)GetClassLongPtr(GetParent(hwnd), 0);
Edit_GetText(hDlgPORT, tempBuffers[0], MAX_SIZE);
st->client_port = tempBuffers[0];
Edit_GetText(hDlgSPORT, tempBuffers[1], MAX_SIZE);
st->server_port = tempBuffers[1];
Edit_GetText(hDlgIP, tempBuffers[2], MAX_SIZE);
st->client_send_ip = tempBuffers[2];
Edit_GetText(hDlgTTS, tempBuffers[3], MAX_SIZE);
st->times_to_send = tempBuffers[3];
st->packet_size = ComboBox_GetCurSel(hDlgPCKT);
st->protocol = ComboBox_GetCurSel(hDlgSPRTCL);
SetClassLongPtr(GetParent(hwnd), 0, (LONG)st);
}
示例3: Edit_GetText
//
// GetControlValues
//
void CAudioTransformFrameProperties::GetControlValues()
{
TCHAR sz[STR_MAX_LENGTH];
Edit_GetText(GetDlgItem(m_Dlg, IDC_PARAM1), sz, STR_MAX_LENGTH);
int in=_ttoi(sz);
m_pIZQAudioInterface->put_AudioMode(in);
Edit_GetText(GetDlgItem(m_Dlg, IDC_PARAM2), sz, STR_MAX_LENGTH);
//m_AudioTransformFrameParameters.param2 = _ttoi(sz);
}
示例4: RASBlinkProperties_OnNotify
/* This function handles the WM_NOTIFY message.
*/
LRESULT FASTCALL RASBlinkProperties_OnNotify( HWND hwnd, int code, LPNMHDR lpnmhdr )
{
switch( lpnmhdr->code )
{
case PSN_HELP:
HtmlHelp( hwnd, szHelpFile, HH_HELP_CONTEXT, idsBLINK_RAS );
break;
case PSN_APPLY: {
LPBLINKENTRY lpbe;
HWND hwndTab;
/* Update the blink entry structure.
*/
lpbe = (LPBLINKENTRY)GetWindowLong( hwnd, DWL_USER );
hwndTab = PropSheet_GetTabControl( GetParent( hwnd ) );
if( !TabCtrl_GetEnable( hwndTab, idRasTab ) )
lpbe->rd.fUseRAS = FALSE;
else
lpbe->rd.fUseRAS = IsDlgButtonChecked( hwnd, IDD_USERAS );
/* If we use RAS, we'll need the entry name.
*/
if( lpbe->rd.fUseRAS )
{
HWND hwndList;
/* Get the entry name.
*/
hwndList = GetDlgItem( hwnd, IDD_LIST );
ComboBox_GetText( hwndList, lpbe->rd.szRASEntryName, RAS_MaxEntryName+1 );
/* Get username and password.
*/
Edit_GetText( GetDlgItem( hwnd, IDD_USERNAME ), lpbe->rd.szRASUserName, UNLEN+1 );
Edit_GetText( GetDlgItem( hwnd, IDD_PASSWORD ), lpbe->rd.szRASPassword, PWLEN+1 );
if( ( strlen( lpbe->rd.szRASEntryName ) == 0 ) || ( strlen( lpbe->rd.szRASUserName ) == 0 ) || ( strlen( lpbe->rd.szRASPassword ) == 0 ) )
{
fMessageBox( hwnd, 0, GS(IDS_STR1242), MB_OK|MB_ICONEXCLAMATION );
return( PSNRET_INVALID_NOCHANGEPAGE );
}
Amuser_Encrypt( lpbe->rd.szRASPassword, rgEncodeKey );
}
/* Force the Apply button to be disabled.
*/
PropSheet_UnChanged( GetParent( hwnd ), hwnd );
return( PSNRET_NOERROR );
}
}
return( FALSE );
}
示例5: StartupComplete
void StartupComplete()
{
char str[200];
connection_node conn;
session_node *s;
len_admin_response_buf = 0;
conn.type = CONN_CONSOLE;
s = CreateSession(conn);
if (s == NULL)
FatalError("Interface can't make session for console");
s->account = GetConsoleAccount();
InitSessionState(s,STATE_ADMIN);
console_session_id = s->session_id;
if (Edit_GetText(GetDlgItem(HWND_STATUS,IDC_STARTUP_TEXT),str,sizeof(str)) == 0)
StartupPrintf("No errors on startup\n");
SendDlgItemMessage(hwndMain,IDC_TOOLBAR,TB_ENABLEBUTTON,IDM_FILE_EXIT,MAKELPARAM(TRUE,0));
SendDlgItemMessage(hwndMain,IDC_TOOLBAR,TB_ENABLEBUTTON,IDM_FILE_SAVE,MAKELPARAM(TRUE,0));
SendDlgItemMessage(hwndMain,IDC_TOOLBAR,TB_ENABLEBUTTON,IDM_FILE_RELOADSYSTEM,
MAKELPARAM(TRUE,0));
SendDlgItemMessage(hwndMain,IDC_TOOLBAR,TB_ENABLEBUTTON,IDM_MESSAGES_MESSAGEOFTHEDAY,
MAKELPARAM(TRUE,0));
}
示例6: InterfaceAdminInputProc
long CALLBACK InterfaceAdminInputProc(HWND hwnd, UINT message, UINT wParam, LONG lParam)
{
char buf[200];
switch (message)
{
case WM_CHAR :
if (wParam == '\r')
{
if (InMainLoop() && !GetQuit())
{
/* make sure we've started already, so that session id is valid */
Edit_SetSel(hwnd,0,-1);
Edit_GetText(hwnd,buf,sizeof buf);
cprintf(console_session_id,"%s\n",buf);
EnterServerLock();
TryAdminCommand(console_session_id,buf);
LeaveServerLock();
}
return 0;
}
if (wParam == '\t')
{
SetFocus(GetDlgItem(HWND_ADMIN,IDC_ADMIN_RESPONSE));
return 0;
}
}
return CallWindowProc(lpfnDefAdminInputProc,hwnd,message,wParam,lParam);
}
示例7: Edit_GetText
std::wstring
ds3t::UI::EditBox::get_value_str (void)
{
wchar_t val_str [32];
Edit_GetText (handle, val_str, 32);
return std::wstring (val_str);
}
示例8: OnOk
void OnOk(HWND hW) {
int i = ComboBox_GetCurSel(GetDlgItem(hW, IDC_ETHDEV));
if (i == -1)
{
//adapter not selected
if (Button_GetCheck(GetDlgItem(hW, IDC_ETHENABLED)))
{
//Trying to use an ethernet without
//selected adapter, we can't have that
SysMessage("Please select an ethernet adapter");
return;
}
else
{
//user not planning on using
//ethernet anyway
strcpy(config.Eth, ETH_DEF);
}
}
else
{
//adapter is selected
char* ptr = (char*)ComboBox_GetItemData(GetDlgItem(hW, IDC_ETHDEV), i);
strcpy(config.Eth, ptr);
}
Edit_GetText(GetDlgItem(hW, IDC_HDDFILE), config.Hdd, 256);
config.ethEnable = Button_GetCheck(GetDlgItem(hW, IDC_ETHENABLED));
config.hddEnable = Button_GetCheck(GetDlgItem(hW, IDC_HDDENABLED));
SaveConf();
EndDialog(hW, TRUE);
}
示例9: choosePath
void choosePath( HWND parent, int hostCtlId )
{
HWND hostControl = GetDlgItem( parent, hostCtlId );
BROWSEINFOW dialog;
wchar_t path[MAX_PATH]; // buffer for file name
Edit_GetText( hostControl, path, sizeof(path) );
ZeroMemory(&dialog,sizeof(dialog));
dialog.lpszTitle = L"Pick a CA Path";
dialog.hwndOwner = parent;
dialog.pszDisplayName = path;
LPITEMIDLIST pidl = SHBrowseForFolder ( &dialog );
if ( pidl )
{
SHGetPathFromIDList ( pidl, path );
Edit_SetText( hostControl, path );
IMalloc * imalloc = 0;
if ( SUCCEEDED( SHGetMalloc ( &imalloc )) )
{
imalloc->Free ( pidl );
imalloc->Release ( );
}
}
}
示例10: LookVkeyToItem
/*
* LookVkeyToItem: Handle WM_VKTOITEM messages.
*/
int LookVkeyToItem(HWND hwnd, UINT key, HWND hwndListbox, int iCaret)
{
char buf[MAXNAME + 1];
int len;
len = Edit_GetText(info->hwndFind, buf, MAXNAME);
/* Backspace removes last character, if any */
if (key == VK_BACK)
{
if (len != 0)
{
buf[len - 1] = '\0';
Edit_SetText(info->hwndFind, buf);
}
return -2;
}
/* Add letter character to edit box */
key = tolower(key);
if (key >= 'a' && key <= 'z')
{
if (len < MAXNAME)
{
buf[len + 1] = '\0';
buf[len] = tolower(key);
Edit_SetText(info->hwndFind, buf);
}
return -2;
}
return -1;
}
示例11: text
virtual std::wstring text() const
{
wchar_t buf[512] = { 0 };
Edit_GetText( _hwnd, buf, ARRAYSIZE( buf ) );
return buf;
}
示例12: Edit_GetText
int CHandVuFilterProperties::GetTextSliderCombination(int idc_textbox,
int idc_slider,
int val_old) {
int val_textbox;
int val_slider;
TCHAR sz[4];
Edit_GetText(GetDlgItem(m_Dlg, idc_textbox), sz, 4);
val_textbox = atoi(sz);
// Quick validatation of the field
if (val_textbox < 0) val_textbox = 0;
if (val_textbox > 255) val_textbox = 255;
val_slider = GetSliderPos( idc_slider );
// textbox has priority
if (val_old != val_textbox) {
return val_textbox;
} else if (val_old != val_slider) {
return val_slider;
} else {
return val_old;
}
}
示例13: EndLabelEdit
/**
* name: EndLabelEdit
* class: CPsTree
* desc: exits the labeledit mode
* bSave - tell whether to save changes or not
* return: 0
**/
int CPsTree::EndLabelEdit(const BYTE bSave)
{
TCHAR szEdit[MAX_TINAME];
TVITEM tvi;
WORD cchEdit;
if (bSave && (cchEdit = Edit_GetText(_hLabelEdit, szEdit, MAX_TINAME)) > 0)
{
tvi.hItem = _hDragItem;
tvi.mask = TVIF_TEXT|TVIF_HANDLE;
tvi.pszText = szEdit;
if (TreeView_SetItem(_hWndTree, &tvi))
{
CPsTreeItem* pti;
if (pti = FindItemByHandle(_hDragItem))
{
pti->Rename(szEdit);
}
_dwFlags |= PSTVF_LABEL_CHANGED;
}
}
DestroyWindow(_hLabelEdit);
_hLabelEdit = NULL;
_hDragItem = NULL;
return 0;
}
示例14: delete_columns
/// Generates the truth table.
void MainWindow::generate()
{
delete_columns();
get_variables();
FunctionParser p;
switch(m_mode)
{
case Function:
char func[128];
Edit_GetText(m_hWndFunction, func, 128);
try {
p = FunctionParser(m_variables, func);
} catch(FunctionParser::FunctionParserException& e) {
MessageBox(e.what(), "Function Parser Error", MB_OK | MB_ICONERROR);
return;
}
build_table(&p);
break;
case Minterm:
break;
case Maxterm:
break;
}
}
示例15: Edit_GetText
// Create an array of button mapping data and send it to the parent window
// Return the number of buttons in map
void SppBtnsDlg::SendButtonsMappingData(void)
{
TCHAR text[5];
HWND hEditCh;
UINT count=0;
BTNArr aButtonMap;
aButtonMap.fill(0);
auto size = m_ahEdtBtn.size();
for (UINT i=0; i<size; i++)
{
hEditCh = m_ahEdtBtn[i];
if (!hEditCh)
break;
// Get data from edit box
Edit_GetText(m_ahEdtBtn[i], text, 5);
aButtonMap[i] = (UINT)_ttoi(text);
count++;
};
// Send message to parent window
SendMessage(m_ParentWnd, WMSPP_DLG_MAPBTN, (WPARAM)&aButtonMap, count);
}