|
I hope this will help
// in order to solve flickering i have to use double buffering
this->SetStyle( ControlStyles::AllPaintingInWmPaint, true);
this->SetStyle( ControlStyles::UserPaint, true);
this->SetStyle( ControlStyles::DoubleBuffer, true );
|
|
|
|
|
I have an upcoming TAPI project to be written using Visual C++ 2005. Im just wondering is there some new fan-dangled API in the dot net framework that supercedes the TAPI API?
|
|
|
|
|
I want to know if declaring soemthing like this makes sense?
I have a class whose declario is as follows:
namespace Utility {
class Filebase : public fstream {
public:
and I want to declare a vector of objects of this class. Currently w/o vector I am using an object of this class as:
string signal = ".s_"+layer+"_" + toString (iStage);
Utility::Filebase temp (signal, ios::out);
temp.create(signal);
I want to use Filebase temp using a vector
Is this possible in C++?
Thanks
Suddha
|
|
|
|
|
I am looking for a way to add a 16 X 48 matrix of owner drawn buttons to a small
utility I am developing in VC++ 2005. Can anyone direct me to specific articles
or code to accomplish this task. I want to preserve 2d addressing. Initialization
might go like:
private: System::Windows::Forms::Button^ Mybutton[][];
Chris
|
|
|
|
|
Go through this code, it may help
array<Button^,2>^ myButton = gcnew array<Button^>(10)(10);
myButton[0][0]=gcnew Button();
myButton[0][0]->Location = System::Drawing::Point(300, 189);
myButton[0][0]->Name = L"button123";
myButton[0][0]->Size = System::Drawing::Size(148, 41);
myButton[0][0]->TabIndex = 1;
myButton[0][0]->Text = L"Added";
myButton[0][0]->UseVisualStyleBackColor = true;
this->Controls->Add(myButton[0]);
this->myButton[0][0] ->Click += gcnew System::EventHandler(this, Form1::button123_Click);
Nagaraju
-- modified at 0:29 Saturday 8th July, 2006
|
|
|
|
|
Thank you, I will try the code and will get back in day or two.
Chris
|
|
|
|
|
Hi all,
Help me to Get rid of my Task.
In which Some I have to Read contents of some .pdf File and
Write all those Contents in a .txt file and save it;
But When I try to read .pdf file data ,it is showing the encripted charecters.
Pls suggest me
Nagaraju
|
|
|
|
|
I have a function in cpp file returning int * array and taking int * array as a parameter. It is as:
int * funcArg(int *a ) {
int DLLArg [] = {100,200,300};
a=DLLArg;
return a;
};
I have exported this function in the dll (i have checked it with dumpbin.exe)
But I can not handle this function in c# client. My code in c# is as: ( ıt gives this error. "An unhandled exception of type 'System.Runtime.InteropServices.SafeArrayRankMismatchException' occurred in CSharpClient.exe
Additional information: Safe array of rank 51241 has been passed to a method expecting an array of rank 1."
What should I do? URGENT help!!!
namespace CSharpClient
{
class Class1
{
[DllImport("DenemeNonMfcDll.dll",EntryPoint="?Sub@DLLclass@@QAEHHH@Z")]
public extern static int Sub(int a, int b);
[DllImport("DenemeNonMfcDll.dll")]
[return: MarshalAs(UnmanagedType.SafeArray)]
public extern static int [] funcArg(int [] a);
public static int [] intArray = new int [3] {0,1,2} ;
static void Main(string[] args)
{
foreach (int num in funcArg(intArray) )
{
System.Console.WriteLine(num.ToString());
}
Console.WriteLine("Press any key to continue...");
Console.ReadLine();
}
}
}
|
|
|
|
|
Hi,
I want to use a GUI component, which was developed using the MFC, in a .Net program. Is it possible to access the classes using some mc++ wrapper layer? Are there any problems due to the use of the MFC due to which I can not access this component with .Net? If this is possible, how do i do this? Do you know any sample, where somebody did something similar?
Cheers
gunag
|
|
|
|
|
hi all,
I am working in VC++6.0 IDE.
I want to create a pop-window which displays some message.
Can anyone assist me on how to proceed further and where i can get some useful information.
Thanks in advance,
Veenu.
|
|
|
|
|
Use message box.
Best,
Jun
|
|
|
|
|
hi jun,
Thank you for the reply.
I tried out Message Box function and it is working fine for me.
I have a doubt.
I want to send a variable value to the mesaage box to output it in the popup .
I mean if i have smthing like this:
for (i=0;i<2;i++)
{
MessageBox( .... );
}
Is there anyway to include this variable , "i" value into the mesage box ?
Thanks in advance,
Veena.
|
|
|
|
|
Yes. Although Message Box only takes string prarameters, you can always put variables into the string you're going to display. For example,
char str[256];
for (i=0;i<2;i++)
{
sprintf(str, "The variable is: %d", i);
MessageBox(str, ...);
}
Note this is just native C code.
Best,
Jun
|
|
|
|
|
CString str;
for(i=0;i<2;i++)
{
str.Format("%d",i);
MessageBox(str);
}
Nagaraju
|
|
|
|
|
Hi All,
I've just switched my project from old VS6 to VS.NET 2005.
At compile time, I receive a lots of warning about 'deprecated' functions . Some of them have been disabled using _CRT_SECURE_NO_DEPRECATE. Others are still there.
I would like to use #pragma warning(disable : 4996) without using _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES to override functions with their secure version.
Files are too much to write in each of them: do you know if it is possible to set some projecet settings, or a place where to inserte a single #pragma so that it is valid for all files?
Regards
Manu
|
|
|
|
|
|
..sometimes, life can be very easy!!
Many thanks Earl!
Have a nice day.
Manu
|
|
|
|
|
Hi all..
Can anyone tell me the procedure to follow to connect to a database(Of MySQL Server).Is there any link where i can find some useful information on this topic.
Thanks in advance,
Veenu
|
|
|
|
|
See Here.[^]
I hope this helps
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
So can you provide me with some info about "connecting to database " so that it will become a bit easy for me
regards,
veenu
|
|
|
|
|
What exactly from the article didn't work for you?
earl
|
|
|
|
|
Hi,
I have an unmanged c++ dll and need to write a c# wrapper for it so I can add it to my c# application
I have this in c++
extern "C" BOOL WINAPI GetDeviceID(DWORD dwDevice, DWORD* pdwID);
and in my wrapper I have
[DllImport("MDBEngine.dll")]
unsafe public static extern bool GetDeviceID(uint dwDevice, uint* pdwID);
my question is what is the * for in c++ and do I need it in my reference in c#?
|
|
|
|
|
That is a unmanaged pointer. You must marshal your corrsponding C++/CLI varaible to an appropriate native pointer before using this platform invoke.
Best,
Jun
|
|
|
|
|
Hi
You can use from SWIG (Simplified Wrapper and Interface Generator).SWIG is an interface compiler that connects programs written in C and C++ with scripting languages such as Perl, Python, Ruby,C# and Tcl. It works by taking the declarations found in C/C++ header files and using them to generate the wrapper code that scripting languages need to access the underlying C/C++ code. In addition, SWIG provides a variety of customization features that let you tailor the wrapping process to suit your application.
http://www.swig.org/
-- modified at 5:55 Monday 10th July, 2006
|
|
|
|
|
hi i want to write an application just like PC any where.just confused where to start. i had couple of ideas.
on is that capture the screen as bitmap and send it to another computer that will show it to the user.but dont know where the user had clicked on static bitmap and get all pts.any idea is welcomed.
Second is that on clicking on one PC how to generate that event to another computer. any API etc.
Tasleem Arif
|
|
|
|