|
Try this...
POSITION pstPos = GetFirstSelectedItemPosition();
while( pstPos )
{
const int nItem = GetNextSelectedItem( pstPos );
SetItemState( nItem, 0, LVIS_SELECTED );
}
|
|
|
|
|
Hi,
How can I get the System Harddisk Serial Number in MFC. I need HD Serial number for Security isssues related to my project.
Thanking You
with regards
swamy
|
|
|
|
|
Either can use WMI or have a look at this[^] article by dmihailescu.
Though there is some .net related stuff, it uses native API's to extract required information.
Prasad
MS MVP - VC++
|
|
|
|
|
|
Hi,
Can anybody pls tell me how to handle Exceptions in Constructor,in MFC?
Thanks
Today is a gift, that's why it is called the present.
|
|
|
|
|
what's the problem exactly ?
can't you just handle it as you do anywhere else ?
moreover, if you have an exception in a constructor, it's probably that an error occured and your object might not be constructed correctly... so think twice before catching there.
|
|
|
|
|
Hi all,
I keep getting this exception:
First chance exception at $7C812A5B. Exception class EOSError with message
'System Error. Code: 1400.Invalid window handle'. Process Application.exe (2932)
I have no idea where the exception takes place cause my compile open some funny code that I'm not familier with. does anyone know how to handle such an exception, or maybe what I'm doing wrong.
Many Thanks
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Maybe posting relevant code (your not the one VS IDE prompted) will help.
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.
|
|
|
|
|
CPallini wrote: Maybe posting relevant code
Don't know what code to post, cause I'm note sure where the exception occures, thus posting code would won't help. But I presume that the exception occurs on the OnClose of the form .... right ?
Thanks for the response
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Can you show code snippet?
|
|
|
|
|
When you debug the application and the exception occurs, what does the call stack look like? Can you find any code that you recognize in the call stack? Post that code in that case.
Otherwise you have to explain what you're trying to do when the exception occurs.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
|
Programm3r wrote: for some or other funny reason...the exception is not occuring anymore.....it would seem like the problem is solved.
Ohh, the error has corrected itself...
I just love self-correcting code.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
|
My code:
<br />
CString cstr;<br />
<br />
char s[8];<br />
byte b[8]; <br />
<br />
...<br />
<br />
cstr.Format("%s", s);
cstr.Format("%s", b); <br />
What class, template or object can store byte array like Cstring stroe string?
Thanks!
|
|
|
|
|
You can use CArray<unsigned char> or (better) std::vector<unsigned char> .
hanlei0000000009 wrote: cstr.Format("%s", b); /* compile no problem, but content is different between cstr and b */
What are you trying to do? (i.e. you probably have to write your own function to obtain the string representation of the array content...)
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.
|
|
|
|
|
hanlei0000000009 wrote: What class, template or object can store byte array like Cstring stroe string?
CByteArray.
|
|
|
|
|
|
hi...
i am doin files dragdrop task. i want to drop a file in a richedit box,...While dropping a file i want to display the particular file icon also....
how to do that..any idea?
|
|
|
|
|
|
how to read data from every cells of xls (Ms excell) file?
I need sample.
thx
|
|
|
|
|
|
|
I want to use a bitmap array in my project (it is in core c )and i only found exapmle of MFC and Directx application.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
FreeImage - Google is your friend
"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
|
|
|
|