|
if the memory usage is only 18,000K I would not worry about it my db application takes 20 times that... Most people have at least 256 mb or more memory so this is not very signifigant... On my computer gator (password helper for ie) uses 33,000 K...
John
|
|
|
|
|
Don't you know gator is spyware?
One should not trust a program that does a simple task yet consumes so much memory.
|
|
|
|
|
I know but I have accounts on over 100 internet sites and it is impossible to remember all the usernames and passwords so I put up with gator. I have tryied other programs like robohelp but they suck big time...
John
|
|
|
|
|
John M. Drescher wrote:
remember all the usernames and passwords so I put up with gator
How do you know that Gator doesn't leak? It's a spyware like Trickler and I would never in my wholel ife trust a spyware! I would go for a real password reminder app instead, but that's just me...
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
|
|
|
|
|
Hey,
I have a question for the board. I have an application running as a Windows service. It uses printf statements to print data to the screen. However, I can't see it because no Windows command prompt is opened. Can I access another app's stout stream through another application? Thanks.
|
|
|
|
|
Normally a service does not output data to the screen. Have you tried using TextOut() instead? Otherwise, outputting to a log file of some sort is more common practice.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
I recommend using the OutputDebugString API (or MFC TRACE statements, which eventually turn into OutputDebugString calls) to output text. You can hook up a listener by attaching a debugger or a tool such as DebugView[^].
Alternatively, you may be able to see the output by giving the service Interactive logon permission. This can only be done if it's running in the SYSTEM context. I would only recommend this for debugging purposes, though - you should not consider it for a deployment.
|
|
|
|
|
Either use OutputDebugString or use one of the free logging systems from this site.
John
|
|
|
|
|
hi,
Is there any way I can create app for 98 with VC++.Net/MFC ?
I dont want to distribute the MFC70.dll.
regards
hari
|
|
|
|
|
You should be able to build your MFC6-based application using VC++ .NET 2002/03, using your old MFC lib from VC6.
Or, if you don't want to redistribute the MFC70.DLL, you could statically link... Understood that the size of your app would balloon significantly
Nick
This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2003 Microsoft Corporation. All rights reserved.
|
|
|
|
|
hi,
Many thank, but..
Can you say how to use the MFC6 lib ? What should I do ?
regards
hari
|
|
|
|
|
I am not sure if this question makes sense, but I am trying to write program to send email, all the socket functions take IP address as in 155.233.55.10 and not URL address as in www.microsoft.com, wonder if there are functions that map one to the other.
Functions I am using are: connect,listen,bind,send,recv.
Thanks,
|
|
|
|
|
You first need to resolve the URL to corresponding IP address:
struct hostent * host = gethostbyname(name);
if ( host == NULL )
{
AfxMessageBox("gethostbyname() failed");
return;
}
struct in_addr addr;
memcpy(&addr, host->h_addr_list[0], sizeof(addr));
sprintf(m_strHost,"%s", inet_ntoa(addr));
printf("Resolved Host is %s\n\n",m_strHost);
|
|
|
|
|
How can I add a URL to IE's Favorites menu from my program?
|
|
|
|
|
the links on IE's Links bar are .url files in the 'Documents And Settings\**User**\Favorites\Links' directory.
Use SHGetFolder to get this folder's location.
Either create the .url file yourself, or try to play with IShellLink, perhaps it can be used to create URL shortcuts as well.
|
|
|
|
|
Hi everybody,
I've been given the following assignment: I have to develop a basic graphics packager, by using a Shape class hierarchy, I have to limit my self to 2D shapes (simple one's). The program should interact with the user, the user should specify the position, size, shape and fill characters for drawing the object. Each class has its own draw member functions.
O.K., so I want to go on things easy step by step, so I deceided to write on myself a drive program for testing purposes, which looks like this.
<br />
#include<iostream.h><br />
<br />
class Shape {<br />
protected:<br />
char *figType;<br />
public:<br />
Shape(char *ft = "Define Figure"):figType(ft) {<br />
cout<<"Shape Construct"<<endl;<br />
};<br />
char *getType() {return figType;};<br />
virtual double Area() {return 0.0;};
};<br />
<br />
class Square:public Shape {<br />
protected:<br />
double length;<br />
public:<br />
Square(double l):Shape("Square") {<br />
length = l;<br />
cout<<"A Rectangle Object Created"<<endl;<br />
};<br />
double Area() {return length*length;};<br />
};<br />
<br />
class Rectangle:public Shape {<br />
protected:<br />
double height, width;<br />
public:<br />
Rectangle(double h, double w):Shape("Rectangle") {<br />
height = h;<br />
width = w;<br />
cout<<"A Rectangle Object Created"<<endl;<br />
};<br />
double Area() {return height*width;};<br />
};<br />
<br />
class Triangle:public Shape {<br />
protected:<br />
double height, base;<br />
public:<br />
Triangle(double h, double b):Shape("Triangle") {<br />
height = h;<br />
base = b;<br />
cout<<"A Triangle Object Created"<<endl;<br />
};<br />
double Area() {return height*base;};<br />
};<br />
<br />
class Circle:public Shape {<br />
protected:<br />
double pir;<br />
public:<br />
Circle(double p):Shape("Circle") {<br />
pir = p;<br />
cout<<"A Circle Object Created"<<endl;<br />
};<br />
double Area() {return pir*pir;};<br />
};<br />
<br />
void main() {<br />
Shape *s1;<br />
Rectangle *rp1;<br />
Rectangle r1(3,5);<br />
<br />
s1=&r1;
rp1=&r1;
<br />
cout<<"Area() applied through Rectangle pointer "<<rp1->Area()<<endl;<br />
cout<<"Area() applied through Shape pointer "<<s1->Area()<<endl;<br />
};<br />
All I want to know right now is, how similar is the code to the question asked above ? Can I apply this structure for using OpenGL instead of using characters for drawing the objects ? And where can I get nice and easy examples ?
Thanks in advance
Tolga
|
|
|
|
|
What you have here is more of a Class FrameWork to support what you've mentioned.
If you try to seperate the problems, you need:
1. A Class FrameWork to declare and support your Shapes. This you seem to have.
2. Something that will allow you to perform drawing of such object.
What I suggest is that you find yourself a simple MFC application that shows how to draw rectangles, elipses, etc onto a window using MFC's CDC .
Then what you'll have left is to connect the two. Each Shape's Draw() method will receive a CDC* variable , which it will use to draw itself onto (using CDC calls).
Here's CDC's documentation over at MSDN
What's most important is that you find a simple MC framework, which I bet you can find on CodeProject.
|
|
|
|
|
Thank you very much, that's what I needed for a start
Tolga
|
|
|
|
|
Hi everybody,
I've been given the following assignment: I have to develop a basic graphics packager, by using a Shape class hierarchy, I have to limit my self to 2D shapes (simple one's). The program should interact with the user, the user should specify the position, size, shape and fill characters for drawing the object. Each class has its own draw member functions.
O.K., so I want to go on things easy step by step, so I deceided to write on myself a drive program for testing purposes, which looks like this.
<br />
#include<iostream.h><br />
<br />
class Shape {<br />
protected:<br />
char *figType;<br />
public:<br />
Shape(char *ft = "Define Figure"):figType(ft) {<br />
cout<<"Shape Construct"<<endl;<br />
};<br />
char *getType() {return figType;};<br />
virtual double Area() {return 0.0;};
};<br />
<br />
class Square:public Shape {<br />
protected:<br />
double length;<br />
public:<br />
Square(double l):Shape("Square") {<br />
length = l;<br />
cout<<"A Rectangle Object Created"<<endl;<br />
};<br />
double Area() {return length*length;};<br />
};<br />
<br />
class Rectangle:public Shape {<br />
protected:<br />
double height, width;<br />
public:<br />
Rectangle(double h, double w):Shape("Rectangle") {<br />
height = h;<br />
width = w;<br />
cout<<"A Rectangle Object Created"<<endl;<br />
};<br />
double Area() {return height*width;};<br />
};<br />
<br />
class Triangle:public Shape {<br />
protected:<br />
double height, base;<br />
public:<br />
Triangle(double h, double b):Shape("Triangle") {<br />
height = h;<br />
base = b;<br />
cout<<"A Triangle Object Created"<<endl;<br />
};<br />
double Area() {return height*base;};<br />
};<br />
<br />
class Circle:public Shape {<br />
protected:<br />
double pir;<br />
public:<br />
Circle(double p):Shape("Circle") {<br />
pir = p;<br />
cout<<"A Circle Object Created"<<endl;<br />
};<br />
double Area() {return pir*pir;};<br />
};<br />
<br />
void main() {<br />
Shape *s1;<br />
Rectangle *rp1;<br />
Rectangle r1(3,5);<br />
<br />
s1=&r1;
rp1=&r1;
<br />
cout<<"Area() applied through Rectangle pointer "<<rp1->Area()<<endl;<br />
cout<<"Area() applied through Shape pointer "<<s1->Area()<<endl;<br />
};<br />
All I want to know right now is, how similar is the code to the question asked above ? Can I apply this structure for using OpenGL instead of using characters for drawing the objects ? And where can I get nice and easy examples ?
Thanks in advance
Tolga
|
|
|
|
|
I have a list control and a number of handlers. What I want is to be able to process key presses as well as mouse clicks so if I select an item and press the Delete key on the keyboard I can call my Delete button handler. I have a handler called OnKeydownMyList() which is called when I press a key. How do I find out what key has been pressed so I can call the right handler?
Thank you.
|
|
|
|
|
Hi,
Your OnKeyDownMyList() looks like this :
<br />
void Cxxx::OnKeyDownMyList( NMHDR* pNMHDR, LRESULT* pResult )<br />
{<br />
LV_KEYDOWN* pLVKeyDow = ( LV_KEYDOWN* ) pNMHDR;<br />
<br />
<br />
*pResult = 0;<br />
}<br />
Here you can use the wVKey member of the pLVKeyDow..
Example :
<br />
void Cxxx::OnKeyDownMyList( NMHDR* pNMHDR, LRESULT* pResult )<br />
{<br />
LV_KEYDOWN* pLVKeyDow = ( LV_KEYDOWN* ) pNMHDR;<br />
<br />
if( pLVKeyDow->wVKey == VK_DELETE )<br />
{<br />
}<br />
<br />
*pResult = 0;<br />
}<br />
|
|
|
|
|
Thank you. That is exactly what I wanted
|
|
|
|
|
Hello everyone out there...
I need a help on MDI in MFC/VC++. I have managed to create three child windows when the application is run. But I am not able to create an interaction between the childwindows. Something like this..... when the user clicks a menu item, all the three child windows should get updated simultaneously with the click...or one by one when the user clicks on that particular child window....
Please mail me with the solution....
Thanks....
Regards...
Ruchit Sharma R
|
|
|
|
|
Check whether following function works
CWnd::SendMessageToDescendants()
or objChildWind.SendMessage()
objChildWind.PostMessage()
greatest thing is to do wot others think you cant suhredayan@omniquad.com
|
|
|
|
|
Hello,
Is their any way find the correct attributes for the CFont class that make a specific font? Eg, what are the attributes for CFont for the font: New Times Roman size 20?
I'm finding it hard to get the correct font that I require by changing the attributes in CFont class.
Hope I explained this well enough.
Thanks in advance.
|
|
|
|