|
This still isn't working correctly.
I have changed the systems default locale for non-unicode programs to "Chinese simplified". Now wheneve I open VS the font's have gone haywire. The strange thing is, VS settings claim the font to be "Courier New" ( it obviously isn't ), I have to change to a random font then change it back.
|
|
|
|
|
Maybe you should start thinking about reinstalling your VC ++ :]
|
|
|
|
|
Hi All,
In VC++ 6.0 application, I am using LVITEM (List View).
When i run the application, the list view will update data continuously.
For this to work, i am deleting the old data and inserting new data.
DeleteAllItems()
...
InsertItem() or SetItem()
The problem..
The screen flickers.
Is there any way to update data without deleting?
|
|
|
|
|
Use the SetRedraw() method to turn the redrawing off before updating the list and turn redrawing on again after the list is updated.
m_List.SetRedraw(FALSE)
m_List.DeleteAllItems();
m_List.InsertItem(...);
...
m_List.SetRedraw(TRUE);
m_List.RedrawWindow();
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Thank you very much.
Its working fine.
Another problem...
Since there is huge list of Data. When i am in middle of List View,
Scroll Bar goes up. (May be because of DeleteAllItems())
What may be the solution?
|
|
|
|
|
HMmmmmmmmm In my opinion that's good the scroll bar goes up when you delete all items this is the scroll bar's main task always to be up-to-date with windows. If you don't have any item in your window (in that case List View) why the scroll bar should stay down ? It would be strange and very useless ...hmmm
Unless I haven't understood your qestion/intention
|
|
|
|
|
If you are trying to keep the newest data in view after an update, you will have to use something like this in your CListView -derived class:
CListCtrl &list_control = GetListCtrl();
int count = list_control.GetItemCount();
if (count > 0) {
list_control.EnsureVisible((count - 1),TRUE);
}
Software Zen: delete this;
|
|
|
|
|
Hey folks,
i m trying to make an application for reading a barcode for that i have a BARCODE READER which i can connect with the system thu USB and have to use VC++ 6.0 for developing the application,
So pls help me in doing so...
Thank you
Regards,
Pankaj Sachdeva
|
|
|
|
|
hi !
i am doing the following things for replace my space(' ') replace with '$' for that it gives following.
i have checked with google and msdn but not satisfied.
std::string bufferstrig(buff_input.begin(),buff_input.end());
string newbuff=bufferstrig.replace(' ','$');
Error is following::
error C2661: 'std::basic_string<_Elem,_Traits,_Ax>::replace' : no overloaded function takes 2 arguments.
Amit
|
|
|
|
|
string::replace doesn't do what you want, it's for replacing one range of characters, not a search/replace through the whole string. Use std::replace instead:
std::replace ( bufferstring.begin(), bufferstring.end(), ' ', '$' );
|
|
|
|
|
Hi
Can anyone of you please tell me how to read and write to a USB port.
I have an idea that USB device can be used just like file, but I dont know how to do this?
can u send me peace of code
Best Regards
Deepu
|
|
|
|
|
|
Hi,
I have taken a formview and I placed 3 buttons on it.I need to set a different icon for each of these buttons.In the properties dialog box of the button, I found "icon" checkbox but where should I set which icon I need to have on that button.Hope I am clear.
Thanks in advance.
Taruni
|
|
|
|
|
You can load your icon with LoadIcon and use of CButton::SetIcon for set it.
|
|
|
|
|
Hi Experts
My applicatiom having a WCHAR pointer within a structure.
Whenever i delete WCHAR pointer it display exception
"_ASSERTA(_BLOCK_TYPE_IS_VALID(pHead->nBlockUse));. "
|
|
|
|
|
You have either written past the end of the array, or you have changed the pointer somewhere in your code.
|
|
|
|
|
Some possible causes:
- You're delete ing a pointer which was not new ed.
- You've called delete more than once on the block.
- You're calling delete on in the middle of a block instead of at the start.
- The heap is corrupt.
Steve
|
|
|
|
|
Hi
all
I want to set menu font in my application to Japanese, i want to do this through coding in VC++ so which API and functions are used to do it.
Thanks
Atul M
Atool
|
|
|
|
|
There are many ways to do this.
1. In the resource file, set the font of the dialog to your Japanese font.
2. Override OnSetFont()
3. Use CreateFont() and SendMessage() passing the font and WM_SETFONT
|
|
|
|
|
Hi all,
I m trying to do multi threading .Actually what i want is to run multiple instances of one thread at same time. I m new to multi threading but i have done single threaded applications ...
Can anybody tell me how to do it ???
thanks in advance
Sulabh srivastava
|
|
|
|
|
Try looking at this article[^]. It's a good introduction to using threads.
Software Zen: delete this;
|
|
|
|
|
Hi guys,
I've got some code from a classmate that was developed in gcc, and which I need to compile in VC++. I know that my problem is a result of VC++ wanting me to give a constant size for an array, but frankly I don't want to (it's not in the assignment specs). Don't worry, this isn't an integral part of the assignment, just setting it up. Here's the code that's causing the trouble:
<br />
int fixAtoi(char myAry[], int arySize){<br />
char myAry2[arySize+1];<br />
for (int i=0; i<arySize+1; i++){<br />
myAry2[i]=myAry[i];<br />
}<br />
myAry2[arySize]= '\0';<br />
return atoi(myAry2);<br />
}<br />
it's that second line there...
Like I said, I know what the problem is, but apart from pre-defining the array size, I don't know of a fix.
P.S. I hope you guys can appreciate having to read all that since I wrote it all while learning the dvorak layout (my second attempt).
Thanks guys,
Sean
|
|
|
|
|
int fixAtoi(char myAry[], int arySize)<br />
{<br />
char myAry2 = new char[arySize+1];<br />
<br />
for (int i=0; i<arySize+1; i++)<br />
myAry2[i]=myAry[i];<br />
myAry2[arySize]= '\0';<br />
<br />
int iRet = atoi(myAry2);<br />
<br />
delete [] myAry2;<br />
return iRet;<br />
}
|
|
|
|
|
You may need to change this like,
int fixAtoi(char myAry[], int arySize)
{
char *myAry2 = new char[arySize+1];
for (int i=0; i < arySize ;i++)
{
myAry2[i]=myAry[i];
}
myAry2[arySize]= '\0';
int nRet = atoi(myAry2);
delete [] myAry2;
myAry2 = NULL;
return nRet;
|
|
|
|
|
Using a variable for the size is a non-standard extension. Use new instead to allocate the array.
|
|
|
|