|
|
look at the following article :
http://www.codeproject.com/com/jscalls.asp
|
|
|
|
|
Ya, I had looked on that article, but I don't want browser interfaces and GUI, is there a way to execute javascript by command line programs, with efficiency using microsoft javascript interpreter.
http://www.priyank.in/
|
|
|
|
|
I am doing ISAPI filter to customize authentication users. Problem now is I want to connect to database to search valid users. My database is MS Access. How can i write the code in Visual C++?
Help me...
Thanks
LeeHerng
|
|
|
|
|
I wouldn't imagine the fact that you're within an ISAPI filter would matter all that much. Just look up some of the many samples on the web ( or even right here on Code Project ) to use an Access database, and then copy it into your code.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am using Dev-CPP 4.9.9.2. Whenever i try to use openthread, it says "[linker error] Undefined reference to 'OpenThread'"
What is wrong? OpenProcess works fine, so i dont know whats wrong with openthread...
|
|
|
|
|
OpenThread is only for Windows 2000+, and ME according to the docs, yet OpenProcess has been available since Windows 95. You are not linking to it probably because your WINVER macros are defined as 0x400 (Windows 95 and higher). Up the version on them.
|
|
|
|
|
Ah! Thank you very much, that fixed it completely!
|
|
|
|
|
Hello everyone:
i have a modal dialog which contains many controls for user to operate on so as to continue the work.Now i want to let it embed into the frame,not floating on the screen any more,just like a formview.some one told me to change the dialog as a formview,but there are quite a lot of code i have wrritten based on that dialog.
should i changed it in to a cformview?if that,how can i create it to fit the frame,because on the left side is a big dlgbar.
i am sooooo confused now.is there anyone who can help me?anhthing will be appreciated ,thankx in advance!!!!!!!!!!!
|
|
|
|
|
A formview is basically a surface that you can add controls to like a dialog box, but within a normal windows app, which means you can have tool bars, menus, etc. I'd say that the best thing to do is to make a new formview application, and see if you can copy and paste your control layout between projects. That may work. If not, I'd certainly suggest that a formview is what you need to do anyhow, painful as that may be. You should be able to copy a lot of the code though, just handle the same events, and copy and paste your code between them. If you know how to plumb the MFC message handlers yourself, you can probably do it all by hand.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
thanks for your reply,Christian Graus
can you give me some samples or articles on how to create it ,especially on how to set it the proper size and position?
|
|
|
|
|
I'm not sure what the issue is ? Use SetWindowPos to change the size of your window, and it's position, if required. Why do you need to do this ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
thank you.just as i have referenced before,i want my modal dialog not to float on the screen any more,but to be a part of my frame,which can be resized like a formview. howerver, i don't know howto create it use a function like DoModal().Is there any one who can help me?Thanks in advance!
|
|
|
|
|
You can't, because it will be embedded in your frame. Your best bet would be to use a formview, and then resize the dialog when a button is pushed to show/hide the section that you're wanting to put in your dialog. To do this, either put the stuff you want to show/hide at the far bottom or far right of the form (so it's easy to size the form to hide it ), or put everything else onto a panel, so you can resize the panel to cover/show the controls in question at the top or left of the form. The second way is better, then you can get everything else to autosize on the panel, and only have to manually move one control.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I wrote a windows program using VISUAL C## and MFC, using CEditView.
I find I need to have a scrollable dialog box.
Is this possible in CEditView, or do I have to convert it to CFormView?
This program has multiple dialogs, and some of them are over a screen long.
Thanks...
|
|
|
|
|
I didn't know you could derive a dialog box from a view nowadays, I thought you created a windows app and used CFormView to do that.
If you could derive from CEditView then I assume you could derive from CScrollView instead, which will give you scrolling. CEditView gives you a big fat edit box though, I thought, which is surely not what you want for a dialog box ? I'd suggest you need to examine a more wizard type interface, having people scroll through dialog boxes seems pretty cluttered to me.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi Christian...
I wrote a tax program in C under DOS years ago, and finally converted it to a windows program. So I created a separate dialog for each tax form. It was my first real attempt at VCPlus, so it is not ideal code. CEditView seemed to give me what I needed at the time, except scrollable dialogs. Now I would like to get rid of the 2 to 5 page dialogs and replace them with 1. I'll try CScrollView and see what happens.
Thanks..
|
|
|
|
|
bitron@islandnet.com wrote:
This program has multiple dialogs, and some of them are over a screen long.
Scrolling dialogs are evil. Split them up so the dialogs are smaller and fit on the screen.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi, I have an dialog based app that has an initialisation dialog and a main dialog (property sheet). I have to switch between these dialogs and keep the non active one hidden.
My problem is how do I put a minimize button on a Property Sheet dialog?
Thanks
---
|
|
|
|
|
aaah.....create a new class derived from the CPropertySheet,.....
then,override the virtual function OnInitDialog() OR the PreCreateWindow() function and add te following code......
ModifyStyle(0,WS_MINIMIZEBOX);
thatz it!!!!
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
hi
I have a floating data type precision question.
If I have an array of float (32bit) that cover a very large range of value (say FLT_MIN to FLT_MAX). Can i normalize this array into 0.0 to 0.1 without precision lost (and still maintain it as float)?
(ie i could later de-normalize these floats back into its orginal value)
Thanks in advance
|
|
|
|
|
not_happy0 wrote:
Can i normalize this array into 0.0 to 0.1 without precision lost (and still maintain it as float)?
No - quite obviously if you compress the numbers into a smaller range, you will lose precision. Floating point numbers suffer from precision problems anyhow, you should be using double if you want to improve precision, and a fixed point format if you want to be absolutelt precise.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
can someone please help me????
Implement the class bigNumber that allows one to perform basic arithmetic operations for positive integers with any number of digits. You should correctly overload the arithmetic operators +, - , and *, as well as stream operators << and >>. Your class interface may look as follows. However your are free to use any STL container in place of vector.
#include <vector>
using namespace std;
class bigNumber;
bigNumber operator+ (const bigNumber& lhs, const bigNumber& rhs);
bigNumber operator- (const bigNumber& lhs, const bigNumber& rhs);
bigNumber operator* (const bigNumber& lhs, const bigNumber& rhs);
ostream& operator<< (ostream& ostr, const bigNumber& t);
istream& operator>> (istream& istr, bigNumber& t);
class bigNumber {
public:
bigNumber ();
bigNumber (const string &s);
bigNumber (vector<int> v);
friend bigNumber operator+ (const bigNumber& lhs, const bigNumber& rhs);
friend bigNumber operator- (const bigNumber& lhs, const bigNumber& rhs);
friend bigNumber operator* (const bigNumber& lhs, const bigNumber& rhs);
friend ostream& operator<< (ostream& ostr, const bigNumber& t);
friend istream& operator>> (istream& istr, bigNumber& t);
private:
vector<int> digits;
void reverse ( );
};
|
|
|
|
|
Wow - good to see someone taking a class that requires you to use C++ properly, so many seem to use C with classes.
You need to do your own homework. We're happy to help if you get stuck, but you need to start it yourself. Do you know how to write a class ? A mathematical operator ? An iostream operator ? Where are you stuck here ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
i understand how to do the overloading part of the homework but i dont understand what the difference is between regular integers and the integers of any size
how do i distinguish between them when i am overloading the operators in the bignumber class?????
i do would like for some help and not the solution to the program because i need to skill for my final exams .... could you please maybe give me some insight as to how to even go about this or even let me know what i would have to do differently for overloading these operators.
|
|
|
|