|
how to selective loading BHO in Chtmlview environment
wqewqqeweqwrwerewrwe
modified on Tuesday, May 27, 2008 11:40 PM
|
|
|
|
|
"BHOs are not loaded by other applications that host the WebBrowser control or by windows such as HTML dialog boxes." from [Building Browser Helper Objects with Visual Studio 2005^].
BTW, why need a BHO, when you have full control over the events and contents of html document when using Chtmlview( or Webbrowser control hosted in your application), BHO are used to extend custom functionally to Internet Explorer where you don't have direct control (like hosting in your app).
|
|
|
|
|
ok thank you...
wqewqqeweqwrwerewrwe
|
|
|
|
|
hi
i have an MFC dialog based application .
when the user enter his information and click save ...save dialog appears and the process goes as normal .
my question is ..when the user modifies his info and click the save button again ..i dont want the save dialog to appear just save the modified info.
how can i do that while iam using the following function to save:
void CmyDlg::Onsave()
{
this->UpdateData();
CFile f;
char strFilter[] = { "CCC Files (*.ccc)|*.ccc|All Files (*.*)|*.*||" };
CFileDialog FileDlg(FALSE, ".ccc", NULL, 0, strFilter);
if( FileDlg.DoModal() == IDOK )
{
f.Open(FileDlg.GetFileName(), CFile::modeCreate | CFile::modeWrite);
CArchive ar(&f, CArchive::store);
ar << m_EDIT1<<m_EDIT2;
ar.Close();
}
else
return;
}
f.Close();
}
pleease..i need help in this
i tried different things but nothing works
|
|
|
|
|
lahom wrote: my question is ..when the user modifies his info and click the save button again ..i dont want the save dialog to appear just save the modified info.
how can i do that while iam using the following function to save:
Store the necessary information in CmyDlg .
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
thank u for ur fast reply.....
DavidCrow wrote: Store the necessary information in CmyDlg.
but what does this supposed to mean
did i make myself clear here or???
|
|
|
|
|
lahom wrote: but what does this supposed to mean
Take the information returned from FileDlg.GetFileName() and store it in the CmyDlg class.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
ok...
then what???
could u explain more ur idea??
thank u
|
|
|
|
|
Create member variable of string type in ur CMyDlg class. Initialize it to Empty string. Lets name it as m_strFileName. Store the FileDlg.GetFilename() in that variable when you click save.
and in Save Add condition for checking the file name is not empty.
CMyDlg::Save()
{
if(m_strFileName.IsEmpty())
{
CFileDialog FileDlg(TRUE,...);
FileDlg.DoModal()
m_strFileName = FileDlg.GetFileName();
}
... //Your Code for saving the file with name m_strFileName.
}
|
|
|
|
|
thank u very much ....it works just fine
thaaaanks...i appriciated
thank u all
|
|
|
|
|
Which one of WaitForSingleobject() and SetTimer() is better when I need to check for something in a regular interval.
Thanks & Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
They each do different things. Perhaps if you explained what the "something" is that you are checking, we could be of more help.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I want one of my function to be called every 100 ms which will do some procees.
This function will check some conditions to call or not some other small functions.
To call the function every 100 ms, which is better timer or WaitForSingleObject()?
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
How do you intend to use WaitForsingleObject..???
You can definitely use SetTimer().
|
|
|
|
|
It seems we can use both, but I want to know which one is better when considering performance of application something like CPU usage etc.
Thanks & Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
WaitForSingleObject Infos[^]
I think this is going to be too much for what you need. SetTimer is much easier and is good enough for your requirements.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Thanks for great help from everybody!!
As there are two main tasks, MIDI communication and GUI simulation of sent/received MIDI, performance is important.
I will try both and select which is better.
Thanks & Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
I am taking an independent study course (ISP) and so far i have no clue what i am doing. i have managed to scrounge up some pathetic codes that havent worked sofar, and i was told that if my last 2 do not work, i fail, and i have an exam, and its all due friday. I Have read the the book at least 6 times, and still i have no idea how to make a program. So i am going to ask for serious help.
i have to write a program that will determine an employee's net pay based on the following info.
employee is being paid 10.50 dollars an hour for the first 40 hours
he recieves time and a half for the first 5 hours over 40 hours
he recieves double pay for hours over 45 hours
he is taxed at a rate of 31%
he pays 1.9% canada pension plan
.4% union dues is also payed.
apparently the program read as input the number of hours the employee has worked. the output screen should display gross pay, amount going into taxes, and the net income for the week
example output supplied:
hours worked 42.00
Regular pay 240.00
Overtime pay 31.50
---------------------
Total Gross Pay 451.50
deductions
taxes 139.96
cpp 10.84
ei 8.58
Union dues 1.81
---------------------
Net Pay 290.31
Yes it is directly from the book. I am trying to be super specific. I dont want anyone to like, write out the code for me, because its against the rules im pretty sure, and i learn nothing from it. I just would appreciate a guide on how to actually figure this out, so i can do the exam, and lesson 2 from this module. And I know, it sounds very demanding. but this is like, i fail i owe the school 200 dollars for the ISP.
:I
|
|
|
|
|
Pathetic wrote: Regular pay 240.00
I think this should be $420.00
Pathetic wrote: apparently the program read as input the number of hours the employee has worked.
void main( void )
{
double dHours;
std::cout << "Hours worked: ";
std::cin >> dHours;
} Only after you get past this hurdle should you continue.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
thanks! I am pretty sure this will help alot
:I
|
|
|
|
|
Hi Pathetic
Enter an Hour as an input
and you use if -else condition for hours and according to hours you caclulate the Total gross pay.
now it is easy for you to calculate the deduction using simple formulas
if hours is =< 40
than hours*dollar
else if hours is >40 and less <= 45
1) 40*dollar
2) (modify)(hours - 40)*(10.50+(10.50/2))(/modify)
else if(hours >45)
1) 40*dollar
2) 5*10.50*(10.50/2)
3) (hours-45)*2*10.50
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
|
Most Welcome
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Pseudocode = ON
include the headers you need
declare variables that you will need
ask for the hours worked
save it into "hours_worked"
temp1 = hours_worked*hour_price
when hours more than 40 but less or equal to 45
temp2 = (45-hours_worked) * (1,5*hour_price)
when more than 45
temp3 = (hours_worked - 45) * (2*hour_price)
save the total amount in a "total_pay"
give the results on the screen /* depending on how you mix the three temp variables you have one amount or the other */
taxes = (total_pay * 31) / 100.0 /* this .0 at the end is to force to have decimals in the result */
cpp = (total_pay * 1.9) / 100
ei = /* you forgot to say it in the description, but is the same */
Ud = (total_pay * 0.4) / 100
neto_pay = total_pay - taxes - cpp - ei - ud
give the results on the screen
Pseudocode = OFF
This is more or less a structure that will work. It is one of the most basics, all is done in the "main" function (you didn't say how far is the level by the first module). You can try by yourself to use secondary functions (changes are not very big) and, if you have a particular question or something is going wrong when you are typing your code, feel free to ask.
99.99% of the people is born without knowing everything, so don't worry if you need to ask something "basic", the level of the question is not important. The mos important thing is:
Pathetic wrote: I dont want anyone to like, write out the code for me, because its against the rules im pretty sure, and i learn nothing from it.
With this attitude, you are going to have a lot of help here. Good luck.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
He's saying "I have no idea how to write a program." In this case, I would imagine the parts for "include headers" and "declare variables" are going to come hard to him, maybe even be the most difficult part. Perhaps he already understands the math required, possibly...
I would ask a couple of questions:
What language are you using?
What in the world book is it that you are using, that you read it six times and don't know how to write a program...is this more of a problem of finding and/or using the IDE? (tools to create the program)?
Are there any options available of someone for you to sit down with and be shown firsthand how to get started? This may not be a problem that can be solved over a forum...
Have you explained your situation to the instructor, if there is one? This is step #1, in my experience, just open that communication line and let him/her/them know you're having trouble and what the trouble is exactly.
|
|
|
|