|
How can I show the progress of an upload or download I have in progress in my program?
My program connects to my ftp and nagivates to a folder and uploads a specific file type, sdm.
I have a progress control in the same window which has time to complete underneath. How do I go about making it work for when an upload is being done or a download?!?
Hope that wasnt too broad!
Thanks
Ashman
|
|
|
|
|
Start off a thread which can update the progress bar till your upload/download finishes
Nish
|
|
|
|
|
or put your upload/download stuff in a thread. And update the progress bar in your main thread
Nish
|
|
|
|
|
Is there a way to align text in a status bar pane? I need to right align one of the panes in my status bar.
Also, I need to know how to include a tool-tips type display when the pane is scrolled over. Any help is appreciated.
Thanks,
Andrew
|
|
|
|
|
Hi all,
I have two custom open file dialog. One is very large, and the other is approximatively the same size as the default open dialog.
My problem is under win2000, the open dialog remember it's last size. You see the problem, if i open the bigger one first, and after closing, i open the small one, suprise, it's not small, it's now the same size as the last one.
I can not find a trick to not let Win2000 remember the last size.
Can someone have some clues?
|
|
|
|
|
Is there a way to highlight the entire first column of a listview and not just highlight the contents of the cell?? LVS_EX_FULLROWSELECT highlights the entire row, which I don't want. But not using that means that only the contents of the first column are highlighted.
Is there a way to adjust the margin in either;
a subitem of a listview
or a combobox
like you can set the margin in CEdit?
What i'd really like to be able to do...is move, ever so slightly, the edit portion of the combobox. I paint a combobox in a subitem of a listview. When the row gets focus, I grab the text from the subitem and put it in the combobox. The text shifts to the right a couple pixels. Plus the combobox border takes up a lot of space and i'd like to shift the text shown up 2 pixels. Any ideas?
Anyone have an example of column resizing when the user drags the gridline. I don't have a listview header but still want the user to be able to resize the column width.
thanks
mike
|
|
|
|
|
Can a VB Active X dll be call from a win32 console application? I have managed to call it from a MFC but I would like to called it from a win32 console application. If the answer to the question is yes HOW????
thanks
|
|
|
|
|
How are you calling it from MFC? As far as I'm aware COM objects can be called from console applications. A simple call to CoCreateInstance with the IID and CLSID of your COM server should be prove either way if it works. Don't forget to call CoInitialize first though.
Michael
|
|
|
|
|
Create a new class from Importing library. This option will create a new class with the method in the dll
Best Regards
Carlos Antollini.
|
|
|
|
|
Any idea how to stop the MDI Child Windows from being able to be resized? I don`t want the cursor to change either when the user goes over the border with the mouse. I have tried using WM_SIZE with no joy. I`m sure theres quite a simple solution, can anybody come up with the goods?
Cheers,
Alan.
AEGC
|
|
|
|
|
Prevent resizing: handle WM_GETMINMAXINFO.
Prevent cursor changing over border: handle WM_NCHITTEST.
See MSDN for specifics.
WM_SIZE is send when the sizing operation is finished. That's why it doesn't work for you.
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Thank you once more for helping me out, the answer was exactly what I`m looking for, another "this helped" for you Steen.
Cheers,
Alan.
AEGC
|
|
|
|
|
I found a couple more windows messages that might come in handy:
WM_ENTERSIZEMOVE
WM_EXITSIZEMOVE
WM_SIZING
WM_MOVING
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Hi
I'm already getting mad, I hope someone can help me
I want to send a sting beween two applications.
What I have so far is:
const UINT WM_MYAPP = RegisterWindowMessage("unique id");
.
.
.
char server[] = "something";
char ip[] = "111.222.333.444";
PostMessage(HWND_BROADCAST, WM_MYAPP, (WPARAM)server, (LPARAM)ip);
But in newsgroups I read that I is not possible to exchange strings using this method.
Here http://www.codeproject.com/threads/ipc_tute.asp is a good example that works but it uses memory mapped files and is a bit too complex for my purpose.
Is there no easier way to exchange strings between two applications?
regards
|
|
|
|
|
Use the WM_COPYDATA message. I believe there are a few articles here on CodeProject about doing just such a thing.
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I will try it, thanks
|
|
|
|
|
Thanks a lot, it works fine
However, I have one more question:
I use HWND_BRODCAST to send the message system-wide.
But since PostMessage cannot be used with WM_COPYDATA
I need to use SendMessage.
But MSDN says: "...function calls the window procedure for the specified window and does not return until the window procedure has processed the message"
so how will be program be slowed down? how long does it take until the program can process with the following code?
regards
|
|
|
|
|
1) If you have the source code to both apps, you don't need to use HWND_BROADCAST. You can use the HWND of the target application. I assume you have the source to both programs, otherwise trading WM_COPYDATA messages back and forth would not be doable.
2) The Windows API does not restrict you from using PostMessage to send the WM_COPYDATA message.
3) There are two versions of SendMessage.
a) SendMessage - Uses the default timeout of five secons before timing out.
b) SendMessageEx - allows you to specify the timeout duration (in milliseconds).
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
point 1) I only have the sourcecode from the app which needs to get the string. A friend of mine wrote a program in delphi but I don't have access to the source. So I told him just to input the WM_COPYDATA function into his app in order to send me necessary data from his app into my app
point 2) MSDN says: An application must use theSendMessage function to send this message, not thePostMessage function.
I tried with PostMessage and it did not work
point 3b) what happens, if the function times out? Will no application get the WM_COPYDATA message?
|
|
|
|
|
1) He should be able to get your apps hwnd if he knows the window title (or scans the task list for the module name.
2) I guess I can understand that. Postmessage returns immediately, so there's a real good chance that the receiving app won't have time to process the string.
3b) In the event of a timeout, Sendmessage (and SendMessageEx) both return FALSE.
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
1) use the clipboard
2) create a temp file
3) use the registry [dont forget to delete the temp keys you make]
|
|
|
|
|
You forgot:
4) Use WM_COPYDATA.
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
6) Named pipes
7) Memory-mapped files
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|