|
Maybe you forgot to place the ampersand before the character that you want to be underlined
|
|
|
|
|
Sorry, I kept it. My application is working fine in other os. like Windows - 2000, NT. But not in XP.
Nice talking to you.
|
|
|
|
|
G Haranadh wrote:
If I pressed alt key then only they are apearing
That's the default behavior in XP. You can change it in Control Panel - Display - Appearance - Effects - Hide underlined letters for keyboard navigation until I press the Alt key.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
The actual problem is I could not satisfy all clients by saying, disable this behavior. I have to disable programatically particularly to my application. It should not effects other applications. Can we do this? Thank you for replying.
Nice talking to you.
|
|
|
|
|
G Haranadh wrote:
The actual problem is I could not satisfy all clients by saying, disable this behavior.
Why not? It's a system setting, and applications are expected to respect those settings, not to override them. The same goes for fonts, colors, sizes, etc.
I can understand some client may want to always see the underlines, but then he probably also want to see them in all the applications he use, so changing it at the system level is what he needs.
What am I missing?
That being said...
G Haranadh wrote:
Can we do this?
It may be possible, but I don't know how or at what cost...
G Haranadh wrote:
Nice talking to you
Same here.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
CStrings are used to declare string, right. But what if I want to check for the individual contents of the string. In Turbo C, strings are declared as char myString[10]; wherein you can access every single character in the string by ch = myString[5];
How will I going to be able to do it in Visual C++? coz if I used CString as a variable type, myString[5] is an error.
|
|
|
|
|
CString has an operator[] to access individual characters, although it is read-only.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | 1ClickPicGrabber | NEW~! CP SearchBar v3.0 | C++ Forum FAQ
"Just because the box has 2 gigabytes of memory doesn't mean you get to use it all!"
-- Rico Mariani, CLR perf guy
|
|
|
|
|
thanx,.,. ok, then do i have to use char myString[max] or is there another variable type that I could use?
|
|
|
|
|
You can use the member function CString as GetAt().
For eg.,
CString strName;
strName.GetAt(0);
strName.GetAt(1);
....
....
....
You can use GetLength() function of CString and loop through all the characters.
Regards,
Neelesh K J Jain.
Don't Forget to Rate the replies when they help you.
|
|
|
|
|
Is strName.GetAt(1) a read-only or I can also assign characters to them?
|
|
|
|
|
There's a corresponding SetAt function.
CString members
He is smart. He will make our Windows go.
|
|
|
|
|
|
Its a read-only, for assigning characters at a particular location, use SetAt() member function.
Don't forget to rate the replies which helps you.
|
|
|
|
|
benjnp wrote:
How will I going to be able to do it in Visual c++
What about CString::GetAt(..)
"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 created a dialog-based MFC project, I inserted a menu on the resources and put some items. I was able to place commands on the items on the menu but the shortcut keys aren't working at all. I've inserted an Accelerator on the resources and placed the shortcut keys but again the shortcut keys (ctrl+_) aren't working. Did I miss something? Bcoz shortcut keys are working when I created SDI in MFC project.
|
|
|
|
|
|
I tried the link but my program now closes because of an error. It started to run but a warning message saying that it has an error then it will be closed.
Is there any other way on how to place a shortcut on a dialog-based MFC project?
|
|
|
|
|
Hello Friends,
I am having a problem with the ToolBar Control of my SDI application.
I am having few buttons and in between one combo box. I am trying to delete one button before combobox at runtime based on satisfying a condition.
I am able to Hide the button, but all the other buttons on its right hand side are moving, but the combo box is not moving at all due to which the button next to the combobox is getting overlapped by combobox.
Please help to overcome the above problem. Its very important for me to work this one.
Thanks alot in Advance.
Neelesh K J Jain.
|
|
|
|
|
I want to determine the existing drives in my PC viaa program. I was able to do that by using FindFirstFile, if it does not able to find any single file on the path (e.g "c:\\*"), then it means that the drive does not exist, and it worked out well but the problem is that I don't know if the drive detected is a CD drive, a USB, etc. Do you guys know how will I going to determine the Drive specifically if its a normal hard disk or a CD, DVD, USB, etc? Thanx
|
|
|
|
|
|
Thanx Michael, just exactly what I need
|
|
|
|
|
benjnp wrote:
Do you guys know how will I going to determine the Drive specifically if its a normal hard disk or a CD, DVD, USB, etc? Thanx
Here is wrapper for that :-
CNMPDrivesClass[^]
"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
|
|
|
|
|
Guys, I REALLY need help. My program works but it does not give me the outcome I am looking for. Let's say I have this input:
110.0 12.4 -10.0 16.1 78.9 123.0 -2.0 59.3 66.5 658.45 -1.1
My program should sort these numbers up to the negative and than print, than it should keep on reading, sorting and when it hits negative again, it should print again. Like this:
110.0 12.4
123.0 78.9 16.1
658.45 66.5 59.3
My problem is that my program sorts ALL the numbers and gives an output like this
12.4 16.1 59.3 66.5 78.9
and so on whithout breaking on the negative. Can somebody look at my code and tell me what do I do wrong? Your help is greatly appreciated!!!
#include <iostream>
#include <cstdlib>
#include <stdlib.h>
using namespace std;
void bubbleSort(double array[], int size);
double *getDouble(int & numbersRead)
{
int arraySize = 0;
double inputVal;
double *array = NULL; // Initializing to NULL pointer
numbersRead = 0;
cout << "Please, enter any number of integers: ";
cin >> inputVal;
while(inputVal != -1.1)
{
if(numbersRead == arraySize)
{
double *original = array;
array = new double [arraySize * 2 + 1];
for(int i = 0; i < arraySize; i++)
array[i] = original[i];
delete [] original; // Safe if original is NULL
arraySize = arraySize * 2 + 1;
}
array[numbersRead++] = inputVal;
cin >> inputVal;
}
return array;
}
int main ( )
{
double *array;
int size;
array = getDouble(size);
for (int j = 0; j < size; j++)
{
if (array[j] > 0)
bubbleSort(array, size);
cout << array[j] << " ";
cout << endl;
}
delete [] array;
return 0;
}//end of main
void bubbleSort(double array[], int size)
{
int last = size - 2;
int isChanged = 1;
while(last >= 0 && isChanged)
{
isChanged = 0;
for(int k = 0; k <= last; k++)
if(array[k] < array[k+1])
{
double temp;
temp = array[k];
array[k] = array[k+1];
array[k+1] = temp;
isChanged = 1;
}
last--;
}
}
|
|
|
|
|
Hi,
maybe this one works:
void sort(double* Array, int Begin, int End)
{
for(int i = Begin; i < (End - 1); i++)
{
int m = i;
for(int j = (i + 1); j < End; j++)
{
if (Array[m] < Array[j])
{
m = j;
}
}
double d = Array[i];
Array[i] = Array[m];
Array[m] = d;
}
}
void show(double* Array, int Begin, int End)
{
for(int i = Begin; i < End; i++)
{
cout << Array[i] << " ";
}
cout << endl;
}
int main(int argc, char** argv)
{
const int size = 11;
double array[size];
array[0] = 110.0;
array[1] = 12.4;
array[2] = -10.0;
array[3] = 16.1;
array[4] = 78.9;
array[5] = 123.0;
array[6] = -2.0;
array[7] = 59.3;
array[8] = 66.5;
array[9] = 658.45;
array[10] = -1.1;
int start = 0;
for(int i = 0; i < size; i++)
{
if (array[i] < 0)
{
sort(array, start, i);
show(array, start, i);
start = (i + 1);
}
}
return 0;
}
Regards
Achim Klein
We can do no great things, only small things with great love. - Mother Theresa
|
|
|
|
|
If the array ends with a positive number:
int main(int argc, char** argv)
{
const int size = 13;
double array[size];
array[0] = 110.0;
array[1] = 12.4;
array[2] = -10.0;
array[3] = 16.1;
array[4] = 78.9;
array[5] = 123.0;
array[6] = -2.0;
array[7] = 59.3;
array[8] = 66.5;
array[9] = 658.45;
array[10] = -1.1;
array[11] = 100.0;
array[12] = 200.0;
int start = 0;
for(int i = 0; i < size; i++)
{
if (array[i] < 0)
{
sort(array, start, i);
show(array, start, i);
start = (i + 1);
}
}
if (start < i)
{
sort(array, start, i);
show(array, start, i);
}
return 0;
}
We can do no great things, only small things with great love. - Mother Theresa
|
|
|
|