|
Have you converted the solution in-place (with existing output files from old VS 2008 builds)?
Then try to delete all output files (especially old ones which can be identified by the time stamp).
|
|
|
|
|
Hi,
The 'Debug' build is just a text label... in other words it sounds like your DLL is being compiled with the symbols stripped out. There is nothing stopping someone from configuring 'Debug' exactly as a 'Release' build.
Try using DUMPBIN /SYMBOLS[^] on your DLL to check if the symbol tables exists.
Don't forget that you can PIPE the output into a text file:
DUMPBIN /SYMBOLS YourDLL.DLL > symbols.txt
Best Wishes,
-David Delaune
|
|
|
|
|
Hello Everybody,
I am using VC++ and OpenGL for one application.
I am new to OpenGL. I can able to load different objects and also able to create vertices. After that, I was able to select and pick those using glReadPixels and gluUnProject.
Now, I need to select and pick lines (edges of the triangles). I searched in google and not able to find a proper result.
Can anybody give me ideas how to implement this?
Thanks in Advance.
Regards,
Gopi.
|
|
|
|
|
Find the line in your list that is closest the point or at least less than some tolerance value
A number of Contributed implementations of the formula here plus an explaination of the mathematics
Point, Line, Plane[^]
Implementation would look something like this
#define GLfloat float // No sure if you want floats or double you can change here
GLfloat GLDistance2D (GLfloat x1, GLfloat y1,
GLfloat x2, GLfloat y2)
{
GLfloat dx, dy;
dx = x2 - x1;
dy = y2 - y1;
if ( dx < -FLT_EPSILON || dx > FLT_EPSILON ||
dy < -FLT_EPSILON || dy > FLT_EPSILON )
{
return sqrtf(dx * dx + dy * dy);
}
return (GLfloat) 0.0;
}
GLfloat GLDistanceToLine2D (GLfloat px, GLfloat py,
GLfloat x1, GLfloat y1,
GLfloat x2, GLfloat y2,
bool linesegment,
GLfloat* cpx, GLfloat* cpy)
{
GLfloat u;
GLfloat dx = x2 - x1;
GLfloat dy = y2 - y1;
GLfloat SqLineMag = dx * dx + dy * dy;
if (SqLineMag > -FLT_EPSILON && SqLineMag < FLT_EPSILON) {
if (linesegment) return GLDistance2D(px, py, x1, y1);
else return (GLfloat)-1.0;
}
u = ((px - x1)* dx + (py - y1)* dy) / SqLineMag;
if ((linesegment) && ((u < FLT_EPSILON) || (u > (GLfloat)1.0)))
{
GLfloat ix, iy;
ix = GLDistance2D(px, py, x1, y1);
iy = GLDistance2D(px, py, x2, y2);
if (ix < iy) {
if (cpx) (*cpx) = x1;
if (cpy) (*cpy) = y1;
return(ix);
}
else {
if (cpx) (*cpx) = x2;
if (cpy) (*cpy) = y2;
return(iy);
}
}
else {
GLfloat ix, iy;
ix = x1 + (u * dx);
if (cpx) (*cpx) = ix;
iy = y1 + (u * dy);
if (cpy) (*cpy) = iy;
return GLDistance2D(px, py, ix, iy);
}
}
Run a test .. it should return ix,iy = (200,100) dist = 100 ... plot it you will see why.
GLfloat ix, iy;
GLfloat dist = GLDistanceToLine2D(100, 100, 200, 0, 200, 200, true, &ix, &iy);
In vino veritas
modified 23-Mar-18 2:36am.
|
|
|
|
|
Thanks Leon for your quick reply.
Will give it a try and update you.
Regards,
Gopi.
|
|
|
|
|
Hi Leon,
Sorry for late reply. Got time to work on this now only.
Awesome. This one works fine as I expected.
Thanks again.
Regards,
Gopinath.
|
|
|
|
|
Hi
I created a control in my MFC application as follows:
CSpinButtonCtrl m_spin;
m_spin.Create(UDS_HORZ, CRect(0, 0, 50, 50), this, 1011);
m_spin.ShowWindow(1);
which created a spin control with two button with left arrow and right arrow. Now i want to perform some job based on the user clicks on these two buttons. I tried by adding notification message in Message map as follows:
ON_NOTIFY(NM_CLICK, IDC_SPIN1, OnDropDown)
The above message dint called my OnDropDown().
I tried adding ON_WM_HSCROLL(), it worked. The function OnHScroll is getting executed when i click on right or left arrow buttons in spin control.
But what my fear is, in near future i may also add a scroll bars (horiz and veritcal) in my application. That time this may get conflict with my spin control.
So, i am looking for a message which will notify me when left or arrow arrow is invoked on spin control.
|
|
|
|
|
|
Sorry i tried this as follows
ON_NOTIFY_REFLECT(UDN_DELTAPOS,OnSpinContol)
Its throws syntax error and could not find any sample in google to declare the message.
|
|
|
|
|
In what class did you implement it?
Please, post the exact code snippets!
|
|
|
|
|
BEGIN_MESSAGE_MAP(CMyClass, CScrollView)
ON_NOTIFY_REFLECT(UDN_DELTAPOS,OnSpinContol)
END_MESSAGE_MAP()
void CMyClass::OnSpinContol(NMHDR *pNMHDR, LRESULT *pResult)
{
}
|
|
|
|
|
CMyClass seems to be a parent/owner of the spin control. So there must be ON_NOTIFY macro, not a ON_NOTIFY_REFLECT
|
|
|
|
|
That is for handling the message by the control class itself when having it derived.
To handle the message in the parent do it like you have done already:
ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN1, OnDeltaPos)
|
|
|
|
|
Even tried below one, but no luck.
BEGIN_MESSAGE_MAP(CMyClass, CScrollView)
ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN, OnSpinContol)
END_MESSAGE_MAP()
void CMyClass::OnSpinContol(NMHDR *pNMHDR, LRESULT *pResult)
{
}
|
|
|
|
|
Sampath579 wrote: Even tried below one, but no luck.
BEGIN_MESSAGE_MAP(CMyClass, CScrollView)
ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN, OnSpinContol)
END_MESSAGE_MAP()
void CMyClass::OnSpinContol(NMHDR *pNMHDR, LRESULT *pResult)
{
}
1. Define "no luck".
2. Do you pass the correct control ID (IDC_SPIN)?
|
|
|
|
|
Hey Thanks Victor. Its working now.
|
|
|
|
|
It is very probably sourced by the creation of your spin control:
m_spin.Create(UDS_HORZ, CRect(0, 0, 50, 50), this, 1011);
That misses the common window style flags like WS_CHILD | WS_VISIBLE | WS_TABSTOP .
Just out of interest:
Why are you creating your controls manually instead of using resource templates?
With templates the default settings are initially set in the resource editor so that such errors did not occur.
|
|
|
|
|
Hey Thanks..
Finally its working. The very first thing is i am new to MFC and second is i am creating all dynamic windows and controls based on user input.
|
|
|
|
|
|
I AM TRYING TO READ ARABIC QR CODE I HAVE GOT STRING LIKE THIS:
"0E" & ChrW(2) & "!پù;ر-ً" & ChrW(5) & "üà1" & ChrW(18) & "ثV½›H$»سè" & vbBack & "“أK»V¢®؛" & ChrW(21) & "*" & ChrW(2) & " |" & ChrW(26) & "M§" & ChrW(18) & "uس/ءd'ق" & ChrW(15) & "•qw}َ" & ChrW(22) & "î" & ChrW(31) & "ِه" & ChrW(30) & ">›جWگ¢Kh" & vbCr
IF YOU PLEASE I WANT TO CONVERT IT TO REAL STRING
THANK YOU
|
|
|
|
|
That looks like Basic code, not C/C+.
|
|
|
|
|
YES IT IS VISUAL BASIC BUT IS THERE ANY WAY TO UNDERSTAND THAT CODE
|
|
|
|
|
Yes read up on Visual Basic or go to a Visual Basic forum and ask.
In vino veritas
|
|
|
|
|
Text in Arabic would either be written in Unicode, or using an Arabic "code page" (a throwback to the days when characters were 8 bits, and so your program had to "know" what language was encoded in codes 128..255). One way to encode Unicode in QR codes is using UTF-8. Have you tried running the raw QR data through a UTF-8 decoder?
Note that if the raw QR data does not start with a BOM (Byte-order mark), you will have to try both low-endian and high-endian versions.
Ad astra - both ways!
|
|
|
|
|
Private Sub doupdate()
RichTextBox1.Text = str
End Sub
Private Sub SerialPort1_DataReceived(sender As Object, e As IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
Try
mystring = SerialPort1.ReadLine
Dim encExc As New UTF8Encoding
Dim encRepl As New UTF8Encoding
Dim s As String = mystring
Dim index As Integer = encExc.GetByteCount(s)
Dim bytes(Index + 3) As Byte
encExc.GetBytes(s, 0, s.Length, bytes, 0)
bytes(index) = &HFF
bytes(index + 1) = &HD8
bytes(index + 2) = &HFF
bytes(index + 3) = &H1
Dim enc As Encoding = encRepl
str = ""
Dim si As New System.Globalization.StringInfo(mystring)
Dim unicodeTestArray(si.LengthInTextElements) As String
For i As Integer = 0 To si.LengthInTextElements - 1
unicodeTestArray(i) = si.SubstringByTextElements(i, 1)
str = str & System.Text.Encoding.UTF8.GetString(bytes)
Next
SerialPort1.DiscardInBuffer()
Me.Invoke(New EventHandler(AddressOf doupdate))
Catch ex As Exception
MsgBox("NO BARCODE")
End Try
End Sub
BUT I GOT THE RESULT
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
0D ]Gب
¾–”q›73ھـY`ْ'؛‹’Dپآ=Ok kَ(h#¤ٌخyqْ3£ّ«X‘*£ط؛ع
°r¹ة>w
���
|
|
|
|
|