|
Yes, you're right, david
I'll do just that next time
Still, my problem remains
can anyone help?
|
|
|
|
|
|
Is there a way to insert a item into a list control with the LVIS_STATEIMAGEMASK already set to "checked"?
I am trying to catch a LVIS_STATEIMAGEMASK change in OnLvnItemchanged and I don't want to catch the initial population of the list.
Right now I insert the item into the list control then SetCheck(0) that causes me to catch the LVIS_STATEIMAGEMASK change when the list is first populated.
Any Ideas?
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
RobJones wrote: I am trying to catch a LVIS_STATEIMAGEMASK change in OnLvnItemchanged and I don't want to catch the initial population of the list.
One way around this is to set a flag variable to true before populating the list, and then set it to false after populating the list. Then in the OnLvnItemchanged() method, don't do anything if the flag variable is equal to true. Make sense?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Yeah I'll have to set it up that way... I guess I was just wondering if it was possible to set the lvi to a checked state before inserting it into the control. Guess not.
Thanks for your help!
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
An edit box is being used for displaying the status of loop iterations. It uses the following approach:
ebptr->SetWindowText(s);
UpdateWindow(FALSE);
How can one get the updated edit box text to display before continuing?
Thanks in advance.
-jon
|
|
|
|
|
Even though a WM_PAINT message was sent to the window's queue, it won't get processed because the loop is not yielding control of the CPU.
"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 RedrawWindow() specifing the RDW_UPDATENOW flag to force a WM_PAINT message to be sent to the window.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
|
Hi ,
I am having problem when I assign a string more than 255 characters to a CRecordset memeber like
(m_Result is a CString)
Res->m_Result=str1; (str1 is more than 255 characters)
UpDate();
and I get a exception "Debug Assertion Failed , DBFRX line 287 ".
Is there any other way of setting string more than 255 characters using CRecordset->Update() ???
Thanks,
ZINC
|
|
|
|
|
What type/size of field in your table is m_Result tied to?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
its a ACCESS table and field is of ntext type
|
|
|
|
|
zinc_z wrote: ...and field is of ntext type
Not sure how 'ntext' compares to 'text' but how large is the field?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
|
You have already indicated that m_Result is a CString object. My question was about the field in the database.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
m_Result is bound to of ntext(length 16) type field in SQL Server . I have tried to change the field to varchar (length 700) but no diff. I still got the same exception.
any other sugestions ?
Regards,
ZINC
|
|
|
|
|
When i enter the words rents and will the program will say "will is larger than rents" which is wrong. I can't figure out why it's doing that. I supplied the code below (might have forgot little things like ; or ,). If anyone can tell me what is wrong it would help me a lot. I'm new to C++ programming.
#include <iostream>
#include <string>
using namespace std;
int main()
{
string a, b;
cout << "Enter two words." << endl;
cin >> a >> b;
cin.ignore(10,'\n');
string small, big;
if (a < b)
{
small = a;
big = b;
}
if (a > b)
{
small = b;
big = a;
}
if (a.size() == b.size() && a != b))
{
cout << "Same size, but different string" << endl;
cin.get();
return 0;
}
if (a == b)
{
cout << "Their the same string" << endl;
cin.get();
return 0;
}
cout << big << " is larger than " << small << endl;
cin.get();
return 0;
}
-- modified at 13:53 Friday 10th February, 2006
|
|
|
|
|
will is larger than rents ...
the < or > compare lexicographically; so W is bigger than R.
anyway, in my case, my will will be bigger than my rent ... :->
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Would <= and >= fix the problem? If not what would I have to put there?
|
|
|
|
|
if(a.size() > b.size())
{
....
}
if(a.size() < b.size())
{
....
}
if you are compairing the lengths.
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
no it will not.
R is still smaller ( or equal ) than W, whatever the length of the rest of the strings.
what are you trying to compare ? the string length ? or the lexical order ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I once had a similiar problem so I used the strcmp function. Check out digitalmars.com for the details on dealing with strings, its a great site. Got to the runtime library part.
ALL YOUR BASE ARE BELONG TO MICROSOFT!
Demonware Studios Leader
|
|
|
|
|
I downloaded ISQLMFC_src.zip source code from topic "Interactive SQL Tool (using ODBC)". I used Microsoft Visual Studio .Net 2003 to build it, but I got the following error message: "error C2065: 'm_pchData' : undeclared identifier". What did I miss? Please help me out?
Thank you.
Blakiston
|
|
|
|
|
Hi,
I wanted to learn CommBasic language.... or any language...
where i can write macros....
I decided to learn C, C++... will this be help to me to write
macro on VB flatform.....
SKK
|
|
|
|
|
There ia an arror in the code below , but i am unable to fine some has provided me to find , Please mention it , Thanks
MS_PACKET DataPacket;
memset(&DataPacket,0,sizeof(MS_PACKET));
DataPacket.msHeader.dPacketType = ACM_MSG_SEND_PAIR_ORDER;
strcpy( DataPacket.acmSendPairOrder.m_szAccount ,
szCurrentLogin );
strcpy( DataPacket.acmSendPairOrder.m_szSymbolBuySide ,
pPair->BaseSymbol.szSymbol );
strcpy( DataPacket.acmSendPairOrder.m_szSymbolSellSide ,
pPair->DependentSymbol.szSymbol );
DataPacket.acmSendPairOrder.m_nSharesBuySide =
pPair->BaseSymbol.iNeededShares;
DataPacket.acmSendPairOrder.m_nSharesSellSide =
pPair->DependentSymbol.iNeededShares;
DataPacket.acmSendPairOrder.m_cSideBuySide = 'B';
DataPacket.acmSendPairOrder.m_cSideSellSide = 'S';
DataPacket.acmSendPairOrder.m_nPairID = pPair->nACMPairID;
static int nOrderCounter = 0;
DataPacket.acmSendPairOrder.m_nMPairOrderID = nOrderCounter++;
m_pMTLinkSocket->Send((BYTE*)&DataPacket,sizeof(MS_PACKET));
Regards.
|
|
|
|