1. passing CListBox contents dlg-to-dlg
Hi,
I've been searching around and can't find any discussion on this particular
issue:
I have multiple dialogs with "next" and "back" buttons. On one of the
dialogs I have 3 listboxs that the user is able to enter multiple items,
for example, names. Since I want to allow the user the ability to go back
to the previous dialog (should they wish to change anything) I have been
trying to pass the listbox info from dialog to dialog. However, I haven't
figured out a good way to do this. I have tried to create a CListBox for
each of the lists that I have and to put a listbox on each page (hidden for
those dialogs that don't have that particular entry). However, I keep
getting an ASSERT failure when I try to do the AddString for the listbox
content that I'm passing. Here is an example:
// some temp variables
char temp[MAXSTR];
int i;
// COPY NAMES LIST VALUES
// Here I'm trying to copy the m_listNames list that I got from the user
// on the CURRENT dialog, into the m_listNamesin list that I have defined
// on the previous dialog to save the content, so that I can restore it to
// this dialog when the user clicks NEXT and comes back to this one.
memset(temp, 0, sizeof(temp));
prevDlg.m_listNamesin.ResetContent();
for (configPersonalFilter::m_listNames.GetText(i=0, temp);
strcmp(temp,"") || i >= MAXURL;
configPersonalFilter::m_listNames.GetText(++i, temp))
{
// When I do the AddString, I get the Assert failure:
prevDlg.m_listNamesin.AddString(temp);
strcpy(temp, "");
} // end for
Any help/sample-code would be greatly appreciated! :-)
Thanks,
Glenn
3. Rich edit control and having a hypertext control to send the messages to windows
Hi
Here is the code to detect that if a click is made on word "START". But
I have many "START" word Is there any way to detect which "START" word
has been clicked?
Please Let me know if any
Thanks
Anup
void CRichEditGSDlg::OnLinkRicheditStatic(NMHDR* pNMHDR, LRESULT*
pResult)
{
ENLINK *pLink = reinterpret_cast<ENLINK *>(pNMHDR);
FINDTEXTEX findText;
*pResult = 0;
if( pLink->msg == WM_LBUTTONDOWN )
{ long lStart = pLink->chrg.cpMin;
long lEnde = pLink->chrg.cpMin;
m_Ctrl_RichEditStatic.SetSel(pLink->chrg);
CString strLink = m_Ctrl_RichEditStatic.GetSelText();
if( 0 == strLink.CompareNoCase(_T("START")) )
{
GetTopLevelParent()->Sendmessage(WM_START_CHAT_WITH,0,0);
//START with the person below whom the start link is clicked.
}
m_Ctrl_RichEdit.SetFocus();
}
}
4. IP Address Edit Control -- am I going mad? - Delphi VCL Component
5. Newbie Question: Print edit control contents
Hi, I am new to VC++ and MFC and I am trying to print the contents of a multi-line edit control. The contents will be somewhat formatted (I.E. Date followed by user entered notes followed by 2 empty lines). What I would like to do is create a simple header for my printing that give a report name and possibly a page number. It is possible that the edit control may contain more text they will print on a single page which means I may have to account for multiple pages. Currently I am opening the CPrintDialog to allow the user to select a printer but I am not sure how to access the contents on the edit control and how then to get it properly formatted to the printer. Is their a simple way to do this? Also, since my edit control can contain more lines that are longer then the page is wide, will this have to be accounted for? Thanks! -Chris
6. Getting the contents of a TEXTAREA from a control in an embedded frame
7. Getting a handle to the contents of a window's contents
Hi everyone, What Windows API should I use if I wanted to access the contents of a window's contents. For instance, if I were to open a file in Word, or browse a site using Explorer, how would I parse the text that I am viewing? TIA Paul