|
Hi,
Please show me how to append text into the editbox.
I have a editbox, with has the associated variable:
CEdit m_Edit;
CString m_StringEdit;
I use this function to display text in the editbox:
void CMyEditClass::DisplayOnDebugWindow(CString debugdata)
{
UpdateData();
m_StringEdit = debugdata;
UpdateData(FALSE);
}
the problem is each time, when I use this function, only the new debug data is displayed. The current display data in the editbox is flushed out. I want to append the new debugdata into the editbox. Please show me how to do this.
Thank
Jim
Jim
|
|
|
|
|
CString text = m_Edit.GetWindowText();
text += NewText;
m_Edit.SetWindowText(text);
You may be right
I may be crazy
But it just may be a lunatic you’re looking for
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Pj,
Thank you so much. It works!
Jim
Jim
|
|
|
|
|
Hello,
I am able load image (*.bmp,*.tiff,*jpg)on Cstatic picture control using gdi+ API graphics.Drawimage() and it fits to my cstatic resized box of MFC dialog based application.
when i load large images of size 80MB or 1GB tiff it takes hell lot time
and i need to process it using my interpolation algorithm for getting result image this goes double the time of loading. made me unconsiderable code/appln.
so i decided to copy only Cstatic loaded images for algorithm process stucked up how to copy image data with reduced image size.
please help on this regard
thanks in advance
Neel
|
|
|
|
|
hi,
i've got another question... this time about system tray icons. i've looked at chris's article at http://www.codeproject.com/shell/systemtray.asp but i'm doing something wrong (obviously). i don't know where to put CSystemTray m_TrayIcon;. can someone tell me? i think if knew that i could figure out the rest from the article.
thanks in advance,
sam kline
|
|
|
|
|
Sam Kline wrote: i don't know where to put CSystemTray m_TrayIcon;. can someone tell me?
It's a member of the dialog class, or the CFrameWnd class if you are doing an SDI or MDI application.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
so where do i put it?
i can't find a place.
thanks for the help,
sam kline
|
|
|
|
|
Sam Kline wrote: so where do i put it?
In the class' declaration, which is usually the .h file.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Use CBS_DROPDOWNLIST style
Manish Rastogi
|
|
|
|
|
manish rastogi wrote:
Use CBS_DROPDOWNLIST style
What does this style have to do with the subject?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
|
|
|
|
|
hi,
i've got a pretty simple question about comboboxes. i want to make the combobox 'read only' so that my code can still add items to it, but the user can't add his/her own things to it. does anyone know how i can do this?
thanks in advance,
sam kline
|
|
|
|
|
It's actually one of the comobo box styles, I think it's called 'Simple dropdown'. Depending on your IDE version, there is a property somewhere for this.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
oh yeah, i see that.
thanks,
sam kline
|
|
|
|
|
Drop list is what you're looking for.
-- modified at 15:54 Sunday 19th February, 2006
|
|
|
|
|
Use CBS_DROPDOWNLIST style.
Manish Rastogi
|
|
|
|
|
hi every one,
i've been asking a question about Chris Maunder's CGridCtrl about displaying it which remains unanswered : here[^]
i hope that one of you could help me in this direction.
thanks...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.24][3.0 soon...]
|
|
|
|
|
I use CButtonST Class to enhance checkbox in Dialog.
but according to the example of CButtonST ,I can't success.
who know why? thanks.forgive my poor english.
//dlg.h
CButtonST m_chkCheckbox;
//dlg.cpp
DDX_Control(pDX, IDC_CHECK, m_chkCheckbox);
BOOL CDlgDisk::OnInitDialog()
{
CDialog::OnInitDialog();
m_chkCheckbox.SetIcon(IDI_LEDON,IDI_LEDOFF);
return TRUE;
}
|
|
|
|
|
|
Hi,
How can i create a Right-Align Tree Control ?!!!
I checked Right Align Text and Right to Left Reading properties but it doesn't work and the items still insert from Left ...
Regards,
Hadi
|
|
|
|
|
I have a dialog/tree based application (VC++ 6.0 MFC) and have implemented a System Tray icon with a context menu. The main application gets all the correct notifications and does all the right things.
Now I want to change the context menu depending what the user does within the main dialog application e.g. when they select an entry from the tree displayed in the dialog, I want to add details of that entry to a popup menu off of the system tray context menu.
e.g. if the system tray menu looks something like:
Lock
Recent Entries -> Clear Entries
Minimize
Restore
Exit
when they click on "entry1", the next time they get the contect menu from the system tray, it would look like:
Lock
Recent Entries -> Clear Entries
entry1
Minimize
Restore
Exit
and so on for every item selected in the tree up to a predefined maximum.
Similarly, I want to be able to clear all these entries from the main application (just as if the user had selected the "Clear Entries" memu item above using the actual context menu).
My problem:
I can't get to this menu from the main dialog application to be able to use AppendMenu and RemoveMenu calls!
GetMenu only gets the menu associated with the main dialog application.
All help gratefully received.
|
|
|
|
|
I would have the tray menu handler construct the menu dynamically from information it retrieved from the dialog, rather than the other way around as you've described.
Software Zen: delete this;
|
|
|
|
|
I agree and I thought of doing it about 20 minutes after posting my question.
But thank you anyway for confirming what I eventually worked out and thank you for responding.
|
|
|
|
|
You're welcome .
Software Zen: delete this;
|
|
|
|
|
This now works but I have a different but related problem.
In my example above, how can I detect a left and a right mouse click on the menu item "entry1" and process them differently?
Lock
Recent Entries -> Clear Entries
entry1
Minimize
Restore
Exit
I can use flags "TPM_LEFTBUTTON | TPM_RIGHTBUTTON" in the call to TrackPopupMenu so that both left and right mouse clicks are accepted and I have used Spy++ to prove that the Windows message for WM_LBUTTONUP and WM_RBUTTONUP are generated - but I need to get the information on which button has been pressed on the menu item to the routine in my dialog application that is notified of a click on that menu item via the:
"ON_COMMAND( id, memberFxn )" and "afx_msg void memberFxn( );" statements.
Again all help gratefully received.
|
|
|
|
|