|
#1: you need 'tracking tooltips'. More info in Platform SDK/User interface services/Windows Common Controls/Tooltip Controls/Using Tooltip controls.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks. There's not a lot of info about 'tracking tooltips' in MSDN. Do you know of any other resources with perhaps a code sample?
|
|
|
|
|
There's not a lot of info about 'tracking tooltips' in MSDN
MSDN has the example code that creates a tracking tooltip and moves it around. It's demonstrated with plain Win32, but it should be trivial to use it with MFC.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I have an SDI CFormView. Lets say the single page is called CMyFormView. I put a property sheet inside CMyFormView, so I created files:
CMyPropertySheet.h and, CMyPropertyPage1.h
CMyPropertySheet.cpp CMyPropertyPage1.cpp
How can I send a value from CMyFormView to CMyPropertyPage1? The user in CMyFormView typed in some informatoin. I want to know what informatoin they typed while in CMyPropertyPage1.
Currently I save it to a file, and then when they click on a button which pops up a CDialog that contains a property sheet and pages, I then retrieve that informatoin from a file. I was wondering if there is an easier way. Please, any response any one can give me will be greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
Is there a way to manage Outlook Express accounts programmatically? I'm working on setup utility and so far i have tried to use automation (i'm still a visual newbie ) and to edit registry.Now you can guess - the problem is crypted password entry . Is there any other way beside hacking Internet Account Manager crypt function? OLE? Automation? Any documentation on the net? Or am I on the worng way? Thanks in advance.
|
|
|
|
|
A series of projects from this site requiere this file. I'm using VC 5.0 and I don't have it. From where can I get it? Pretty pleasssse!
|
|
|
|
|
I don't know why the browser didn't show it. Sorry, big mistake on my part!
|
|
|
|
|
afxdtctl.h contains definitions for MFC classes added in VC 6. Putting that header file in a VC 5 install will do no good since VC 5's MFC doesn't have those classes at all.
--Mike--
http://home.inreach.com/mdunn/
Ford: How would you react if I said that I'm not from Guildford after all, but from a small planet somewhere in the vicinity of Betelguese?
Arthur: I don't know. Why, do you think it's the sort of thing you're likely to say?
|
|
|
|
|
I'm kinda new in VC programing. What does Owner Draw means. If you use the resource editor then it's not an owner drawn? Does it mean that you have to draw it yourself, and it means that you can draw any crazy control you can think of?
Thankz for you time reading this!
|
|
|
|
|
Exactly - owner drawn means you provide the code that draws the control, otherwise Windows does it and it looks 'normal'.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Is there anyway to center all dialog boxes for an application including all afxmessageboxes.
When the app is full screen, it's all fine, but when I move it around, then the message boxes still pop up in the center of screen as opposed to the center of the app.
how do i get around this problem.
thanks
|
|
|
|
|
You can use CenterWindow to center your app. Use MessageBox instead of AfxMessageBox and use the handle of your window as the first parameter.
|
|
|
|
|
Hello,
Sorry for this lengthy posting, I am trying to figure out the best way to parse text. I created a program that pulls the source HTML from a provided URL and dumps it into a text file. I am parsing through the text file then putting the parsed text into CStrings. I was wondering if there is an easier/better/cleaner way to parse text for values? Here is a sample of the code I’m using to parse. Any ideas to make this easier or more efficient would be greatly appreciated.
int nMyIndexMoPDT, nFirstIndexMoPDT, nSecondIndexMoPDT;
nMyIndexMoPDT = strPDT.Find(_T("the time will be..."));
nFirstIndexMoPDT = strPDT.Find(_T(","), nMyIndexMoPDT);
nSecondIndexMoPDT = strPDT.Find(_T(","), nFirstIndexMoPDT+1);
strPDTMo = strPDT.Mid(nFirstIndexMoPDT+1, nSecondIndexMoPDT-nFirstIndexMoPDT-1);
strPDTMo.TrimLeft(_T(" "));
strMonthsPDT = strPDTMo.Left(3);
int nMyIndexPDT, nFirstIndexPDT, nSecondIndexPDT;
nMyIndexPDT = strPDT.Find(_T("tone"));
nFirstIndexPDT = strPDT.Find(_T(">"), nMyIndexPDT);
nSecondIndexPDT = strPDT.Find(_T("<"), nFirstIndexPDT+1);
strPDT1 = strPDT.Mid(nFirstIndexPDT, nSecondIndexPDT-3-nFirstIndexPDT-1);
strPDT = strPDT1.Right(8);
int nMyIndexPDTDays, nFirstIndexPDTDays, nSecondIndexPDTDays;
nMyIndexPDTDays = strPDT.Find(_T("At the tone, the time will be..."));
nFirstIndexPDTDays = strPDT.Find(_T("b"), nMyIndexPDTDays);
nSecondIndexPDTDays = strPDT.Find(_T("<"), nFirstIndexPDTDays);
strPDTDays = strPDT.Mid(nFirstIndexPDTDays+3, nSecondIndexPDTDays-nFirstIndexPDTDays-3);
int nMyIndexPDTDaysTemp = strPDTDays.Find(_T(","));
int nFirstIndexPDTDaysTemp = strPDTDays.Find(_T(","));
int nSecondIndexPDTDaysTemp = strPDTDays.Find(_T(","), nMyIndexPDTDaysTemp+1);
CString strDaysP1 = strPDTDays.Mid(nFirstIndexPDTDaysTemp+1,
nSecondIndexPDTDaysTemp-nFirstIndexPDTDaysTemp-1);
CString strDaysP2 = strDaysP1.Right(2);
iPDTD = atoi(strDaysP2);
strPDTHours = strPDT.Left(2);
if(strPDTHours.Right(1) == _T(":"))
{
strPDTHours = strPDT.Left(1);
}
int iPDTHours = atoi(strPDTHours);
iPDTH = iPDTHours;
int nMyIndexPDTMins, nFirstIndexPDTMins, nSecondIndexPDTMins;
nMyIndexPDTMins = strPDT.Find(_T(":"));
nFirstIndexPDTMins = strPDT.Find(_T(":"), nMyIndexPDTMins);
nSecondIndexPDTMins = strPDT.Find(_T(":"), nFirstIndexPDTMins+1);
strPDTMins = strPDT.Mid(nFirstIndexPDTMins+1, nSecondIndexPDTMins-nFirstIndexPDTMins-1);
int iPDTMins = atoi(strPDTMins);
iPDTM = iPDTMins;
strPDTSec = strPDT.Right(2);
if(strPDTSec.Left(1) == _T(":"))
{
strPDTSec = strPDT.Right(1);
}
int iPDTSec = atoi(strPDTSec);
iPDTS = iPDTSec;
By the way, this code works. It just seems inefficient to me.
Thanks for any ideas you may have!!!
|
|
|
|
|
Regular Expressions would be better and possibly more efficent. less code and easier to read. try www.boost.org for a template based regular expression set.
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|
I've worked a lot with boost::RegExp, and it is great as long as you don't work with unicode (a bug in VC 6.0, not in the boost library).
However, I'm not sure, I would reccomend boost to a beginner.
I vote pro drink
|
|
|
|
|
Thanks everyone.. I'll take a look at your suggestions, I am pretty new at programming so I'll have to see how hard this looks..
One more question.. Can I do a .TrimLeft(_T"<") on a string and then on the next line do another trim and keep triming until all the usless values are gone?
Thanks,
Rob
|
|
|
|
|
Your last question is related to the features of Regular Expressions, so to give you an idea on how they works, open your HTML in any editor that has the capability of search/replace regular expressions (like CodeWright). Then execute a replace like the next one:
Search For: <[^>]*>
Replace With:
And check the "regular expression" check box, as well as the "replace all" check box. After that, you will be able to judge the advantages of using regular expression parsers.
|
|
|
|
|
How can I convert from CString to float?
I use MFC and have an EditBox declaired as CString. And I have an EditBox declaired as float... please help...
|
|
|
|
|
CString myString = "3.14";
float myFloat = atof((LPCSTR)myString);
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|
Thank you!
|
|
|
|
|
I am in a beginning C++ class and just had a baby, I am finally home but I am two coding projects behind can someone please give me an assist and explain it to me please... here are the two assignments :
page 621 or 667 (3rd edition) starting out with C++ by tony gaddis
write a program that uses a structure to store the following wather information for a particular month:
Total Rainfall
High Temperature
Low Temperature
Average Temperature
The program should have an array of twelve structures to hold weather information for an entire year. When the program runs, it should ask the user to enter data for each month. (the average temp should be calculated). Once the data is entered for all the months, the program should calculate and display the average monthly rainfall, the total rainfall for the year, the highest and lowest tempretures for rthe year (and the monthes they occured in), and the average of all the monthly average temps.
input validation: only temps within the range of -100 and 140 degrees F.
I can you you my code so far if you need it.
The second assignment asks the user to input a sentence at the keyboard. Passs the string to a function using a loop and pointer to inspect all characters in the string untill it finds a null character. the function should then return the charater to main(). The function manin() should print the character count to the screen.
any help would be greatly appreciated.
galenda
Ruby.Mathes@tinker.af.mil
gmathes@mmcable.com
|
|
|
|
|
Hi - congratulations on the little one. Is it your first ? My wife is cooking our third at the moment.
It would be helpful to see your code, so we can see how far you've got and where you need help. As far as the second program goes, it's simply a case of using cin >> to get the string ( which will be a char array ), passing the address of the first character into the function, using a while loop ( I guess, or you could use strlen to find out the size, but that defeats the purpose of counting it yourself ) to step through the array from that point. You have to use a pointer, so you'd want to pass in a char pointer and use pointer arithmetic to increment it ( pChar++ ) until it equals NULL ( NULL, '\0' or 0, they are synonymous ). I don't see why you'd return the character if it's always NULL, I think you mean the character count. So set an int to zero, increment it in the loop and return that value.
If you post your code for both problems ( I've not addressed the first on the basis you've got a start so you should post the code first ), then I'll be glad to comment further.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hey! congratulations for your third !!!
Is always a bless
|
|
|
|
|
Thanks. It was not planned, but I'm realy stoked about it.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hey Christian, Congratulations, Always is good to read about you.
Cheers!!!
Carlos Antollini.
|
|
|
|