|
Thanks for your help Mark.It works. its an easy solution. but i cant think it
|
|
|
|
|
Hi,
I am making a customized Save as Dialog. I am unable to get the hierarchy of the files and directories in the Combo Box.
How will i get the browse information, that is the hierarchy of all the files and the folders, in the dropdown Combobox ???
Anu
|
|
|
|
|
Can I get a tip on what I need to change in this program
exams=50% quizzes=10% daily=10% assign=30%
include <stdio.h>
void main (void)
{
double gpa,exam,quiz,assign,prof;
printf("\n enter the exam grade:");
scanf("%lf", &exam);
printf("\n enter the quiz grade:");
scanf("%lf",& quiz);
printf("\n enter the daily grade:");
scanf("%lf",& daily);
printf("\n enter the assign grade:");
scanf("%lf",& assign);
gpa=((exam*.6)+(quiz*.4)+(daily*8)(assign*.6);
printf("\n the gpa is %.2lf", gpa);
}
|
|
|
|
|
Compile it, the compiler wil give you the tip.
<italic>Work hard, Work effectively.
|
|
|
|
|
Thank you I compile it is there some way I can find out ehat the arror mean
|
|
|
|
|
keithbg wrote:
Thank you I compile it is there some way I can find out ehat the arror mean
First of all, you haven't stated what the error is. So there's no way we could know.
And it seems you replied to my other message and then deleted the reply, since I got an e-mail. I'll respond to it here:
keithbg wrote:
I so sorry sir I did not know asking for a tip on how to fix a problem was wanting someone to do work for me. KISS!!!!
In your original message you're not saying what is the problem you are having. The code is very simple, and any decent programmer should get it just by looking at it, which leads me to believe that it's a homework assignment for a programming class. I'm OK with that.
But, you are no asking for tip on how to fix a problem; you're asking for your code to be fixed. If you had asked like this:
I'm working on a homework assignment about calculating an GPA for a student based on
these percetages: exam 50%, quiz 20% and assignments 30%. This is the code I have right
now:
<code>[code goes here...]</code>
I'm having a problem because when I can't make the GPA be correct. If I enter 80,
80 and 80 I should get 80 but somehow I get 113.5. Any ideas?
Thanks,
Keith. I'm sure you immediately would get a polite answer with someone suggesting that you check the formula. Do you see the difference?
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Try asking in the C# forum.... oh, wait, you already did that[^]!!!
Sorry, but cross-posting in different forums is considered bad manners. And asking for someone to do your homework is worse!
It's homework, try to do it, and if you get stuck, then ask a *specific* question. "Help me with this program" will get you nowhere, specially on simple homework assignments like this.
-- LuisR
P.S. By the way, check your code, the error is *really* easy to spot!
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
I'm writing an Addin for Word 2000 using ATL.
How do I disable and enable MS Word's spell check engine programatically??
Please I need a quick solution.
God Bless anyone who can help me..
|
|
|
|
|
Basically I need to send the following VB command:
ActiveWorkbook.Names.Add Name:="Limits_V26x", RefersToR1C1:= _
"=V26x!R3C1:R1000C21"
in some way, shape, style, or form. From a VC++ project.
I have other code in same project that refer to excel.h, and I would be happy to use it. But I can not decypher or translate this command into a VC++ command.
All help is greatly appreciated.
Thank you for your time
|
|
|
|
|
Is there a way by which I can redirect a request from my IIS to some page on another IIS without letting the client know about it?
I have implemented an ISAPI filter on my IIS, which scans incoming traffic and redirects all coldfusion page requests (.cfm) to www.codeproject.com
The way I went about it is as follows:
1)Create a new ISAPI project using vc++ 6.0/MFC
2)Overload CRedirectorFilter::OnPreprocHeaders(..) - it scans for .cfm requests, and sets a flag.
3)Overload CRedirectorFilter::OnSendRawData(..) - it checks the flag set above and sends a HTTP 302 response back to the client:
DWORD CRedirectorFilter::OnSendRawData(CHttpFilterContext* pCtxt,
PHTTP_FILTER_RAW_DATA pRawData)
{
// if we get a .cfm request, redirect it.
if (bRedirect)
{
char chHeader[] = "HTTP/1.0 302 Redirect\r\nContent-Type: \
text/html\r\nLocation: http://www.codeproject.com\r\n\r\n";
DWORD dwchHeader = sizeof(chHeader);
pCtxt->WriteClient(chHeader, &dwchHeader, NULL);
}
return SF_STATUS_REQ_NEXT_NOTIFICATION;
}
After posting a 302 response, the client browser redirects to www.codeproject.com, and displays the URL. Is there some way we can avoid displaying the new url?
I.e. If I hit http://localhost/test.cfm, the browser should show the same url even after it redirects to www.codeproject.com.
Is that possible?
Thanks in advance,
Pratz
|
|
|
|
|
I am working on a VB application that use a control that I wrote 2 months ago. When I tried to recreate the .exe, about 30-minutes ago, it informed me that it could not load a control. When I tried to close VB, it asked me if I wanted to save a source/module that has not been modified in 2-weeks. That module/form is the one that needed the control. I closed without saving, restarted the system, then brought up VC++ and tried to use the ActiveX Test Container and received the following: "Failed to create control: Unspecified error".
I've tried rebuilding the control (VC++ says it registerd the control), but I still get the same message. I am the only one who has access to the control, and has it registed; even though it is on the server. (Heck! I am the only one who knows where it is at.)
Does anyone know what the <blank> is going on here?
Everything was fine an hour ago!
Signed: John R. Shaw
|
|
|
|
|
Hi,
how can I send audio raw data to the Audio Device ?
Yours sincerely,
RedDragon2kx
|
|
|
|
|
|
I want to fill in an edit box, but not in my dialog, but in a different application. How can I fill in an edit box in an another application?
And how can I push a button in a different program?
Thanks in advance!
|
|
|
|
|
You can use SendMessage . Maybe this[^] can help you.
<italic>Work hard, Work effectively.
|
|
|
|
|
Alright I got the following code from on here to be able to notify when a registry key has been modified. The only problem is, I can't figure out how to implement this code into the DLL that I'm creating that will be used in an IE deskband. The problem I'm running into is that if I make it sychronous it will noticebly hang in IE while it waits for the Reg Key to change. Any ideas wouldn't be helpful.
#include <tchar.h>
#include <windows.h>
INT WINAPI
_tWinMain (
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
INT nCmdShow
)
{
LONG l = 0L;
HKEY hKey = {0};
l = RegOpenKeyEx (
HKEY_CURRENT_USER,
_T("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"),
0,
KEY_NOTIFY,
&hKey );
if(l == ERROR_SUCCESS)
{
// The following call will wait until a change is made to the registry key.
l = RegNotifyChangeKeyValue (
hKey,
FALSE,
REG_NOTIFY_CHANGE_LAST_SET,
NULL,
FALSE );
MessageBox(NULL, _T("Registry key changed"), _T("Registry key changed"), 0);
RegCloseKey(hKey);
}
return 0;
}
|
|
|
|
|
try putting that bit of code in a seperate thread, using the CreateThread function. Call create thread from the entry point.
|
|
|
|
|
So you are saying I should call create thread from where I load the DLL file? And this will in turn always be activated, thus responding everytime the said regirsty key is changed. I'm alittle new at programming C++, sorry. Appreciate the help.
|
|
|
|
|
yes thats exactly wot i mean. but don't create it in DllMain. create it in the function in your dll that is called.
goto msdn.com and familiarise urself with creating thread, cos thats one of the things c++ does best, and is always useful.
|
|
|
|
|
Using DAO and MFC, I loaded an Excel file into CByteArray and then send it off to a field (defined as an "Ole Object" type in an Access 2000 database file) to the same CByteArray. When open the MS Access 2000 file the Ole Object field contains "Long Binary Data". How can view that Excel Ole Object document directly in Acesss 2000? I know that if you Insert the Ole Object manually in Access you are able to double click on the field and Excel would open that Ole Object. Please advise
|
|
|
|
|
I have a dialog based application which runs fine on NT and 2000. However, it doesnt work under XP. I have done some traces, the application gets invoked, but the main dialog window does not appear. Any ideas?
Man Learns from History that he never learns from History
|
|
|
|
|
I used ::LoadImage to load an icon on an owner-drawn button.
On XP only, if the user changes the windows color scheme to "High Contrast#1"
then then images that use the color black are hard to see.
Can I peg the background color of a button so no matter what the user does the image remains unchanged?
thanks
|
|
|
|
|
Check out the LR_LOADMAP3DCOLORS flag for LoadImage. It will change the following colours RGB(128,128,128), RGB(192,192,192), and RGB(223,223,223) to the current system colours COLOR_3DSHADOW, COLOR_3DFACE, and COLOR_3DLIGHT respectively.
You'll need to do this whenever your applications receives WMW_SYSCOLORCHANGE too.
PeterRitchie.com
|
|
|
|
|
Thank you. The WMW_SysColorChange information was very helpful.
|
|
|
|
|
hi
i have created an mfc application and in that i have one dialog box on which i set the bitmap to whole dialog box and i have three buutons on that but when i execute it doesn't show the buttons.
but when i click on that area where button was it dispalys.
I know it is the problem of painting and i tried to solve but not getting the solution.
looking forward for the reply
Best Regards
jhon
|
|
|
|