|
It wont compile:
void CEnchangeView::OnButtonisdigit()
{
CString x = "1234";
int nret = isdigit((int)x);
}
I'm trying to figure out which of my strings are numerical.
Appreciate your help,
ns
|
|
|
|
|
Get each charecter from the CString with GetAt method and check it's ascii value.
hope that would help
- Nilesh
|
|
|
|
|
Thanks for the hint. I think its fine, since its returning nonzero values (is a digit).
Appreciate your help,
ns
|
|
|
|
|
Here ya go.
bool isDigitString (CString strDigits)
{
long nValue;
bool bIsDigits = (sscanf (strDigits.GetBuffer(0). "%d", &nValue) == 1);
strDigits.ReleaseBuffer();
return (bIsDigits);
} PS: My mom says hi! Last weekend she asked me "What's Java?". Blew my mind!
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I am rapidly accumulating a word doc of the snippets i get off CP...handy. Say hello to your mom from me too...BTW I consume mass quantities of Jello (or not so much)....
I have a peculiar system mmenu crash I posted about if you want to check it out (of course you dont have to ).
We get 59 minutes off work tomorrow - yay, but I might have to go help set up some dumb food event at the base here. I got stuck with collecting donations etc. Ugh!
Appreciate your help,
ns
|
|
|
|
|
accumulating a word doc of the snippets i get off CP
Cool!
Say hello to your mom from me
Will do!
system menu crash
Hmm, need more info. As Tomasz said, can you pinpoint where your app dies? Also, is it an ASSERT failure or something else?
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
just posted the update to the crash thread
Appreciate your help,
ns
|
|
|
|
|
Anyone know anything about Forking Emails from within a SMTP Transport Event Sink ?
Thanks,
Alex Cachia.
|
|
|
|
|
Since both concepts are to me completely foreign:
What does "Forking Emails" mean to you, and what would an "SMTP Transport Event Sink" be?
|
|
|
|
|
I have:
( Iforgot how to format the less than sign for CP...)
CString * p;
p = new CString [iArraySize];
for (int i=0;i less than iArraySize;i++)
{
p [i] = pArray[i];
}
int nIndex = InsertItem(LVIF_TEXT|LVIF_STATE, nPos, p[0],0,LVIS_SELECTED,0,0);
ASSERT(nIndex != -1);
if (nIndex < 0) return(nIndex);
for ( i = 1; i (less than) iArraySize; i++) {
SetItemText(nIndex, i, p[i]); }
From MSDN,
BOOL SetItemText( int nItem, int nSubItem, LPTSTR lpszText );
So I think its my third argument thats a problem. How do I fix it so that the two are reconciled?
Thank you and
Appreciate your help,
ns
|
|
|
|
|
Ooooohhhhh my gode!
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
I tried passing in the .GetBuffer of the CString, but that didnt work either:
for ( i = 1; i < iArraySize; i++) {
SetItemText(nIndex, i, p[i].GetBuffer(p[i].GetLength()));
}
Appreciate your help,
ns
|
|
|
|
|
LPTSTR is a typo in MSDN. The actual code uses LPCTSTR, which is just const char * in non-unicode build. You can safely pass CString by value to CListCtrl::SetItemText, your crash is related to something else - I guess you've screwed something with pArray.
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
Many thanks for the response. Just wanted to say that yesterdays CListCtrl multislect problem you helped me with is on its way pretty much. I used GetFirstSelectedItem etc, and have SetCheck working for a multiple select. DOnt have the logic for uncheck if clicking on a selected item figured out yet...the TRACE really helped me see that the itemchanged fired multiple times...
Appreciate your help,
ns
|
|
|
|
|
Is there any way to enumerate the current windows hooks set on the system or is there any way to detect spyware like software ? Does anyone ever worked on a software like this ?
Mauricio Ritter - Brazil
Sonorking now: 100.13560 MRitter
I've gone sending to outer space, to find another race
|
|
|
|
|
Nice idea! Hooking the hooking API!
"In an organization, each person rises to the level of his own incompetence." Peter's Principle
|
|
|
|
|
What about hooking ::SetWindowsHookEx(...) ? Sounds stupid but...
API hook[^].
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
Hi!
I need to catch messages from other applications in my own program
(something like spy++).
When I get the application, but how do I process its messages?
Do you know where I can find an example?
Thanks
Zeljko
|
|
|
|
|
http://www.codeproject.com/useritems/Winspector.asp
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I know this isn't Visual per se, but I thought I'd ask and see....
I writing a little bit of CGI in C, on a Samba Linux web server. I want to use findfirst, but if 'aint implemented!! Anyone know of an alternative, or how to implement it please??
I've used app *.*, and then looked at argv, but in this instance I can't.
Thanks
I feel like I'm diagonally parked in a parallel universe
Jeremy Davis
http://www.astad.org http://www.jvf.co.uk
|
|
|
|
|
Jeremy Davis wrote:
I writing a little bit of CGI in C, on a Samba Linux web server
Off-topic. Anyway, use opendir() and co.
|
|
|
|
|
|
Dear All,
I'm trying to make a program that looks like installer programmes that displays one dialog box at a time. The user will then just have to chose some options and click Next to the next dialog box. Problem is I do not know where to start and how to structure the program.
Can anyone please help me out here.
Many many thanks in advance
Chun Te, Ewe
|
|
|
|
|
Property pages might be your best bet - then you can keep the same main window open, and just switch between pages when the user clicks the next button
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
Hi
So you want to do a wizard: dialog with Next, Prev and Finish button.
All you have to do is to use two classes: CPropertySheet and CPropertyPage. CPropertySheet will be used as a kind of container for the dialogs through which user will be able to iterate. In CPropertySheet look at the functions: SetWizardMode and SetWizardButtons. Add to you program one class that inherites from CPropertySheet and as many as you need classes that inherites from CPropertyPage(one class for every page in wizard). You can find comprehensive explanation in MSDN (start with classes CPropertySheet and CPropertyPage, that should be enoguh).
Greetings
Mariusz Popiolek
|
|
|
|