|
A developed a MFC project with a menu resource.
During my program execution, the underline characters of the menu are only shown while the Alt key is pressed; if the menu is opened via the mouse then they are not shown.
How can I change this, so that the underline characters of the menu are always visible?
Teresa
|
|
|
|
|
desktop->right click->properties->appearance->effecte->"hide underlinedletters untill i press ALT key".
suhredayan There is no spoon.
|
|
|
|
|
Teresa Azevedo wrote:
...the underline characters...
These are called mnemonics.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi i'm trying to build a ms access database controller using visual c++ using the ado format. This also has to have client sever using ip addresses. does any one have any example code of a working system?
or a tutorial to follow to conplete this?
regards
|
|
|
|
|
sir i have added Microsoft Forms 2.0 Textbox from the registered active x controls in VC++. while executing my project i can't able to type anything into tha text box. why? pls give me the answers.
|
|
|
|
|
microsoft forms packages are not supposed to be used from other than VB.
suhredayan There is no spoon.
|
|
|
|
|
The question goes to Microsoft insiders (employees). Are there any new classes, controls, etc...?
Software is too expensive to build cheaply...
|
|
|
|
|
Hi ppl.
I have a HWND of a ListCtrl with report style.
I want to know the no of columns it has.
F1 please!
|
|
|
|
|
SendMessage(SendMessage(hListCtrl, LVM_GETHEADER, 0, 0), HDM_GETITEMCOUNT, 0, 0);
|
|
|
|
|
Great!!!
I was about to post this solution myself, but you did it first.
Thanks (beerboy_22);
this is this.
|
|
|
|
|
An one know how to add a shortcut or a program into the folder Network Connections in Control panel?
Thank you in advanced
Long
|
|
|
|
|
Hello, I have started a MFC project in Visual C++ .NET 2002, over Windows 2000. I wanted to use the new XP controls, so I left checked this option in the wizard, and everything was right until I used a wrapper class for CToolBar, this class override the function OnEraseBkgnd() and put a bitmap image as background. Under W2000 works, but under XP the Toolbar appear unchanged, as if the WM_ERASEBKGND message wasn't processed.
Can anyone help?
If it can't be solved, Does anyone know how can I remove the XP controls from the project?.
Thanks.
|
|
|
|
|
I've have the same problem with dialogboxes; you erase the background your way and windows ignores that and does it its way.
A solution I do not like, but works every time: Do your drawing in the OnDraw() or OnPaint(). The problem here is that you may (or may not) see it flicker, since the drawing is actualy being done twice.
Good luck!
Signed: John R. Shaw
|
|
|
|
|
Hi ppl,
I have one more conversion question for you guys.
mdisplay is a cstring variable. I need to convert this to char in order for strtod() to work.
I am using strtod, to convert to float.
thanks in advance.
-hithesh
|
|
|
|
|
CString strPrice(_T("22.5"));
TCHAR* szPrice = strPrice.GetBuffer(strPrice.GetLength());
//do your conversion here
strPrice.ReleaseBuffer();
suhredayan There is no spoon.
|
|
|
|
|
Sorry Suhredayan !
strtod function takes const char * as argument. So no need it to convert into char * you can directly pass CString to it, as CString exposes LPCTSTR operator!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Alok, thats the first thing i tried.
char *stop;
UpdateData (TRUE);
input=strtod(m_display, &stop);
x=input;
m_display is the CString variable, input is double.
ERRORS:
error C2664: 'strtod' : cannot convert parameter 1 from 'class CString' to 'const char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Help me!!!!!!!!!!!!!!!!!!!1
-hithesh
|
|
|
|
|
hithesh wrote:
input=strtod(m_display, &stop);
typecast that!-
input=strtod((LPCTSTR) m_display, &stop);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Alok,
I typecasted it.
Error agian-
error C2664: 'strtod' : cannot convert parameter 1 from 'const unsigned short *' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Help me!!!!!!!!!!
-hithesh
|
|
|
|
|
hithesh wrote:
CString to char conversion
There are many ways to convert the CString to Char*.
Some of them I am going to mention here
Let for every case
CString strToConvert="123.34";
#1 by Copying
TCHAR *szNewString=new TCHAR[strToConvert.getLength()+1];
lstrcpy(szNewString,strToConvert);
#2 By Direct initialization
TCHAR *szNewString=strToConvert.GetBuffer(strToConvert.getLength());
......do What you want to do with string............
…after that…………………..
strToConvert.RelaseBuffer()
#3 directly to function! I.e. in your case strtod
strtod function is like this
double strtod( const char *nptr, char **endptr );
I believe you don't need convert it to anything, as it takes parameter of type const char *
anyways
char *strRet;
DOUBLE dVal=strtod(strToConvert,&strRet);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
What happen to Forum today! every Body is looking for Conversion of string to Double.
Is everybody working on same project?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
ThatsAlok wrote:
Is everybody working on same project?
Did you not get the e-mail? It's due by day's end. Better get going!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
DavidCrow wrote:
Did you not get the e-mail? It's due by day's end. Better get going!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
dunno if its the same project.
I still haven't figured out a way.
Is it because, the cstring is defined in unicode and its storing in wide chars instead of chars?
Can I change the unicode option?
any solutions?
-hithesh
|
|
|
|
|
That is exactly your problem, the error you got before saying that it could not convert from 'const unsigned short *' to 'const char *' was your first hint. It sounds like you are building for Unicode.
You were given slightly incorrect direction by ThatsAlok; CString does have an overloaded operator for LPCTSTR , but strtod takes a LPCSTR . They are only same in ANSI builds; in Unicode builds, LPCTSTR becomes LPCWSTR .
CString is a TCHAR -based object, so you should be using TCHAR -based functions with it. Call ::_tcstod instead of strtod and that should work fine.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|