|
How is the text of the messaage?
Carlos Antollini.
|
|
|
|
|
It's something like "mms ... error". It appears after one of the last dialogs in the DTS Wizard, when I choose the "Run Immediatly" checkbox, click 'Next", and o-o-ps!! I'm afraid that I have missed to install something, because when I try to work with another database with ADO and Visual C, nothing happends. I can'd add nothing.
Something else: I made an installation under Windows2000 and everything is fine. But I still need to use Win98. Any sugestions!
|
|
|
|
|
Hi,
I like to know how can i rotate counterClockwise using VC++ codes.
is there any specific function that could get the rotation degree and do the job???
Thanks
Ehsan Behboudi
|
|
|
|
|
What are you hoping to rotate ? GDI+ will let you rotate a graphics object ( equivelant to a CDC ), or a shape before drawing it.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
okay,
here's the deal,
I have a point(CPoint), and i can draw a line witha specifies length to the left of the line.
So, I like to be able to rotate Counterclockwise, and draw another line every n(user defined)
degrees.
is that possible?
Thanks
Ehsan Behboudi
|
|
|
|
|
You could *possibly* put a circle into a path, flatten it and iterate the points, but I'd just use trig myself. X = sin theta, Y = cos theta, from memory.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
As opposed to thinking of it as a circle, think of it one quadrant at a time. This requires that you have a fixed diameter (easiest to base on logical pixels). Then you can easily write a function to get the point for a given degree.
void GetPoint(CDC* pDC, LPRECT lpBoundingRect, int nDegree, CPoint& pt)
{
CRect bounds = lpBoundingRect;
int xRadius = pDC->GetDeviceCaps(LOGPIXELSX),
yRadius = pDC->GetDeviceCaps(LOGPIXLESY),
xPt = 0,
yPt = 0;
CPoint ptCenterPoint = bounds.CenterPoint();
double offset = (nDegree/360) * 4; //Since we are working with 1/4 of a circle,
//90 degrees is the entire quadrant
if((nDegree > 0) && (nDegree < 90))
{
//Quadrant 1
xPt = ptCenterPoint.x - (int)(offset * xRadius);
yPt = (xRadius * xRadius) + ((xPt - ptCenterPoint.x) * (xPt - ptCenterPoint.x));
yPt = (int)sqrt(yPt);
}
else if(nDegree == 90) //right angle
{
xPt = ptCenterPoint.x - xRadius;
yPt = ptCenterPoint.y;
}
else if((nDegree > 90) && (nDegree < 180))
...
pt.x = xPt;
pt.y = yPt;
}
|
|
|
|
|
Any ideas how to use ShellExecute for printing n copies of a document (say .pdf) ?
Thanks in advance
Mike
|
|
|
|
|
|
I know that i have to use "print" as the verb parameter...
But how can i tell ShellExecute (or the document's associated application) to print N copies ???
|
|
|
|
|
If your program supports passing number of copies in its command line, you can try to use lpParameters in calls to ShellExecute. If not, you're out of luck - unless you want to call ShellExecute multiple times.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hello,
I'm using Chris Maunder's excellent CSystemTray class to add an icon to the system tray for my application, and it is working great. Now I would like to set it up so that when the user minimizes the window (using the minimize button), it minimizes to the tray icon - not the taskbar icon. I followed the examples in Chris's article using a popup menu for the tray icon with Minimize and Maximize commands, and using CSystemTray::MinimiseToTray, etc. which worked fine, but I want to override the action of the minimize and restore _buttons_ (and, of course, the Minimize and Restore commands in the Windows (system) menu).
I tried snooping around MSDN for any info on SC_MINIMIZE, CWnd::OnSysCommand(), etc. but I haven't been able to come up with the magic formula yet! (Oh, it's an SDI app, if that makes a difference.) Does anyone kow how to do this?
Thanks!
-km-
|
|
|
|
|
|
I'm trying to use _findfirst and _findnext to find files with a certain extension in a given directory. THe files I'm trying to "find" are in the format "file.ext1.ext1".
_findfirst and _findfirsti64 don't find these files. Anyone got any hints? BTW, this has to work on Win9x and WinNT.
|
|
|
|
|
Nevermind. I had a brain fart.
|
|
|
|
|
I'm subclassing the MFC CListCtrl and am having difficulty getting the header notification message for sorting the list when in report view. There is a KB article, Q250614, that explains a bug with class wizard not generating the proper message map entry, but in my case I not trying to handle the message in a dialog, but in the subclass itself. The class wizard is generating an ON_NOTIFY_REFLECT message, but that doesn't seem to trap a meesage for me. I've also tried to put in an ON_NOTIFY handler, but that did not trap a message for me either. Spy++ shows that the window is receiving a WM_NOTIFY message. I'm probably missing something simple, so a little pointer from someone else would be welcome. Thanks.
Chris
|
|
|
|
|
You mean your control doesn't receive LVN_COLUMNCLICK via reflection?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Now that I have used this message instead, yes I can trap the sort request. Thanks for the assistance.
Chris
|
|
|
|
|
simple newbie question
i have 2 dialogs, main dialog and a child dialog...How to execute a function of the main dialog from the child dialog.
|
|
|
|
|
CMainDlg * pMain = (CMainDlg*)GetParent(); ( or AfxGetMainWnd() )
pMain->RunThisFunctionPlease();
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
|
Ok guys,
I know you can add a title to tooltips, ala W2K. I've got dll that allows me to do it via code, but I have no idea how to do it myself?
I've searched for ages but whilst I find websites that say it can be done, none of them have told me how
Anyone help me out?
TIA
Mark
|
|
|
|
|
Send TTM_SETTITLE to your tooltip control. It sets both icon and bold text.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hello
1) I am new in C++ (acully in windows either ) anyway can any one tell me how can check if there is another copy of my program is running (if you know how in C then its good for me than C++ )? I know its easy for you put please help me
2) anyone know where can I find a good site C/C++ source (I mean site like planet-source-code.com
Thank you
Muslim
mrguest@IamMuslim.org
|
|
|
|
|
Hi !
The most common way is to create a named (with a unique name) kernel object (say - mutex) on your programm start up (::CreateMutex() ). In case if the return value will be NULL you shoudl call to GetLastError() and if you'll get the ERROR_ALREADY_EXISTS - it will show you that this is not a first instance of your programm. And you have to close the object before programm exit... (or you wont be able
to run even first copy
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru
|
|
|
|