|
By default, the step increment is 10. Use PBM_SETSTEP to change it or call SetStep on your MFC object.
I think you should setup everything on the MFC side, and simply send PBM_STEPIP from your VB dll, only that.
I don't know how VB works for raw message sending. I don't think PBM_STEPIT is defined. Make a constant or use 1029 directly. Leave wparam and lparam to 0.
But all I told you I got it from the Platform SDK/MFC documentation. You should look at it.
----------------
Blaster
Computer game programmer and part time human being
http://www.blastersoft.com
|
|
|
|
|
Many many thanks! Progress finally. I've been chasing these ideas all morning! VC clients can only show VB ACtiveX forms modally so that put an end to spwaning the progressbar in the VB dll, since once shown it couldnt update the progress info on it without being manually dismissed....defeats the purpose). I also chased the callback idea but got rapidly lost in how to call back the VC function from the VB dll which has been passed its address....so that avenue was bogged down. But I do believe that sendmessage is the way to go.....
Thanks,
ns
|
|
|
|
|
I have a dialog based program where when I click on a button in the dialog it will open another dialog window. I'm assuming that the dialog that gets opened is a child of the main dialog and I want to know if there's a way to get a pointer to the parent dialog. It's not the main window so I can't use AfxGetMainWnd, is there some kind of AfxGetParentWnd function that I can use? Any help is much appreciated.
Another question:
Not really anything to do with coding but I've been wondering, does anyone know what afx stands for?
Thanks again.
- Monrobot13
|
|
|
|
|
Lookup GetParent in the doc
----------------
Blaster
Computer game programmer and part time human being
http://www.blastersoft.com
|
|
|
|
|
monrobot13 wrote:
does anyone know what afx stands for?
AFX is the name of the class library that came before MFC. AFX was scrapped because other MS groups found it too hard to use, but the name lives on.
--Mike--
Just released - RightClick-Encrypt v1.4 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Thanks for the info guys. It's much appreciated.
|
|
|
|
|
monrobot13 wrote:
does anyone know what afx stands for?
AF means "Application Framework". The trailing X have gotten many guesses. One guess is that it's just a trailing X (like in DirectX). Another guess (my personal favorite) is eXperimental or eXperiment. A third guess is eXtension (maybe even X-tra tension ). But it's still just guesses.
Try searching groups.google.com, maybe you'll come up with an answer yourself.
|
|
|
|
|
I want my app to have more than one top-level window, with no button on the taskbar and also no entry in the task manager.
I got the taskbar part working, but not the task manager.
Any window can become always on top and back again at any time, and I think for that the windows must not have a parent (at least that's how I got it working). If I am wrong please also tell me how to get it working otherwise.
----------------
Blaster
Computer game programmer and part time human being
http://www.blastersoft.com
|
|
|
|
|
Hello All,
Is anyone interested in creating PDFs for free?
Are you interested in writing some C++ code for a program called Free PDF?
Free PDF is a freeware utility which allows you to create free PDFs just by printing to a 'Create PDF' printer, from any Windows application.
FreePDF bridges between RedMon (which redirects a special printer port to a program such as Ghostscript) and Ghostscript (which acts as an interpreter for the PostScript language and for PDF), thus simplifying the PDF creation process, providing useful options and making it easy to use them.
According to the author of the Free PDF program:
Free PDF is written in the rather high level language Python/TCL (available at www.python.org). The source code is included in the Download. If you are an experienced C++ programmer and want to write/modify some C++ source code to make a Port Monitor program so that the setup and installation of Free PDF can be made easier, please look at the source code for redmon and see if you can help! If you can and are willing, Good Bless you!, and E-Mail the Zipguy. Thanks!, the Zipguy will give you the credit you merit for any work you do! Be advised that Free PDF will remain freeware, So your program would be freeware too! By the way a Port monitor needs to:implement the following functions (RedMon does these and the C source for RedMon is in it's download. So you can look at a sample of a program which does these)!
If you're interested, please contact the ZipGuy, the author of Free PDF, at zipguy@over.to
|
|
|
|
|
I have to send a window handle from my mfc app to my vb dll, so it can postmessage to it. Say I want to get info from this dll so that I can put it into a progressbar in my status bar of my mfc ui. So whose handle shal lI send to the dll? How do I get a hold of this handle in MFC?
Thanks,
ns
|
|
|
|
|
There is GetSafeHwnd and the member var m_hWnd.
m_hWnd is a HWND, the basic Win32 window handle
----------------
Blaster
Computer game programmer and part time human being
http://www.blastersoft.com
|
|
|
|
|
Thanks for that.
But what I also need to know is whose handle do I need? The window I want to send the info is which one? My purpose is to communicate the progress of the VB dll (who is posting the message) to a progress bar that is in the status bar of my MFC MDI app. Would it be the handle of the progress bar. I dont have a feel for this yet...
Thanks,
ns
|
|
|
|
|
I guess the handle to the progress bar directly would be ok. If you have the handle to the dialog, you'd need a way to find the handle to the progress bar and it would bind your vb dll every more to the mfc code, which is bad.
----------------
Blaster
Computer game programmer and part time human being
http://www.blastersoft.com
|
|
|
|
|
Thanks for the info tat the handle is an HWnd. I also see that theres a type calle HANDLE (for objects), and HWnd is for a window. What sthe diffeence between the two? Isnt every window an object? I guess every object si not a window, but if I make a custom class and make an object out of it, is that when I 'd use HANDLE?
Appreciate your help!
Thanks,
ns
|
|
|
|
|
Could some write a sample program in visual C++ for me to compare, The question is as follows:
A metric ton is 35273.92 ounces. Write a program that will read the weight of a bottle of ale in ounces and output the weight in metric tons as well as the number of bottles needed to yield one metric ton of Ale??
Any help would be appreciated
khan_34@hotmail.com
|
|
|
|
|
Nice assignment. You should give it a shot yourself.
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
I did give it a shot but the only things thats outputs is the metric ton and not the bottles, here is the program....what am i doing wrong here....
#include <iostream.h>
int main()
{
int ale, bottles, sum, sum1; // declaration
cout << "Weight of bottle of ale in ounces\n"; // prompt at Screen
cin >> ale;
sum = (ale/35273.92);
cout << "Weight of Ale in metric tons is" << sum << endl;
cin >> bottles;
sum1 = ((ale/35273.92) / 35273.92);
cout << "Number of bottles needed for 1 ton of ale are" <
|
|
|
|
|
Atika Khan wrote:
cin >> bottles;
you're waiting for input
BW
{insert witty/thought-provoking saying here}
|
|
|
|
|
the Output always gives me 0 bootles, Am I doing the calculation wrong for getting the number of bottles???
|
|
|
|
|
yes. (oz/ton)/(oz/bottle) = bottle/ton
BW
{insert witty/thought-provoking saying here}
|
|
|
|
|
Thank you very much brian
|
|
|
|
|
Whatever happened to math skills.. no offence.
Ryan Baillargeon
Software Specialist
Fuel Cell Technologies Inc.
|
|
|
|
|
Reminds me of the post a few days back about the significance of math skills in the programming field.
Oh well.
BW
{insert witty/thought-provoking saying here}
|
|
|
|
|
no problem, but for future reference, some people around here aren't quite so forgiving. It is after all a programming forum, and not math.
In any case, Good Luck with the C++!!
BW
{insert witty/thought-provoking saying here}
|
|
|
|
|
With the risk of being shot by Microsoft or a Java Guru, how do you think that programming has evolved the last 2 years?
Is the majority of applications still written in C/C++ (or even Cobol) or is anyone switching to VB or C#?
And what about Java? Are stilly many programmers switching to Java or has the migration stopped since the burst of the .com bubble?
Does anybody of you know if there any inquiries or reports that can be found on sites?
Enjoy life, this is not a rehearsal !!!
|
|
|
|