|
I dynamically created a button "View" on sub-class of CPropertySheet.
when I press F1 key then click the button, system (?) displays a message "No help topic is associaated with this item".
how to hide or disable the message because I want to use F1 key + clicking the button for something else - not related to help issues?
|
|
|
|
|
you will have to override
OnHelp() handler of the button
|
|
|
|
|
Hi,
I have created a new child window with folowing method in VC++
AfxGetMainWnd()->SendMessage(WM_COMMAND, ID_FILE_NEW);
and directed my output display on this window.
But when I press a key there is no response or LButtonDown Doesn't respond to this window.Only RButtonDown Works on this window.What Should I do to get the focus?
Thanks
Prithaa
|
|
|
|
|
Hi,
I want to read excel files as we read comma delimited files . I want to read them in C++.Can anyone help me?
Prithaa
Thanks
|
|
|
|
|
Ok, so what exactly is the problem?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Can I read excel files in the same way as I can read comma delimited files through fopen() and get() commands and what will be the delimiter in case of excel files
Priya.
|
|
|
|
|
You can ready any file as long as you know its format. Why do you want to read the file directly when Excel Automaton is much easier, and less prone to error(s)?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I want to initialize my static variables to maximum of the value of float, for which i defined:
<br />
const double LogMath::FloatMin = numeric_limits<float>::min( );<br />
const double LogMath::FloatMax = numeric_limits<float>::min( );<br />
const float LogMath::LogMax = log(FloatMax);<br />
const float LogMath::LogMin = log(FloatMin);<br />
in my cpp file (vs.net 2003). On doing so i get weird (?) errors as below:
<br />
error C2589: '(' : illegal token on right side of '::'<br />
error C2059: syntax error : '::'<br />
error C2059: syntax error : ')'<br />
error C2059: syntax error : ')'<br />
Using numeric_limits<float>::min() or numeric_limits<float>::max() in a seperate test exe didnt give any errors.....
Whats happening? Please help.
|
|
|
|
|
This is managed C++ no ? So post in the correct forum[^]
|
|
|
|
|
No, it is standard C++. He is fine where he is at.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
rockychaudhary wrote: const double LogMath::FloatMin = numeric_limits::min( );
const double LogMath::FloatMax = numeric_limits::min( );
Have you tried:
const double LogMath::FloatMin = std::numeric_limits<double>::min( );
const double LogMath::FloatMax = std::numeric_limits<double>::min( );
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
That is what i was doin at first.....
I ended up wrinting the values of min and max of float as
<br />
const double LogMath::FloatMin = 1.17549e-038;<br />
const double LogMath::FloatMax = 3.40282e+038; <br />
But would still love to know what was going on......
And thanks for replyin
|
|
|
|
|
rockychaudhary wrote: I ended up wrinting the values of min and max of float as
const double LogMath::FloatMin = 1.17549e-038;
const double LogMath::FloatMax = 3.40282e+038;
But would still love to know what was going on......
numeric_limits is a member of the std namespace. So, unless you have a using namespace std; or using std::numeric_limits; line somewhere, you have to specify the namespace.
Additionally, numeric_limits is a template that needs the type specified. If you don't include the numeric_limits<double> part, the compiler doesn't recognize it as a type (because it isn't).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
modify first line as 2 lines:
const double LogMath::FloatMin = 0;
double db=numeric_limits::min( );
to see which line is error.
|
|
|
|
|
i modified the code as below:
<br />
const double LogMath::FloatMin = 1.17549e-038;<br />
const double db = numeric_limits<float>::min( );<br />
const double LogMath::FloatMax = 3.40282e+038; <br />
const double dc = numeric_limits<float>::min( );<br />
but ended up with the same errors
any other tips ?
Thanks for replyin
|
|
|
|
|
Hi,
I have created a new child window with the following method
AfxGetMainWnd()->SendMessage(WM_COMMAND, ID_FILE_NEW);
but when I display data on this window, the display starts on the left border of the window and then I need to give CRect.left +10 for the x-coordinate so that the data is properly displayed after the border line and
I can see the border line.
Can I avoid this +10 somehow so that I can directly use
GetClientRect(Rect) and print on Rect.left ?
Thanks
|
|
|
|
|
Take a look at SetWindowOrg() and SetViewportOrg().
Here[^] is an excellent article that you can use to alleviate any confusion you may have about those functions.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Hello, I am try to read an MS-ACCESS 2000 .mdb file with DAOVIEW example included in MSDN. I get error 3343 and I know it is due to DAO 3.51 (I know I need DAO 3.60) but.... what must I do to shift to DAO 3.60 in VC6.0 ?
Regards
giannib2k
|
|
|
|
|
giannib2k wrote: I get error 3343...
This is all but completely meaningless without showing the code snippet that produced the error.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Does this[^] help at all?
(go to MSDN home page and enter DAO 3.6 MFC in the search box...)
Steve S
Developer for hire
|
|
|
|
|
Yes, it helps a lot
Problem solved
thanks
|
|
|
|
|
Hey,
please help me. I've got a SDI-App with a non modal dialog. The dialogs only task is to choose parameter (e.g. in a listbox) for my application.
After selecting an item in the listbox (on dialog) the focus should move to my a control (choosen by listbox) in my cformview(e.g. CEdit - Control).
I handle the OnLvnItemChangedList message in my dialog. In this function I post a message (WM_SETFOCUS) to my (formview) window. But the focus returns immediately back to my dialog.
When I set the focus to my mainwnd (by mouseclick) the focus is in the right control. But how can I set the focus to my mainfrm automatically?
Thanx for your help
|
|
|
|
|
if u set focus to parent formview, the parent will set focus to its child which has focus before the parent gets focus automatically - so ur dialog gets focus back.
in ur function - OnLvnItemChangedList - u should tell formview where to send focus.
i.e. post a message to formview with wParam==control's ID, so in formview, u send focus to the control.
|
|
|
|
|
I tried your suggestion, but with partial success. When my dialog has the focus before I select an item on the listbox it works fine, but if the focus is on my formview or mainfrm and I select on item, the focus wents to my formview for a second and then switched back to my dialog...
|
|
|
|
|