|
Hello Friends,
In my application I am using SQL Server's database. My database is already uploaded on Internet SQL server.
Hear is my problem:
If I dont have SQL server in my computer, then I get connection error when I am trying to open the connection with this server.
BUT if I have SQL server in my computer then it gets connected with that SQL server on Internet and works fine.
What is problem in this?
If some one knows the solution for this, then please tell me
Thanks
|
|
|
|
|
You probably are initially lacking the client connectivity components on your local computer, but you then get them when you install the SQL server locally.
You might also try just installing MDAC locally and then see if you can connect to the remote SQL server.
C++/MFC/InstallShield since 1993
|
|
|
|
|
Hi All
Can u help i have a sting which contains both Alpha and Numeric Characters
eg. mystring = "344RT",
however i want to remove all numeric characters
so im left with mystring = "RT"
does ne1 know the best function for doing so
thanks in advance
si
|
|
|
|
|
I would do the brute-force way:
mystring.Remove('0');
mystring.Remove('1');
mystring.Remove('2');
mystring.Remove('3');
mystring.Remove('4');
mystring.Remove('5');
mystring.Remove('6');
mystring.Remove('7');
mystring.Remove('8');
mystring.Remove('9'); Perhaps not the best solution, but it works
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
Not tested, but this is what I initially thought of :
<br />
#include <ctype.h>
CString strAlphaOnly;<br />
TCHAR cMyString[] = _T("344RT");<br />
<br />
for(int nCount=0; nCount < len(cMyString); nCount++)<br />
if( isalpha( cMyString[nCount] ) )<br />
strAlphaOnly+=cMyString[nCount];<br />
"..Even my comments have bugs!"
Inspired by Toni78
|
|
|
|
|
i am trying to hide a window after using the animate window function. The code is as follows:
<br />
AnimateWindow(m_hWnd,500,AW_HIDE | AW_SLIDE | AW_VER_POSITIVE);<br />
<br />
this->ShowWindow(SW_HIDE);<br />
am not sure why this isnt working
|
|
|
|
|
The GDI+ Bitmap class has an ApplyEffect method and Graphics has a DrawImage, both of which take a pointer to an Effect based class.
Although the docs relating to Effect's are marked prelim they seem to imply that this functionality exists in the 1.1 GDI+ API accross all OS's.
1. How do i know what version of GDI+ i have when the dll is version 5.1.3097.0 and the headers in the latest PlatformSDK have no Effect definitions anywhere. Went through all the GDI+ headers and no metion of version anywhere. Return from GdiplusStartup says version is 1, but field is an ulong so couldn't represent 1.1 anyways.
2. Is GDI+ 1.1 a part of the .NET release (as i am still using VC++ 6 i wouldn't see it then)
3. All searches on MS (and the web) only turn up the 5.1.3097.0 version dll.
4. Why is there air ?
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Here are some common terms:
1.DECLARE_DYNAMIC and IMPLEMENT_DYNAMIC
2.const CStudent& operator=(const CStudent& s)
{
...
}
3.BOOL operator ==(const CStudent& s) const
{
...
}
Can you tell me how to master these terms?
|
|
|
|
|
DECLARE_DYNAMIC and IMPLEMENT_DYNAMIC are MFC macros. You must use them if you want MFC's DYNAMIC_DOWNCAST macro, the RUNTIME_CLASS macro, and the IsKindOf method to work. Your class must be derived from CObject .
If using a newish version of C++ (VC 6.0 and later, IIRC), and not interfacing with older MFC code that uses these macros, I suggest sticking to the standard C++ dynamic_cast cast operator and the typeid operator. Note that these can't be used on Windows CE prior to version 4.0, as they require runtime library support that isn't available on CE 3.0 and below.
If you want to use DECLARE_DYNCREATE or DECLARE_SERIAL in a derived class, you must use at least DECLARE_DYNAMIC in your base class (otherwise your code will not compile). DECLARE_DYNCREATE enables dynamic creation of objects by MFC: this is required by the document/view framework for creation of document and view objects. DECLARE_SERIAL provides a default implementation of an operator << and operator >> for your class - this is used for object serialisation to a CArchive .
See the documentation topic CObject Class: Deriving a Class from CObject[^] for more information on these macros.
Item 2:
The operator keyword introduces a method that replaces the operator symbol mentioned: i.e. operator= replaces the normal behaviour of the = operator. If operator= is written as a member function, it will be used if the left-hand side of the assignment expression is of the type the operator= is a member of, and the right-hand side is of the type mentioned in the argument. Assuming that this operator= is defined in CStudent , this operator= will be used whenever one CStudent object is assigned to another.
The use of const here indicates that the return value of operator= cannot be modified by the caller, in the same way that the const on the argument indicates that s cannot be modified within the function.
Style note: In accordance with the guidance of 'do as the int s do', operator= should return a CStudent& , not a const CStudent& . See Effective C++[^] for more guidelines on implementing operator= .
Item 3:
operator== has much the same meaning as in #2, but this time we're replacing the == equality operator. We're comparing this against s .
The const at the end of the declaration says something different. It tells the compiler that this function may be called on CStudent objects that are const , i.e. they're read-only. Functions declared const may not modify member variables, unless they're declared mutable .
|
|
|
|
|
|
Without using settimer is there any way we can do simulate
MOUSEDOWN event? Seems like my client doesn't agree with me
go with it. So I have to come up with another idea.
Thank you for your help
|
|
|
|
|
HI,
I HAVE A COM DLL DTSPKG.DLL WITH ME.I WANT TO USE ITS INTERFACE ,I ABSOLUTELY HAVE NO IDEA ,HOW TO DO IT.I NEED HELP...
THANKS AND REGARDS.
|
|
|
|
|
you can view the contents of the dll in the OLE/COM Object Viewer
the dll that you need will probably be in the type librarys part
you can the open up the dll by double clicking on it, copy whats in there to the clipboard
back in visual studio create a new idl file, paste in the contents
of the clipboard, save the file. add this to your project and compile
this will then generate the headers (.h) you need to call your dll
hope this helps
si
|
|
|
|
|
please help
i use CRichEditCtrl with CFormView to open RTF file(have picture)
but found problems
1. it can show only text ,not image
2. i want to show as wordwrap
who can solve these problem ...thank you
|
|
|
|
|
Hi,
Given a list of pathnames, I need to identify which ones reside on the same physical disk (local or remote).
Parsing the pathname for <drive letter="">:\ is insufficient since there may be network mounted disks, symbolic links etc.
Are there any convenient solutions for this?
Many thanks...
|
|
|
|
|
Have a look at the Shell API functions PathIsUNCServerShare(), PathIsUNCServer(), PathIsUNC(). If it isn't a UNC use GetFullPathName() and then compare the drives. If it is the get the UNC and sharename and compare those.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
I'm a bit confused on the difference between MFC, C# and Visual Basic. I started to study MFC, but it seems that many programmers are migrating into C#. I'm thinking I should abandon MFC and pursue C# instead. I am using VC++ and am asking these questions from the perspective of an VC++ user.
Do you program C# using Visual C++ or is there a different program? If so, what is it?
Is C# similar to MFC?
How does Visual Basic relate to C# for creating desktop applications?
Are both MFC and C# based on the Windows API?
Is C# based upon MFC?
Can you just program using C++ and the Windows API? I believe the answer to this is yes. If so, is this what a lot of programmers do? I just bought Charles Petzold's book on Window's Programming 5th edition. It's very interesting. He appears to be creating everything from scratch using the Windows API. SO I'm thinking that MFC, C# and Visual Basic are simply Microsoft's attempt to simplify programming with the Windows API by creating a higher level language(but at the expense of programming ability and power). Is this true or am I thinking wrong on this?
Thanks, Dave
I sure would appreciate any information as I'm trying to decide which direction to go here in my studies.
Thanks,Dave
"The man who reads nothing is better educated than the man who reads nothing but newspapers."- Thomas Jefferson
|
|
|
|
|
C# is a new language that looks a bit like C++ and a bit like Java, but it is distinct from both. It is designed to work with the .NET Framework, which is (from the 1000-mile perspective) a virtual machine - it doesn't compile to native code in this environment.
You can currently compile programs written in C# either with the .NET Framework SDK[^] (I would have provided a direct link but MS' Downloads page is down at the moment...) or with Visual Studio .NET[^].
C# is just a language; to provide windowing, the .NET Framework provides the Windows Forms environment (the System.Windows.Forms namespace). This is much like VB 6.0 in that it's designed for form-based applications more than document/view applications. However, document/view isn't completely impossible in C#...
If you need to write a document-based application, I'd stick to MFC for the moment. Forms are easier in VB 6/Windows Forms; document-based applications are easier in MFC, IMO.
If you find that you need access to the Win32 SDK directly, you can always call it from C++, whatever framework you use for writing your application. MFC is an open framework in this regard. In C# you can use the [DllImport] attribute to use a facility called Platform Invoke (or P/Invoke for short) to escape the managed environment.
|
|
|
|
|
|
Thanks Mike
"The man who reads nothing is better educated than the man who reads nothing but newspapers."- Thomas Jefferson
|
|
|
|
|
Hello,
I program using VC++ and MFC.
C# is a language that combines C++ and Java. ( I might be wrong, but the syntax looks similar to the syntax of Java ). The goal of C# is to make programming a lot easier, but you have to pay the price that the performance is not completely in you hands among other things!
The windows api is written in C and other low languages I believe (this is just a guess!) but I know one thing for sure. MFC wraps these api's. The reason is to honor the OOP concept. C++ is a OOP language so why should anyone use api's. There are several reasons you should find yourself.
The power you have with C/C++ is not lost with MFC, it's more secure. You can do anything that was legal in pure C! If you want to do some crazy things, just work around the MFC or rewrite some of the core functions...
I don't know anything about VB...
Wich direcion you should go depends on what you want. If you are a control freak like myself you should study MFC and C++ (then again I don't know anything about VB). If you are lazy and prefer fast development study C#. If you want a bit of everything, study a bit of everything .
I hope this information helps. Good luck...
|
|
|
|
|
Thanks Bob...every bit of advice helps.
"The man who reads nothing is better educated than the man who reads nothing but newspapers."- Thomas Jefferson
|
|
|
|
|
I assume you are talking about the file view of your project?? If you look on the disk there is no folder created.
John
|
|
|
|
|
Yes, in the file view. What disk are you referring to? Do you mean on the CD? Even if I create a program from scratch, I still get the "External Dependencies" folder. I was just curious what it was, I see from Andrew's post that it's for defining different size vaiables. I'm not sure why that happens...I thought everything was defined in the program...hmmm.
Thanks
"The man who reads nothing is better educated than the man who reads nothing but newspapers."- Thomas Jefferson
|
|
|
|
|
DaveE9th wrote:
What disk are you referring to?
The disk drive where your project is located. The "External Dependencies" folder is harmless and gives you a list of the files that are included in your project by other include files and not in a .cpp file.
John
|
|
|
|