|
Hi everyone
I called CFileDialog.DoMOdal() like this, for save file.
CFileDialog OpenDlg(FALSE ,"Lic", "*.Lic",OFN_FILEMUSTEXIST| OFN_HIDEREADONLY, "*.Lic", this);
if exist new file name in selected path I want show a warring for file replacing.
How do you do it? Please help me.
|
|
|
|
|
Have a look at OFN_OVERWRITEPROMPT flag.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
thank u very much
good luck & Good bye
|
|
|
|
|
Hi All,
I'm writing an ActiveX control, and one of the methods needs to return an array of bytes. This array then needs to be used in Javascript and posted via the MSXML2.XMLHTTP (send).
I've create a method in my ActiveX class that returns a VARIANT, but what ever way I try to create the VARIANT, this fails.
Either I get "type mismatch" when I try to use the data returns, or I get a "Variable uses an Automation type not supported in JScript".
Does anyone know some easy way to return a byte array and use in javascript?
Cheers,
Jub
"If you're too careful, your whole life can become a f---in' grind." - Mike McD ( Rounders)
|
|
|
|
|
Hello All,
Let me introduce myself. I am a programmer.
I have been implemented encryption algorithm in pure VC++. It is standalone application. It has dialog box for taking source file name (Plain text file) and destination file name (Encrypted text). It is working perfect.
Now I got new requirement that, I have to integrate this algorithm in explorer as toolbar. I created toolbar and integrated my code. Now I have to send some information to server which has been implemented in J2EE. My question is I am which technology I can use to passing information from client VC++ to server J2EE. And also server will send response client has to process.
I have to implement client side program and one of my friend is working in server. He is asking to provide jar file. Can I know how can I do that? Or Can I use JNI or DCOM server? Please suggest me on this.
Thanks in advance,
Chandu
-- modified at 2:00 Thursday 5th July, 2007
|
|
|
|
|
thats not the problem buddy.. which ever technology u use it will work. because the network protocols are independent on the technologies.. so when u r communicating between server and client that communication is between two sockets ....
Vishu,
Software Developer,
Target Corporation.
Bangalore.
|
|
|
|
|
|
Jayapal Chandran wrote: so i got a doubt like dev-c++ may not be completely support writing global hooks in it...
IMHO there should be NO problem.
Jayapal Chandran wrote: i dont want to use visual c++ because i want the code to be in Win32 api...
Actually, you can do Win32 API programming (even plain C) with Visual C++ .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
now it is working... after using the concept of shared variables using #pragma data_seg...
|
|
|
|
|
Jayapal Chandran wrote: it is not working properly...
What's wrong?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Why would you need to store a global variable in a different data segment?
Jayapal Chandran wrote: is pragma the only way to do that?
I'll take a guess and say no.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Go that way, really fast. If something gets in your way, turn."
|
|
|
|
|
I using more than 50 dialog resources in my application..when i click on any of those my system will hang and i have to wait a lot . . .
My System config is...
P4 2.80GHz with 1Gb Ram
Processes running-
AVG antivirus
wdfmgr
svchost(5 instances)
DXDebugService
VsTskMgr
msmgs
mdm
lsass
winlogon
services
cvslock
can any one help me out. . . .
Thanks in ADVANCE . .
|
|
|
|
|
thenewbee wrote: when i click on any of those my system will hang and i have to wait a lot . . .
are you handling the click event of the mouse?
May be there is some indefinete/infinite loop running in your code. I guess it would be very hard to detect the error without you posting some relevant code or describing the exact scenario.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Can you more explain about your program and how do you call them how do you make these dialogs and what are these?
|
|
|
|
|
Oh sorry i forgot to mention - prob is in resource editor not when the program is running...
|
|
|
|
|
When you run your program it works? and did you use of breakpoint on your code?
|
|
|
|
|
its working fine when i run myu program . .. Ima telling about the designing. when im designing the dialog box or any resources. . . my VC6.0 hangs out...
|
|
|
|
|
Are the images huge? Does it happen with all of them, or just a select few? Instead of 50 images, what if your project only had a few?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
There are no images but various controls more than 15 controls in each dialog box.
For all the dialog boxes when i try to add or remove a new control or just change the property of a control, the editor hangs...
The same code works fine in some other systems.
No problem when my project have very few dialogs..
|
|
|
|
|
hello ppl,
i m relatively new to vc++. I need to know how can i create report(s) using the data available in a table in oracle10g database.
To tell you a little about my MFC and VC++ knowledge:
so far i have created an application that receives a string on ethrrnet, parses the string, and puts the extracted data into relevant fields of the table in database.
|
|
|
|
|
Hi to all
Anybody give me the suggestion og reuse of Socket.
In my socket programme,server will receive the client
in server socket , to disconnect the client i used socket shutdown and close to disconnect the client.After another client can connect to the server but they cannot transfer the data between them.This is multi threading programme.
(As my knowledge shutdown and close option is completly end the socket therfore we must restart the socket.)
Give me the suggestion to solve this.
shakumar
|
|
|
|
|
Not very clear about your problem from your post.
Generally, for a server process you will,
1. Initialize Winsock
2. Create a socket and bind it to network interface and port. NOTE: This is the listening socket
3. Then, you can say, prepare the socket to listen for connection request in that socket
4. Then you wait on that socket for incoming connection by accept(..) call.
When this call returns, it will return a new socket where the client is connected. Note that the original listen socket is not used by the connection. You take the new socket returned by accept(..) and do you communication and finally close it. You must not close the socket on which you are listening.
So in that regards, I am not sure in your post, which socket you are closing.
(Even if you are using Unix/Linux the concept remains the same as they are POSIX sockets)
Look at the example given in the link:
http://msdn2.microsoft.com/en-us/library/ms737526.aspx
Within the example, once accept has return with a valid connected socket (a.k.a the 'else' portion of the check)
you can initiate a thread where you will use the socket to do your stuff with the client and close the socket.
You only close the socket you are listening on, when you terminate the server app or you do not wish to listen for connection on that socket any more.
-- Soyuz
-- modified at 1:45 Thursday 5th July, 2007
Wanted to add that, once accept(...) returns, and you deal with you client (either by initiating a separate thread or in the same thread) you need to go back to wait on accept(...) again to server other incoming request.
With the close & shutdown call, I remember an issue about the TCP/IP stack taking some time to actually making the socket available for further reuse and the workaround was (as far as I remember) to set socket option to socket reuse.
|
|
|
|
|
hey pals, i was trying to extract the decimal places out of a "long double" type variable and then store them in an "integer" type variable.
First I stored the long double value in a long integer type value then I subtracted the long integer value from the original long double value, thus, I got the decimal portion of the long double value and I stored tis decimal part into a separate variable.
Now, I under a while loop (which ran uptill the value in the variable holding the decimal part didn't became zero) I multiplied the decimal value holding variable by 10 and stored result in a temporary long double variable, I then copied this new value into an integer variable and subtracted the integer value from the new long double value that left me with one less digit after decimal as i was having initially. NOW until the value of the temporary long double variable doesn't becomes zero this loop runs but this loop is running more number of times as desired. After the value ends in the temporary long double variable, this variable takes up a value = 2.55351e-15 and keeps on running.
How to avoid this ? ? ??????????????????????????????????
|
|
|
|
|
I'm not exactly sure what you are after, but see if this is even remotely close:
double d = 123.456;
char s[16];
sprintf(s, "%.3f", d);
int n1 = atoi(s);
int n2 = atoi(strchr(s, '.') + 1);
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
or maybe you wanted this?
long double IntegerPart;
long double FractionPart = modf(OriginalLongDouble, &IntegerPart);
long lIntegerPart = (long)IntegerPart;
long lFractionPart = (long)FractionPart;
Mark Salsbery
Microsoft MVP - Visual C++
"Go that way, really fast. If something gets in your way, turn."
|
|
|
|