|
Is there anyone who would be so kind to tell me where can I get some sorce code about a software which can read or edit the powerpoint file? Many thanks!
thinkpader
|
|
|
|
|
Hi !
I would like to ask your help in a problem I got stuck completely for weeks now.
I need to check and clear the Enhance pointer precision checkbox whitin Mouse settings under Control Panel of XP.
Could somebody help me please ?
Many thanks in advance,
Moore
|
|
|
|
|
Programatically?
Best,
Jun
|
|
|
|
|
Of course programtically, yes. Manually with mouse it is easy, but I would need to do it from source code from an application.
Any idea how ?
Many thanks,
Moore
-- modified at 17:52 Friday 30th June, 2006
|
|
|
|
|
hi, i am tyring to use OpenCV code in VS .net 2003 Visual C++ Windows forms.
when i build, it give me no error but when it start it give an error :
An unhandled exception of type 'System.TypeLoadException' occurred in cam1.exe
Additional information: Could not load type CvCapture from assembly cam1, Version=1.0.2371.20291, Culture=neutral, PublicKeyToken=null.
The error seen to be from this line:
capture = cvCaptureFromCAM(0);
new to programming
-- modified at 3:01 Thursday 29th June, 2006
|
|
|
|
|
|
Hey eveybody,
I have written a WndProc() function that detects the insert and removal of a USB drive and
want to pull out the specific LParam values to get the name of the drive and other info.
The examples I've found so far use a particular C# code that goes like this...
<br />
[StructLayout(LayoutKind.Sequential)]<br />
public struct DEV_BROADCAST_VOLUME<br />
{<br />
public int dbcv_size;<br />
public int dbcv_devicetype;<br />
public int dbcv_reserved;<br />
public int dbcv_unitmask;<br />
}<br />
protected override void WndProc(ref Message m)<br />
{<br />
const int WM_DEVICECHANGE = 0x0219;<br />
const int DBT_DEVICEARRIVAL = 0x8000;
const int DBT_DEVTYP_VOLUME = 0x00000002;
if (m.Msg == WM_DEVICECHANGE && m.WParam.ToInt32() == DBT_DEVICEARRIVAL)<br />
{<br />
int devType = Marshal.ReadInt32(m.LParam,4);<br />
if(devType == DBT_DEVTYP_VOLUME)<br />
{<br />
DEV_BROADCAST_VOLUME vol;<br />
vol = (DEV_BROADCAST_VOLUME) Marshal.PtrToStructure(m.LParam,typeof(DEV_BROADCAST_VOLUME));<br />
MessageBox.Show(vol.dbcv_unitmask.ToString("x"));<br />
}<br />
}<br />
base.WndProc (ref m);<br />
}<br />
And I've been trying to get the LParam into my structure like this:
<br />
__gc struct Volume<br />
{<br />
int size;<br />
int devicetype;<br />
int reserved;<br />
int unitmask;<br />
}<br />
<br />
protected: void WndProc(System::Windows::Forms::Message* message) <br />
{<br />
...<br />
if(message->Msg == WM_DEVICECHANGE)<br />
{<br />
if(message->WParam == DBT_DEVICEARRIVAL)<br />
{<br />
lVolume = (Volume*)Marshal::PtrToStructure(message->LParam,__typeof(Volume));<br />
<br />
String* str = MaskToLogicalPaths(lVolume->Mask);<br />
this->m_FoundBox->Text = String::Format("Plugged In: {0}",str);<br />
}<br />
else <br />
if(message->WParam == DBT_DEVICEREMOVECOMPLETE)<br />
{<br />
this->m_FoundBox->Text = String::Format("UnPlugged: {0}",message->WParam.ToString());<br />
} <br />
}<br />
}<br />
This continues to not work in MC++.
For some reason I cannot find a viable alternative to the C# code in MC++. My errors include
the dreaded run-time:
"The specified structure must be blittable or have layout information..."
among other more standard compile errors for instantiating the structure incorrectly.
I know theres a way to do this but havent found it yet.
Any help you all could be would be greatly appreciated!
ScottLeff
sleff@yahoo.com
|
|
|
|
|
How to apply "Force file output" option in Visual Studio.NET i.e. VC7. In Visual Studio 6.0, it is available in "Link-->Customize" option in Project Settings of VC++ project.
Can any one help me out please
|
|
|
|
|
Hi All,
In C++/CLI I have used a 2 Dimensional String Array.
My code:
array<String^,2> ^strarr=gcnew array<String^,2>(2,2){"focus1","focus2","focus3","focus4",};
and when I want a string to print on console
ie
Console::Writeline("{0}",strarr[0][0]);
compiler is giving Error.
can any one suggest
Bye..
G.Nagaraju
|
|
|
|
|
Hi,
if want to directly initialize your array then you'll have to do it like this:
<code>
array<String^,2>^ strarr = gcnew array<String^,2>{{"focus1","focus2"},{"focus3","focus4"}};
Console::WriteLine("{0}",strarr[0,0]);</code> In additon I would recommend you to read this article.
http://www.codeproject.com/managedcpp/cppcliarrays.asp[^]
best regards Tobias
|
|
|
|
|
hi.I am using visual studio .net 2003 and I am new to managed c++.
I have to write joystick controller(mouse stick)but I dont now where to start.
|
|
|
|
|
What do you mean by a joystick controller? To me the hardware is the controller and the software is the driver and your program communicates with this driver by an api.
I assume you need to have your program use the joystick support that is built in the operating system? DirectInput (part of directx) has support for joysticks.
John
|
|
|
|
|
I have to create a GUI which control the camera.in my GUI i need to create a mouse stick which controls the camera like rotate left or right. but i get stuck on the mouse stick.In order to create this mouse stick where should i start.
|
|
|
|
|
|
thank you very much for the article.I almost finish qui part of my project
Mert Aydin
|
|
|
|
|
Hey guys, I am trying to understand some codes and came across this.
In the code below, I don't know if its a pointer to RTIambassador object. I don't see why there is RTI:: in front of RTIambassador* and also ms_rtiAmb is not a method of class ObjectRoot. I don't see why they have ObjectRoot:: in front of ms_rtiAmb.
Thanks,
Jay
RTI::RTIambassador* ObjectRoot::ms_rtiAmb = NULL;
|
|
|
|
|
don't cross post the forums
we already answered you on the other board... can't you just wait for an answer more than 5 minutes ??
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
|
Hi,
I've got an application that uses mixed C++.
Sometimes, the application crashes with AccessViolationException
It seems that the cause is that I'm using unmanaged pointers without pinning.
Here is the code that crashes sometimes
<br />
__gc class CRichTextBuffer<br />
{<br />
public:<br />
CRichTextBuffer()<br />
{<br />
m_BufferSize = 32;<br />
m_BufferPosition = 0;<br />
m_buf = new char[m_BufferSize];<br />
}<br />
<br />
public:<br />
bool CreateCDParagraph(CDPABDEFINITION __gc *Definition)<br />
{<br />
Int32 nSize;<br />
bool bResult = false;<br />
int nStep = 0;<br />
<br />
try<br />
{<br />
nSize = ODSLength(_CDPABDEFINITION); nStep++;<br />
<br />
<br />
if ( CheckSize(nSize) ) <br />
{<br />
LPTSTR LPStrResult = new TCHAR[nSize]; nStep++;<br />
LPTSTR LPStrTmp = LPStrResult;
nStep++;<br />
<br />
CDPABDEFINITION Def;<br />
CopyStructure( &Def, Definition ); nStep++;<br />
<br />
ODSWriteMemory( &LPStrTmp, 10, &Def, 1 ); nStep++;<br />
<br />
CopyMemoryInBuffer(LPStrResult, nSize); nStep++;<br />
delete [] LPStrResult; nStep++;<br />
<br />
bResult = true;<br />
}<br />
}<br />
catch (Exception* e)<br />
{<br />
String *sMsg = String::Concat("Exception: ", e->get_Message()," - Step=", nStep.ToString());<br />
System::Diagnostics::Debug::Assert(false, sMsg);<br />
bResult = false;<br />
}<br />
<br />
return bResult;<br />
}<br />
<br />
protected:<br />
char *m_buf;<br />
int m_BufferPosition;<br />
int m_BufferSize;<br />
}<br />
I'm new with __pin pointers
where is the problem? where need I use __pin pointers?
I know that I can't __pin the class member m_buf. How can I prevent the application from crash?
Thanks in advance for your help
Stf
|
|
|
|
|
I've got an unmanaged C++ library which I've now compiled as a managed assembly (changed the output type etc.) When I try to use this in another Managed C++ project, I get C2871 - a namespace with this name does not exist. I have tried using both:
#using (with the Resolve #using references setting)
Adding a reference (automatic /FU switch)
but neither works; I still get C2871 on the first "using namespace" line.
The really strange thing is that I have built a test c# application and this is able to use the assembly just fine!
Any clues anyone?
Mark
|
|
|
|
|
if u r sure that u can use the assembly from C#, no doubt u should be able to use the same from managed cpp as well.
To confirm the namesapce/class names u used in managed cpp:
* chk it in c#, by press ctrl+alt+j and see the namespace details in the object browser.
* or use ildasm.exe to di assemble the assembly and see the namespace type informations.
cheers...milton kb
|
|
|
|
|
Thanks for the advice. The strange thing is, I've already checked this.
ildasm.exe shows the namespace just as I'm trying to use it and C# uses it without a problem. The Managed C++ compiler picks up the dll from the #using statement but can't seem to find the namespace in a subsequent "using namespace ..." statement.
I've tried using a different dll in the project and this works OK. I've also tried compiling the included dll in a complete new project - same problem. So it seems to be something wrong with this particular dll. I just don't understand how the C# compiler can see the namespace whereas the C++ one can't.
Ideally I want to get the C++ compiler to verbosely tell me exactly what it's searching and what it 'sees'. I guess that's not possible!
Mark.
|
|
|
|
|
hello,
I want to create a managed C++ dll to access a .net component.
The managed C++ dll is used in a plain C++ application.
Is this possible?
greetings,
Niko
|
|
|
|
|
For accessing a .net component from palin c++(unmanaged)you have to use CCW com callable wrapper.
For this, if the .net component is already written in such a way that it be used for generating the ccw, directly use it. or else write a managed c++/c# wrapper which is compliant with requirements fo a CCW. then use the ccw from plain c++
cheers...milton kb
|
|
|
|
|
Hi,
As I mentioned in the subject line, I am an experienced C programmer. I want to upgrade myself to a C++ programmer. I am a little bit familiar with Object Oriented Programming concepts, so I believe myself to overcome this transition from C to C++, but I need your proper directions to my this aim. In order to appropriately achieve this, could you send your directions and suugestions?
Thank you in advance.
Semih
|
|
|
|