|
If the buddy window is a single line edit control, maybe the EN_CHANGE notification
from the edit control?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
The EN_CHANGE is what did it. For some reason I couldn't intercept the scroll messages. Problem solved and thanks again. I'd be lost without the Code Project.
|
|
|
|
|
Cool good to know that works (I didn't test it).
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
How can I:
- assign a variable to a Radio Button control
- set the initial state to such an object
In VC++6, please
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
http://www.codeproject.com/KB/tips/HowToUseGoogle.aspx[^]
In this case, I'd make sure I include the term 'MFC' in my google search.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Why you want to assign the variable for radio?
|
|
|
|
|
to control the initial state
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
You can get a handle to it like this GetDlgItem(IDC_RADIO);
|
|
|
|
|
Tnanks!
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
|
there you go bastard ! ROTFL
|
|
|
|
|
Can someone provide some code that shows how to obtain a single character from a CString that could contain upwards of 1024 characters?
I've tried several methods, but none have worked.
Example:
CString str = _T("Can someone provide some code that shows how to obtain a single character from a CString that could contain upwards of 1024 characters? I've tried several methods, but none have worked.");
======================= end example ==========================
A C++ programming language novice, but striving to learn
|
|
|
|
|
TCHAR c = str.GetAt(0);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Whooaaa there cowboy...you did that without using GetBuffer()? Now you're just talkin' crazy
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
oh, sorry...
TCHAR a = *(str.GetBuffer(10)+5);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Ahhh...it's a thing of beauty!
That always makes me smile hehe
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark, Can you explain what you are talking about? Sounds like something I should already know; but I don't. What I am doing is reading back a CStdioFile that I have save data into (collected from User input in dialogs). Some of this data is float numbers, hence the need to check each character in the CString. I have to use atoi(char) to convert the character which doesn't accept a TCHAR.
A C++ programming language novice, but striving to learn
|
|
|
|
|
You can ignore this off topic discussion with cpallini...
It's a running joke about CString's overly misused GetBuffer() method
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark,
chrs[1] = _T("\0"); // must be NULL terminated!
I get this error: " error C2440: '=' : cannot convert from 'const char [2]' to 'TCHAR'"
any ideas why?
A C++ programming language novice, but striving to learn
|
|
|
|
|
I used the wrong quotes, sorry!
That should be single quotes for a single character...
chrs[1] = _T('\0'); // must be NULL terminated!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark,
I'm getting a compiler error C1001; even after commenting out all the new code in the function. I tried shutting down the switches as help suggest. That doesn't work either. Any ideas?
A C++ programming language novice, but striving to learn
|
|
|
|
|
What's the error and what's the code involved?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I solved the problem by deleting the debug obj file previously created. works now!
A C++ programming language novice, but striving to learn
|
|
|
|
|
I tried that. Here's my code:
TCHAR chr;
int ch = 0;
chr = str.GetAt(0);
ch += atoi(chr);// ERROR HERE: when I try to convert it to int using atoi(chr)
I get this error: "Error 1 error C2664: 'atoi' : cannot convert parameter 1 from 'TCHAR' to 'const char *' c:\users\larry a mills sr\documents\visual studio 2008\projects\logit\logit\editlog.cpp"
A C++ programming language novice, but striving to learn
|
|
|
|