|
You must give a more vague reply to this kinda questions lol
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
actually i am new in this field thats why i wrote as per my scope and thats why i am here to take help from you guys...
so details for first question-->
i have these three co-ordinates for these two lines.
these arc will be drawn basically to show angle measurement
and in this product there will be some RTOS thats why i wrote not to use windows API..i may be wrong in this context
|
|
|
|
|
Are you afraid of giving details ?
vikas choudhry wrote: i have these three co-ordinates for these two lines.
Which 3 coordinates ? I guess (but it's just a guess) the coordinates of the intersection point, and of the two other end of the lines ? Are the two segments the same lenght ? If yes, that would help a lot because then you know that the center of the circle is the intersection point.
vikas choudhry wrote: and in this product there will be some RTOS thats why i wrote not to use windows API
You told us you were using VC6 . So, which platform are you targeting ? To draw something on the screen, you'll probably need to use OS specific functions.
|
|
|
|
|
If you have the coordinates of three mainingful points (for instance one of them must be the intersection between the lines ) then you may calculate the component of the vectors, take the dot product, divide by the vector modules and finally use the inverse cosine function to get the angle (well one of the two...).
As about drawing without APIs, I have a suggestion: [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
1. Find the forumla to generate all the points[That makes up the arc] between given two points.
2. SetPixel() all those points.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
vikas choudhry wrote: please help me to draw a arc betwwen two lines without using windows API.
vikas choudhry wrote: this code is being written for a embedded project in VC 6 thats why i cant use windows APIs.
What API could you use?
vikas choudhry wrote: and then i have to find angle betwwen these lines.
That's not difficult. Have you the equations of the two lines?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Oh, I by the way, as far as I know, VC6 supports only win32 platforms. At that time you had to use Embedded VC4 (or something like that).
|
|
|
|
|
(don't know the exact functions to call, but it should be simple enough to google for them)
( I wish I could draw something, it would make things easier to explain)
0. compute the angle between the first line to the X axis, compute the angle between the second line to the X axis;
1. find the intersection of the two lines; the intersection point will be the center of the arc (which is a section of a circle)
2. find a point on each lines that have the same distance from the center; this will be the radius.
3. Use the CDC::AngleArc ( or ::AngleArc) to draw the arc between the 2 angles. (i.e. from the first angle to the second angle).
This signature was proudly tested on animals.
|
|
|
|
|
can somebody provide me the sample code to draw a arc between two lines.
i have intersection point of these two lines and end points of these lines. now i have to use set pixel or any other standard vc++ function to draw it.
other way is to generate all point of a arc and then use set pixel but i dont know how to use it
|
|
|
|
|
Hi There.
I have a Win32 dll project, though I am successfully able to create dll file but there is no lib file created.
Please suggest, why this is so.
Thanks
Pankaj
|
|
|
|
|
You need to export at least one function in order to have a lib file which is created.
|
|
|
|
|
Thanks. You are right, I forgot to export my class.
|
|
|
|
|
Hello,
Does anybody know how to move horizontal pagebreak in excel through VC++ code?? I want to drag the first default horizontal pagebreak to new location.
Following is the code snippet..
HPageBreaks xlPageBreaks = m_xlSheet.GetHPageBreaks();
HPageBreak hb = xlPageBreaks.Get_Default(1);
COleVariant vCellTo = cellAt( 1, 62 ); // move pgebrk to this location
Range rangeDest = m_xlSheet.GetRange( vCellTo, vCellTo );
hb.SetRefLocation( rangeDest ) //
The method SetRefLocation() throws an exception.
Thanks,
Daryappa.
|
|
|
|
|
Are there standard Win32 functions that provide the same facilities as the System.Security.Cryptography class/namespace. I'm looking to canonicalize an XML document and generate a SHA1 hash key for the Inland Revenue.
|
|
|
|
|
Have a look at this page [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I want to embed Rich Edit Text inside property page. I am using Rich Text Edit control for displaying License agreement.
Please help me out. I stuck at this point.
Any help would be greatly appreciated.
Thanks
H4u32
|
|
|
|
|
If you're using MFC, call the function AfxInitRichEdit() during application initialization.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hello,
I have written a function to retrieve a band in CRebar by the text used with the AddBar function
like this
MainFrame->m_wndReBar.AddBar(WndBarMIL,"myText")
When I use my function FindToolbar (see below), the REBARBANDINFO.lpText is always NULL?
Actually, I use VS2008 with Windows XP. I can't remember if this function that I have written many years ago has never worked or if it's a new bug...
Thanks
BOOL CMyApp::FindToolbar(CString nom)
CMainFrame *MainFrame=(CMainFrame *)theApp.m_pMainWnd;
CReBarCtrl& ReBarCtl=MainFrame->m_wndReBar.GetReBarCtrl();
UINT i=0;
REBARBANDINFO bandinfo;
int j=ReBarCtl.GetBandCount();
while (i<rebarctl.getbandcount())> char textinfo[80];
bandinfo.cbSize=sizeof(REBARBANDINFO);
bandinfo.fMask=RBBIM_TEXT|RBBIM_CHILD;
bandinfo.lpText=textinfo;
bandinfo.cch=80;
ReBarCtl.GetBandInfo(i,&bandinfo);
if (strcmp(bandinfo.lpText,nom)==0) break;
else i++;
}
if (i->ReBarCtl.GetBandCount()) return(TRUE);
else return(FALSE);
}
|
|
|
|
|
How do you mean 'always NULL'? Does the ReBarCtl.GetBandInfo(i,&bandinfo); call modify the lpText member?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
In fact, bandinfo.lpText is a null string (the first byte is equal to 0) ?
|
|
|
|
|
Probably no, but just to be sure...does anything change if you declare your textInfo array as TCHAR instead of char? So i mean, instead of char textinfo[80]; , TCHAR textinfo[80]; . Another question, is 80 characters enough? Could it be that you are specifying a not big enough buffer?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
No change with TCHAR and 80 is more than necessary...
I will appreciate an other idea...
|
|
|
|
|
HF wrote: When I use my function FindToolbar (see below), the REBARBANDINFO.lpText is always NULL?
Actually, I use VS2008 with Windows XP. I can't remember if this function that I have written many years ago has never worked or if it's a new bug...
I don't know about it in VS2008, but I tested it in the Microsoft's ControlSpy tool and it is working.
ControlSpy[^]
- ns ami -
|
|
|
|
|
I have received a mail where you talk about the hwndChild.
This pointer stays to NULL...
|
|
|
|
|
That was one wrong suggestion, so I deleted immediately
HF wrote: This pointer stays to NULL...
Means you are not getting the window to that bar.
- ns ami -
|
|
|
|