|
It's been a while since I subclassed comboboxes or dealt with them for that matter
How did you get m_purp1 and m_type1 to map to the 2 controls that make up an CComboBox ?
How do I print my voice mail?
|
|
|
|
|
I went to the class wizard and did it there.
m_type1 is a CString and m_purp1 is a CString also
|
|
|
|
|
If you're wanting to update an Edit Box that isn't the one at the top of the Combo Box (which is what it looks like) try this
void CDEPDlg::OnSelchangeCombo1()
{
CString text;
m_type1.GetWindowText (&text);
if(text == "Run #1")
m_purp1.SetWindowText("Test");
}
- Aaron
|
|
|
|
|
Thanks for the help.
I am getting this error,
C:\DEP\DEPDlg.cpp(182) : error C2664: 'void __thiscall CWnd::GetWindowTextA(class CString &) const' : cannot convert parameter 1 from 'class CString *' to 'class CString &'
A reference that is not to 'const' cannot be bound to a non-lvalue
|
|
|
|
|
I took out the & in the (&text) and it worked, and it works, but i have to select the Run #1 twice for the Test to show up in the edit box.
Thanks
|
|
|
|
|
but i have to select the Run #1 twice for the Test to show up in the edit box
Try chaging your message from CBN_SELCHANGE to CBN_SELENDOK. I think the reason you're having to select it twice is that CBN_SELCHANGE is sent before the selection changes, therefore the text, "Run #1" in your case, isn't actually in the edit portion when the message is processed. CBN_SELENDOK is sent after the selection is made. Just use class wizard to remove the selchange and add a selend
- Aaron
- Aaron
|
|
|
|
|
Thanks for your help.
I tried that and I still have to do it twice to get it to show up. Any more ideas?
|
|
|
|
|
Figured that would work, guess not though. Try this
int cur = m_type1.GetCurSel ();
CString text;
m_type1.GetLBText (cur, text);
if (text == "Run #1")
m_purp1.SetWindowText ("Test");
- Aaron
|
|
|
|
|
|
I need to make a Virtual MIDI Port. ( actually several ) I have worked with MIDI just enough to be dangerous. I can trigger physical ports, but I need a way to create dummy ports to re-direct midi from one application to another.
There isn't a whole lot of information available that I've seen out there, but any direction or insight would be greatly appreciated.
Thanks
|
|
|
|
|
Do you need to code one, or just to use one?
The only one I know of that works with current Windows OS's is MidiYoke.. http://www.midiox.com/ [^]
As far as coding goes... no, don't know how that would be done.
|
|
|
|
|
thanks. i knew about midi yoke, but yes, i want to code my own.
i appreciate the time!
|
|
|
|
|
Hi,
I have a multi-threaded c++ application. I was wondering how I can calculate the memory footprint of my application and CPU % per thread from the program itself.
Please advise.
|
|
|
|
|
Search the message boards
This subject has been addressed countless times...
I personally say...you can't (Win98 anyways) without a VxD, but on NT/XP systems I believe there are API functions you can call to retrieve this info...
I believe Win98 resource meter has a logging feature which might output what your looking for in a log file, you can then parse and display as required...
Cheers
How do I print my voice mail?
|
|
|
|
|
I want to get a record from MyTable which GroupID=3 AND account='abc' AND usename='tom'" but it alway ERROR "Too few parameters"
<br />
CMyRecordSet is;<br />
str.Format("GroupID=%d AND account=\'%s\' AND usename=\'%s\'"<br />
,iGroupID<br />
,theApp.m_strAccount<br />
,theApp.m_strUsername);<br />
<br />
is.m_strFilter=str;<br />
is.Open();
Too few parameters. Expected 1. <= ERROR
help me
I think I do not do anything wrong in this SQL
it similars with
is.Open(AFX_DB_USE_DEFAULT_TYPE,"SELECT * FROM MyTable WHERE GroupID=3 AND account='abc' AND usename='tom'");
both ERROR
|
|
|
|
|
Hello. Is it somehow possible to disable the linking between VK_RETURN and CDialog::OnOK? Whenever I press ENTER in my dialog, it calls the OnOK, and I would like to avoid this.. Is it possible?
|
|
|
|
|
1) Give the OK button another ID besides IDOK.
2) In the OnOK() handler, don't call the base class CDialog::OnOK() .
http://www.codeproject.com/cpp/cppforumfaq.asp#mfc_dlgclosekeys
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I tried to override OnOK, and yes, the dialog doesn't close, but if I then add an OnKeyDown-handler to my dialog, it never receives any VK_RETURN-notifications.. Is this beacuse MFC "grabs" the VK_RETURN, and sends it to OnOK, or just beacuse I'm doing something wrong?
|
|
|
|
|
Depending on which control has focus, the dialog may not even "see" the key presses. Tell us more of what you are trying to do.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
VK_RETURN actually invokes a default button in your dialog, which happens to be your OK button.
You could unchek "default button" property for it in the resource editor, or at a run time.
|
|
|
|
|
I have a block of data, say name, address, etc (could be 1000's of chars long) that wish to encrypt using a key and then decrypt using the same key. WHERE can I get some source. I checked out Codeproject, doesn't seem to have what I need.
Any help?
TIA
Ralph Krausse
|
|
|
|
|
|
Thanks but that seems a bit over the top for a novice like me...
|
|
|
|
|
|
Hi !! I'm programming under Linux and compiling with GCC (C and C++ code). Where can I find manuals for all the functions and libraries that I can use ??
I've tried to use the gotoxy(int, int) function but there's not "conio.h" and if I include it, it begins to send error messages.
I need a manual (if its downloadable much better) where I can find all the functions and libraries.
Thanks in advance !!
|
|
|
|