|
I gave up and am disabling this warning for the affected file in the vcxproj. Oh well, would have been nice to suppress in source.
John
|
|
|
|
|
Good Afternoon!
I'm trying to use the functions in the DLL created in C #, I need to read the functions in borland c + + builder, anyone have any suggestions?
|
|
|
|
|
Compile the C# object with the "Make COM Visible" checkbox checked, and then see this link:
COM Callable Wrapper[^]
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Hello ,
I have a problem.
I have a HTML page like this:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="/repertoire1/css/defaulthtml/reset.css" type="text/css" />
<link xmlns="" rel="stylesheet" href="/repertoire1/css/defaulthtml/default_theme.css"
type="text/css"></link><script type="text/javascript">
<title> Test HTML</title>
</head>
<body>
<div id="alert"></div>
<div class="data">
<div class="line-item">word1 word2 word3 word 4 word5 <br /> word7 word8 word9
</div>
</div>
<div class="footer"><a href="#" id="2" class="button enabled">Arreter</a><a href="#" id="3" class="button enabled">Annuler</a></div>
<script type="text/javascript" src="/repertoire1/test/.js"></script>
<script type="text/javascript">
$(document).ready(function () {
init();
});
</script></body>
</html>
I record this page in xml or txt file. I walk through the xml file and I have only recovered one by one word while cleaning the html tag like this one:
word1
word2
word3 ...
The question is : how to retrieve the words one by one, please
Thank you in advance.
|
|
|
|
|
This is the Managed C++ forum; please post your question in the proper place.
|
|
|
|
|
I think I'm good endroit.parce I have to do all this in c + + / cli.
I get the source code of the site with c + + and I have records in a xml file. I route the file and now I have to recover word and it will be with c + + / cli.
|
|
|
|
|
|
|
I want to use a mm_timer for my application by 60Hz or less . This is my testing code.
- In "testmmtimerDlg.h" header file:
#include "mmsystem.h"
#pragma once
#pragma comment(lib, "winmm.lib")
public:
double m_dcount;
static void CALLBACK TimeProc(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2);
void MMTimerHandler(UINT nIDEvent);
void StopTimer();
MMRESULT m_Timer;
DWORD resolution;</pre>
- In "testmmtimerDlg.cpp" file:
<pre>void CtestmmtimerDlg::OnBnClickedTest()
{
m_dcount = 0;
TIMECAPS tc;
timeGetDevCaps(&tc, sizeof(TIMECAPS));
resolution = min(max(tc.wPeriodMin, 0), tc.wPeriodMax);
timeBeginPeriod(resolution);
m_Timer = timeSetEvent(10,resolution,TimeProc,(DWORD)this,TIME_PERIODIC);
}
void CALLBACK TimeProc(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2)
{
CtestmmtimerDlg* obj = (CtestmmtimerDlg*) dwUser;
obj->MMTimerHandler(wTimerID);
}
void CtestmmtimerDlg::StopTimer()
{
timeKillEvent(m_Timer);
timeEndPeriod (resolution);
}
==>> But when I try to debug, I have 2 problem:
- First, "
testmmtimerDlg.obj : error LNK2019: unresolved external symbol "public: static void __stdcall CtestmmtimerDlg::TimeProc(unsigned int,unsigned int,unsigned long,unsigned long,unsigned long)" (?TimeProc@CtestmmtimerDlg@@SGXIIKKK@Z) referenced in function "public: void __thiscall CtestmmtimerDlg::OnBnClickedTest(void)" (?OnBnClickedTest@CtestmmtimerDlg@@QAEXXZ)
1>C:\Users\HungReo\Documents\Visual Studio 2010\Projects\testmmtimer\Debug\testmmtimer.exe : fatal error LNK1120: 1 unresolved externals
"
- Second, in header file, I try to change:
void (CALLBACK *TimeProc)(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2);
==>>>> OxC0000005: Access Violoation
- May someone help me to solve these problem???
modified 31-Mar-14 0:54am.
|
|
|
|
|
void (CALLBACK *TimeProc)(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2);
You are declaring TimeProc as a pointer to a function which is totally incorrect.
It should be like:
void CALLBACK TimeProc(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2);
void CALLBACK CtestmmtimerDlg::TimeProc(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2)
{
}
|
|
|
|
|
Thank you very much for your help! But when I try to follow your code, the error will be:
error C3867: 'CtestmmtimerDlg::TimeProc': function call missing argument list; use '&CtestmmtimerDlg::TimeProc' to create a pointer to member
|
|
|
|
|
I finished to run it ^^. Just move the CALLBACK function before click button and don't need to declare CALLBACK in header file. Thank you so much for your help ^^
|
|
|
|
|
|
Hi i have a stub that extract a resource. I want to run this resource directly from memory without write a file.
is it possible?
|
|
|
|
|
That depends if the resource is an exe or a dll. If it's an exe, there is no way, but if it's a dll, then check out this link:
Loading a Dll From Memory[^]
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Hello ,
I have a problem, I use LoadCursor () , but at runtime it shows me two error messages.
Here is the code:
term.h
void LoadCursor(double latitude,double longitude);
term.cpp
void Term::LoadCursor(double longitude,double latitude)
{
CursorLongitudeCurrent=longitude;
CursorLatitudeCurrent=latitude;
}
nem.h
double ReadLatitudeValue(void);
string ReadLongitude(void);
FormD.h
private: System::Void TMR_RS232Read_Tick(System::Object^ sender, System::EventArgs^ e) {
ptr_Term> LoadCursor(ptr_nem->ReadLatitudeValue(),ptr_nem->ReadLongitudeValue());
}
AND errors:
first:
error LNK2019: unresolved external symbol "public: void __thiscall term::LoadCursorW(double,double)" (?LoadCursorW@term@@$$FQAEXNN@Z) referenced in the function "private: void __clrcall FormD.cpp::Form_D::TMR_RS232Read_Tick(class System::Object ^,class System::EventArgs ^)" (?TMR_RS232Read_Tick@FormD@FormD.cpp@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)
Second:
error LNK2028: unresolved token (0A0004AF) "public: void __thiscall term::LoadCursorW(double,double)" (?LoadCursorW@term@@$$FQAEXNN@Z) referenced in the function "private: void __clrcall FormD.cpp::FormD::TMR_RS232Read_Tick(class System::Object ^,class System::EventArgs ^)" (?TMR_RS232Read_Tick@FormD@FormD.cpp@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)
if you have an idea
Thank you
modified 26-Mar-14 7:24am.
|
|
|
|
|
|
thank you very much Richard 
|
|
|
|
|
I changed the name of the function and I have no error
but my cursor does not appear you have an idea please
modified 26-Mar-14 9:45am.
|
|
|
|
|
LoadCursor just loads the resource, it doesn't change the system cursor to that shape.
We'd need to see your code where you try to use the cursor.
For example, do you use it:
* In response to a WM_SETCURSOR message?
* In a direct call to SetCursor()?
* Passed to RegisterClass?
John
|
|
|
|
|
Since your code does not do anything (as far as we can see) it's difficult to answer that question. What is this function supposed to do?
|
|
|
|
|
Hello thank you for your help.I have 4 function.
Term.h
bool stateCursor; void CreateCursor(PaintEA e);
Term.cpp
void Term::CreateCursor(PaintEA e){
SolidBrush^ blackBrush = gcnew SolidBrush( Color::Black );
SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );
if(CurPointCurrent!=CurPointPrevious) {
int deltaX=CurPointCurrent.X-CurPointPrevious.X;
int deltaY=CurPointCurrent.Y-CurPointPrevious.Y;
float distance= sqrt(pow((float)deltaX,2)+pow((float)deltaY,2));
float vectorX=deltaX/distance*polygoneLength;
float vectorY=deltaY/distance*polygoneLength;
Point point1 = Point(CurPointCurrent.X+vectorX,CurPointCurrent.Y+vectorY);
Point point2 = Point(CurPointCurrent.X+vectorX*-0.866-vectorY*0.5,CurPointCurrent.Y+vectorX*0.5+vectorY*-0.866);
Point point3 = CurPointCurrent;
Point point4 = Point(CurPointCurrent.X+vectorX*-0.866-vectorY*-0.5,CurPointCurrent.Y+vectorX*-0.5+vectorY*-0.866);
array<Point>^ curvePoints = {point1,point2,point3,point4};
if(stateCursor==false) {
e->Graphics->FillPolygon( blackBrush , curvePoints );
stateCursor=true;
}
else {
e->Graphics->FillPolygon( redBrush, curvePoints );
stateCursor=false;
}
}
else{
if(stateCursor==false) {
e->Graphics->FillEllipse( blackBrush , CurPointCurrent.X-circleRadius,CurPointCurrent.Y-circleRadius,circleRadius*2,circleRadius*2);
stateCursor=true;
}
else {
e->Graphics->FillEllipse( redBrush , CurPointCurrent.X-circleRadius,CurPointCurrent.Y-circleRadius,circleRadius*2,circleRadius*2 );
stateCursor=false;
}
}
}
FormD.h
private: System::Void picB_MainMap_Paint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e) {
if(!first_time) {
ptr_Term->CreateCursor(e);
}
}
private: System::Void picB_SubZone_Paint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e) {
if(!first_time) {
ptr_Term->CreateCursor(e);
}
}
Thanks
|
|
|
|
|
Sorry, I don't understand what you are trying to illustrate.
|
|
|
|
|
sorry my english is very bad. I tried to create a cursor. I have a function that nominated
CreateCursor in Term.h and Term.cpp and I call this function in FormD.h but not display the cursor
|
|
|
|
|
|