|
I think it's pretty obvious no ?
int Count = m_Username.GetLenght();
MSDN[^] are also very usefull.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
GetAt() returns the character of type TCHAR of the Given index parameter of GetAt() function
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
Ensure that whenever u r using m_string.GetAt(iSomeIndex) ,
Check this condition iSomeIndex<= m_string.GetLength();
else u will get an assertion.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Immunity18 wrote: how i use Getlenght() to find the number or letters ?
GetLength()
int nCount=m_UserName.GetLength();
GetAT()
ASSERT(m_UserName.GetAt(0)=='t')
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I guess there *is* such a thing as a stupid question...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Ah, John, you finally got your sig fixed.
~RaGE();
|
|
|
|
|
Hi,
I have problem with inserting image in the HeaderCtrl of CListCtrl..
I tried to insert a column a follows
InsertColumn( 0, "text", LVCFMT_LEFT, 100 );
soon after this statement I called the GetItem of the headerctrl as follows
HDITEM stHeaderItem = {0};
stHeaderItem.mask = HDI_IMAGE;
stHeaderItem.iImage = -1;
GetHeaderCtrl.GetItem( 0, &stHeaderItem );
Now I am getting the image index as 0.The expected result is -1( Since i haven't set any image).
Why this is happening?
nave
|
|
|
|
|
iImage parameter is the Zero-based index of an image within the image list
no matter you are setting image or not
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
By setting image I mean setting the Iimage member of the LVCOLUMN structure
nave
|
|
|
|
|
Try Using this:
<br />
CImageList *ImgHeaders = new CImageList; ImgHeaders->Create(Bitmap ID, 16, 3, RGB(255, 0, 255));<br />
HDITEM hditem;<br />
CHeaderCtrl *headerCtrl;<br />
headerCtrl = new CHeaderCtrl();<br />
headerCtrl = m_pScanList.GetHeaderCtrl();<br />
headerCtrl->SetImageList(ImgHeaders);<br />
<br />
<br />
for (int i = 0; i < headerCtrl->GetItemCount(); i++)<br />
{<br />
hditem.mask = HDI_IMAGE | HDI_FORMAT;<br />
headerCtrl->GetItem(i, &hditem);<br />
hditem.fmt |= HDF_IMAGE;<br />
if (i == 0 )<br />
hditem.iImage = Image ID;<br />
else<br />
hditem.iImage = Image ID;<br />
<br />
headerCtrl->SetItem(i, &hditem);<br />
}
Cheers
"Peace of mind through Technology"
|
|
|
|
|
What happens if I explicitly set the image number to 0 while inserting? By the above code I cannot distinguish them..isn’t it?
nave
|
|
|
|
|
Hi. Why the clone function doesn't change pixelformat when cloning the whole image?
When I have loaded bitmap that is 256x256 and has 8bpp, the new image that is written in bitmap2 object has still 8 bpp:
Bitmap * bitmap2 ;
bitmap2 = bitmap->Clone(0, 0, 256, 256, PixelFormat16bppRGB555 ) ;
But when I'll try to clone some part of it, lets say 255x256 or 256x255 the new PixelFormat of image saved in bitmap2 is 16bpp.
Why is that ?
How can I change the format of pixels not using Bitmap::ConvertFormat() function which is not included in GDI+ 1.0.
|
|
|
|
|
Dear all,
I would like to know what the Dispatch message actually does?I havent quite understood what it does?
does it send the message to the message queue?
thanx!
|
|
|
|
|
namasthe,
Dispatch message will send the message to the corresponding applications
window procedure.
r u from AP???
Regards,
Prashanth.v
|
|
|
|
|
what if the application has no window?....then?
nope not from AP!....
thanx!
|
|
|
|
|
The system automatically creates a message queue for each thread. If the thread creates one or more windows, a message loop must be provided; this message loop retrieves messages from the thread's message queue and dispatches them to the appropriate window procedures
You create a message loop by using the GetMessage and DispatchMessage functions.
// Start the message loop.
while( (bRet = GetMessage( &msg, NULL, 0, 0 )) != 0)
{
if (bRet == -1){
// handle the error and possibly exit
}
else{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
} // Return the exit code to the system.
return msg.wParam;
The DispatchMessage function dispatches a message to a window procedure. It is typically used to dispatch a message retrieved by the GetMessage function
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
what if tehre is no window for taht thread?...then?where does teh message go?...moreover how is routing the mesg to a particulatr window possible?....Dispatch Message has only one parameter.....????
cheerz!
|
|
|
|
|
Hi,
Can you tell me how to create a simple application to extract all text in current prompt window and then save it as a text file!
I can do it by hand but i still want to create an application to do that!
Thank!
|
|
|
|
|
Try this..
HANDLE hStdout;<br />
SMALL_RECT srctReadRect; <br />
CHAR_INFO chiBuffer[160];
COORD coordBufSize; <br />
COORD coordBufCoord;<br />
<br />
<br />
hStdout = GetStdHandle(STD_OUTPUT_HANDLE); <br />
<br />
if (hStdout == INVALID_HANDLE_VALUE )<br />
{<br />
}<br />
<br />
<br />
srctReadRect.Top = 0;
srctReadRect.Left = 0; <br />
srctReadRect.Bottom = 1;
srctReadRect.Right = 79; <br />
<br />
<br />
coordBufSize.Y = 2; <br />
coordBufSize.X = 80; <br />
<br />
<br />
coordBufCoord.X = 0; <br />
coordBufCoord.Y = 0; <br />
<br />
<br />
fSuccess = ReadConsoleOutput( <br />
hStdout,
chiBuffer,
coordBufSize,
coordBufCoord,
&srctReadRect);
if (! fSuccess) <br />
{<br />
printf("ReadConsoleOutput (%d)\n", GetLastError()); <br />
return;<br />
}
Now create a File and write the Buffer into it
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
|
A shellExecuting command >> text.txt would help?
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
I still dont know!Can you explain more...
|
|
|
|
|
Hi All,
can we set flat scrollbars for ListBox control?
-Sarath
|
|
|
|
|
For that you can customize your ListBox
There are to much articles on customization of the Listbox control
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
can u suggest one?
-Sarath
|
|
|
|