Click here to Skip to main content
15,918,596 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to change editbox's background color when it is set to read-only? Pin
Carlos Antollini9-Sep-02 9:34
Carlos Antollini9-Sep-02 9:34 
AnswerRe: How to change editbox's background color when it is set to read-only? Pin
adamUK9-Sep-02 9:39
adamUK9-Sep-02 9:39 
GeneralRe: How to change editbox's background color when it is set to read-only? Pin
Vincent Ye9-Sep-02 9:45
Vincent Ye9-Sep-02 9:45 
GeneralRe: How to change editbox's background color when it is set to read-only? Pin
adamUK9-Sep-02 10:04
adamUK9-Sep-02 10:04 
GeneralAccess listbox from view's class Pin
danag9-Sep-02 9:15
danag9-Sep-02 9:15 
GeneralRe: Access listbox from view's class Pin
Dave Bryant9-Sep-02 11:13
Dave Bryant9-Sep-02 11:13 
GeneralRe: Access listbox from view's class Pin
danag9-Sep-02 13:47
danag9-Sep-02 13:47 
GeneralRe: Access listbox from view's class Pin
Dave Bryant9-Sep-02 13:54
Dave Bryant9-Sep-02 13:54 
The same principle applies:

Something like:

void CMyView::DoSomething()
{
CMyDialog dlg( this );

for ( each value in database )
{
CString strValue = GetValueFromDataBase();
dlg.AddValue( strValue );
}

if ( IDOK == dlg.DoModal() )
{
// Do something with it
}
else
{
// Panic / shoot user
}
}

class CMyDialog : public CDialog
{
// All the usual stuff
public:
void AddValue(const CString& strValue);

private:
CStringList m_lstValues;
};

void CMyDialog::AddValue(const CString& strValue)
{
m_lstValues.AddTail( strValue );
}

BOOL CMyDialog::OnInitDialog()
{
CDialog::OnInitDialog();

// Add the values
for ( POSITION pos = m_lstValues.GetHeadPosition() ; pos != NULL ; )
m_lstCtrl.AddString( m_lstValues.GetNext( pos ) );

return TRUE;
}

Dave
GeneralSplitter Window Drawing Pin
insanely4209-Sep-02 9:05
insanely4209-Sep-02 9:05 
GeneralRe: Splitter Window Drawing Pin
.dan.g.9-Sep-02 14:15
professional.dan.g.9-Sep-02 14:15 
GeneralEncrypting Packets. Pin
Mike Doner9-Sep-02 9:01
Mike Doner9-Sep-02 9:01 
GeneralRe: Encrypting Packets. Pin
Joaquín M López Muñoz9-Sep-02 9:11
Joaquín M López Muñoz9-Sep-02 9:11 
GeneralAccess violation reading location 0x00000110. Please help. Pin
Redeemer-dk9-Sep-02 8:57
Redeemer-dk9-Sep-02 8:57 
GeneralRe: Access violation reading location 0x00000110. Please help. Pin
jhwurmbach10-Sep-02 4:09
jhwurmbach10-Sep-02 4:09 
GeneralProblem Find Resources In Extension DLL From ATL Exe Server Pin
Bill S9-Sep-02 8:09
professionalBill S9-Sep-02 8:09 
GeneralRe: Problem Find Resources In Extension DLL From ATL Exe Server Pin
Tomasz Sowinski9-Sep-02 8:21
Tomasz Sowinski9-Sep-02 8:21 
GeneralRe: Problem Find Resources In Extension DLL From ATL Exe Server Pin
Bill S9-Sep-02 8:23
professionalBill S9-Sep-02 8:23 
GeneralRe: Problem Find Resources In Extension DLL From ATL Exe Server Pin
Tomasz Sowinski9-Sep-02 8:30
Tomasz Sowinski9-Sep-02 8:30 
GeneralRe: Problem Find Resources In Extension DLL From ATL Exe Server Pin
Bill S9-Sep-02 8:37
professionalBill S9-Sep-02 8:37 
GeneralDialog Based Apps - Menu & Windows :: MFC Pin
valikac9-Sep-02 7:56
valikac9-Sep-02 7:56 
GeneralRe: Dialog Based Apps - Menu & Windows :: MFC Pin
dazinith9-Sep-02 8:16
dazinith9-Sep-02 8:16 
GeneralRe: Dialog Based Apps - Menu & Windows :: MFC Pin
valikac9-Sep-02 8:15
valikac9-Sep-02 8:15 
GeneralRe: Dialog Based Apps - Menu & Windows :: MFC Pin
adamUK9-Sep-02 8:53
adamUK9-Sep-02 8:53 
GeneralRe: Dialog Based Apps - Menu & Windows :: MFC Pin
valikac9-Sep-02 8:55
valikac9-Sep-02 8:55 
GeneralInvalid OLEVERB structure Pin
Ryan Cromwell9-Sep-02 7:45
Ryan Cromwell9-Sep-02 7:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.