|
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.
|
|
|
|
|
here is the code so far, i am so stuck, this is my third and he was two months premie...
I got the psuedocode from another studend bt do not know what to do, all my teacher will say is read the book and that is no help
//
# Include <iostream.h>
# include <string.h>
struct weather
{
char month[12];
float total_rainfall;
float high_temp;
float low_temp
float average_temp:
};
Void main ()
{
weather year [12]
{"January", 0.0, 0.0, 0.0, 0.0},
{"February", 0.0, 0.0, 0.0, 0.0},
{"March", 0.0, 0.0, 0.0, 0.0},
{"April", 0.0, 0.0, 0.0, 0.0},
{"May", 0.0, 0.0, 0.0, 0.0},
{"June", 0.0, 0.0, 0.0, 0.0},
{"July", 0.0, 0.0, 0.0, 0.0},
{"August", 0.0, 0.0, 0.0, 0.0},
{"September", 0.0, 0.0, 0.0, 0.0},
{"October", 0.0, 0.0, 0.0, 0.0},
{"November", 0.0, 0.0, 0.0, 0.0},
{"December", 0.0, 0.0, 0.0, 0.0},
float total_year rain=0
float accumulated_avgtemp=0
float highest_temp=-100
float lowest_temp=140
char calender[12][10]
};
for (int x = 0; x < 12; x++)
{
cout << "Please enter the following
data for " << month[x]<< ": \n\n";
cout << "High temperature: ";
cin >> month[x].high_temp;
cout << "Low temperature: ";
cin >> month[x].low_temp;
psudocode for the rest so far
Prompt user for data entries for the month of calendar[a]:
Input total_rain
If total_rain is less than zero, prompt user for re-entry and loop back to input.
Add total_rain to accumulated_yearly_rain.
Call Function One (get_temp)
Return new value for high_temp.
Call Function One (get_temp)
Return new value for low_temp.
If high_temp is less than low_temp, prompt user for
re-entry and loop back to first call of Function One.
Calculate average_temp for the month using high_temp and low_temp.
Add average_temp to accumulated_average_temp.
If high_temp is higher than overall_high_temp
then replace overall_high_temp with high_temp.
If low_temp is higher than overall_low_temp
then replace overall_low_temp with low_temp
Output the following:
Average Monthly Rainfall = accumulated_yearly_rain / 12
Yearly High Temp = overall_high_temp
Yearly Low Temp = overall_low_temp
Average Temperature = accumulated_average_temp / 12
Average Total Yearly Rainfall = accumulated_yearly_rain
Begin Function One
(zero arguments, one return)
Define local float temp = 0
Prompt user to input temp.
If temp is not within standard range,
prompt user for re-entry and loop back to input.
Return temp to main.
help please
|
|
|
|
|
Just wanting some feedback on different video capture techniques. I have used AVICap, VisionSDK, and the DirectShow exaamples to test different way of video capture. All work great, but the problem I have with all of them is that they eat cpu time like crazy. The web cam software I use now is written in Delphi(did not write nor have source) and uses VFW and it only takes about 10-15% cpu time on my PIII600mhz capturing about 20 fps, but all the samples I've tried using the above options take about 40-50% cpu time on the same machine with the same frame rate. Just wondering of any optimizations or opinions on the above mentioned methods.
Thanks for comments,
Joshua
BTW: The web cam software I use now is ConquerCam. Good no nag shareware. Let me know if you know of any better web cam software.
|
|
|
|
|
If you slap a CListCtrl on top of a dialog in the resource view and then you want to add WM_HSCROLL and WM_VSCROLL programatically, how would you do it?
I noticed that you can add the extended styles programmatically, but how would you scroll styles when there is no Create calls needed?
|
|
|
|
|
ModifyStyle and ModifyExStyle
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|