|
Hi.
I'm a beginner of Visual C++ so I have many problems when using VC++.
Because I want to update my application when there is a new application version on server so there is an Update button in my project which will download some update files to hard disk (after checking version) when user push it.But I don't know how to update my application after downloading update files to hard disk. Please help me.
Thank you very much.
Sincerely,
King of Merit.
|
|
|
|
|
Hi Merit
i think you need some utility that update your application.
i too created same,for me this work is done by Installer.
actually what the installer do it check wheather our application is running or not,if it running it set the flag to OS to update new appliaction on restart or if it not running it update it.
the insatller i used is INNO setup ,it is freeware go and download from
http://www.jrsoftware.org/
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi all,
As the title, i want to execute command line in a remote machine. For example, i have two machines (P1, P2). Let consider P1 as the local machine (caller) and P2 as remote machine (execute here). Now i develop a application that allow user on P1 run, then put the cmd (e.x: net send P1 "Hello"). Send the message to P2 via tcp sock stream, then execute the cmd line parsed by P2 (it means in P2, open Start->Run->put net send P1 "Hello" and then P1 will receive "Hello" message from P2).
Anyone who know the way to do that, please show me.
P/S: My english not well as i want to described the problem.
.::LDLP::.
|
|
|
|
|
hain
[b]Net Send[/b] is the internal command provide by windows networking.
for executing command line in a remote machine,you need a special application to sit at remote machine which handle you request and execute the files.
there one example similiar to your need in section MFC/VC++-->services
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
You want to use ssh for this. There are other tools, but most of them are insecure.
http://www.ssh.com/
http://www.openssh.com/windows.html
(also http://www.openssh.org/)
Openssh is from the same people who brough openBSD. I you haven't heard, these are people who are extreemly good programs, and extreemly paranoid about security. They are also [censered]. They don't even attempt to be reasonable. It is free, and you can trust it to be secure (though in fact openssh gets the "credit" for the only hole in openBSD in 8 years).
ssh is the comercial version. I haven't used it myself, but the only bad thing I've heard about it is that you have to pay for it. OTOH they will also help you if there are problems.
You will have to read the book to configure either. The task is non-trivial. Using anything else on the internet is stupid. Even on a seperate internal network you are better off with ssh than anything else.
|
|
|
|
|
This sounds like a job for RPC. In short, it is a powerful and secure interprocess communication (IPC) mechanism that enables data exchange and invocation of functionality residing in a different process. That different process can be on the same machine, or another machine on the LAN.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Yep, something like that David Crow. I had found a application which allow me to cmd in remote machine. But (alway but), the application required authenticated for the session of remote execute cmd. That's not my reached my expectation.
Let see the following scenario: I have a remote IP, connect to it via socket, and then i send the application to it. After all, send a message via socket to tell the remote system execute my application. That all!
Sound like the blaster mechanism right?
Have you got any idea?
.::LDLP::.
|
|
|
|
|
Hello, is there anybody who can help me.
In my main program I have declared a fonction 'OnMyMessage'
In my .h file : afx_msg LRESULT OnMyMessage(WPARAM wparam, LPARAM lparam);
In my .cpp file :
BEGIN_MESSAGE_MAP(CPatchingMPEG2Dlg, CDialog)
ON_MESSAGE(WM_USER+1, OnMyMessage)
END_MESSAGE_MAP()
...
LRESULT CPatchingMPEG2Dlg::OnMyMessage(WPARAM wparam, LPARAM lparam)
{
EditSCR.SetWindowText(strOut);
strOut.Format("TimeCode %X",wparam);
return TRUE;
}
I pass the m_hwnd variable to another processus (a directshow filter) where I post a value to my main window by :
PostMessage(MYWINDOW, WM_USER+1, TimeCode, 0 );
My problem is that I have to write 2 times this instruction so that my function 'OnMyMessage' start. If I write only one PostMessage i get nothing !
Can you please help me about this point ?
I thank you very much for your help and wish you a nice day !
There is no way to happiness, happiness is the way !
|
|
|
|
|
madretierra wrote:
EditSCR.SetWindowText(strOut);
strOut.Format("TimeCode %X",wparam);
It looks like you need to switch these two statements around.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hello David,
thanks for your answer, but please can you detail what you mean ?
Thank you,
alain
|
|
|
|
|
I mean switch the two statements around. Swap them. Have one trade places with the other.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hello again,
these two instructions are in the right place (inside my function called by a personal window message). If I swap them I will get an error.
Do I understand well what you mean ?
see you !
There is no way to happiness, happiness is the way !
|
|
|
|
|
madretierra wrote:
If I swap them I will get an error.
What sort of error (compiler, linker, assertion, exception)?
Unless strOut is being assigned a value in some other location, the first time OnMyMessage() is called, EditSCR.SetWindowText(strOut) will set the control's text to nothing (i.e., empty). The second time OnMyMessage() is called, strOut will have a value because strOut.Format("TimeCode %X",wparam) has given it one. Make sense?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
OOhh you're right ! I'm so sorry to be so stupid ! I think I need to have a rest... Thanks a lot
for your light !
I wish you a nice week-end and hope I will bring you help when you will need, bye
There is no way to happiness, happiness is the way !
|
|
|
|
|
Hi ,
I am a novice to VC (MFC). I want to add a listcontrol on propertypage, such that it contains no. from 1 to 10 When I press scroll up button of listcontrol, the number in the list control should decrease and on pressing scroll down button the number should increase. Hope I made my need clear and specific.Please help me out!
Drushti
|
|
|
|
|
Drushti wrote:
I want to add a listcontrol on propertypage, such that it contains no. from 1 to 10
How about this:
for (int x = 0; x < 10; x++)
{
str.Format("%d", x + 1);
m_listcontrol.InsertItem(x, str);
}
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hey there...i m really embarraced here ,,,i really m new in programming...i m trying to write a simple c++code for a simple calander......so if any 1 of u can help me...i will b very greatfull....
thank u all
|
|
|
|
|
if you need a month calender use the control month calendar, theres also a control datepicker. or do you need something special ?
|
|
|
|
|
Can somebody help ?
Requirement :
1) A simple dialog based MFC proj which hides itself when a hot key is pressed. For EG : Ctrl + Alt + F8. and unhides itself when the same hot key is pressed again. [the same hotkey is used to HIDE / UNHIDE itself.]
2) Must be a single process, no service or other threads is running to listen to the keystroke except this application ]
Assumption :
1) The hot key is unique in the system. [ no conflicts with any running application or services ]
I am able to hide the window, but I am not able to unhide it as this application is no longer the active application.
Thanks,
JSM
|
|
|
|
|
I think you need to install a keyboard hook for this. I've not tried it but I think it will still intercept keystrokes even while the application's window is hidden.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Register that keypress as a hotkey with RegisterHotKey() , and the system will send your window a WM_HOTKEY message when it is pressed.
--
I'm Michael Dunn and I approve this post.
Vote Trogdor in oh-four!
|
|
|
|
|
Thanks for the tip. I was not aware of this function.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Thanks for this wonderful tip !!
|
|
|
|
|
I wanna tab control with buttom,image in mdi.
What I use class?
|
|
|
|
|
Need suggestions for the problem preferrably in VC6:
There are two machines A and B. A telnet(or SSH) to B.On logged in to B, B should give it's own window in Machine A. That is, B should be the owner of window in A.
If it is something to do with XWindows or Xterm, I am not clear how exactly to hit the problem.
I hate that lazy Java
|
|
|
|