|
Hi All,
How will get all the machine name which are corrently connected in a network?
Sangeetha
|
|
|
|
|
Hi!
How can I create a tab control like the ones used in VC++, Office, Homesite etc. for switching documents. It's upside-down and the selected one is generally in white.
Thanks
/ mike
|
|
|
|
|
|
Thanks! How could I've missed that one?
/ mike
|
|
|
|
|
Hi All,
Is there any way to change the background color of a TextBox and the text Color?
Thanks in Advance.
Sangeetha
|
|
|
|
|
|
You can also check http://www.codeproject.com/editctrl/enhfocusedit.asp. Not meant to be a self-plug, but I really do not see the need for (1) a potential dynamic memory allocation whenever a paint cycle happens, or (2) the need to draw the text yourself...
You can just handle the correct messages, and let Windows do all of the work for you. Functions of interest in the code are CFocusEditCtrl::CtlColor(...) and CFocusEditCtrl::OnEraseBkgnd(...). The code also handles Disabled and Read-Only edit controls.
-=- James.
|
|
|
|
|
Season greetings to all .
In my MFC-app I have a logon-dialog that presents the user with a list-box to select between (hardcoded) odbc-connections.
My question is: Is there a way to list the defined obdc-connections in this list-box instead of whichever is hard-coded?
HarryS - Norway
|
|
|
|
|
use SQLDataSources and SQLDrivers to enumerate data sources and odbc drivers via code
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
How would I get the list of offline and online users into list boxes in my program if I wanted to make an MSN messanger client with more features than what MSN has at the moment?
Are there any resources people can tell me about using the MSN commands like Block Sender, etc etc??
Thanks
Ashman
www.settlers.net
|
|
|
|
|
does anybody know where i can download the MFC help file. In .hlp or html format.
|
|
|
|
|
When you BUY visual studio, it comes with it.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
How do I tell at runtime if am in an sdi/mdi or dlg app?
i.e are there some #defines I can use.
If so - what are they?
-cheb
|
|
|
|
|
I wonder why you thought it was an easy question
Anyway first do this
AfxGetMainWnd
to get a pointer to the main window
now call this function on the CWnd* returned
GetRuntimeClass
you'll get the class name using the m_lpszClassName member
now use IsDerivedFrom and pass the CRuntimeClass* for CDialog, CFrameWnd and CMDIFrameWnd till one of them matches
got it?
Nish
p.s. I haven't tried it out yet, so there might be somethin I missed...
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Sounds good.
I thought it would be easy as I assumed that there would be #defines buried in MFC some where for sure.
I just did not know where.
Anyway, thanks this is a good robust solution.
-cheb
|
|
|
|
|
I don't know if there are any #defines, but you might try:
AfxGetMainWnd()->IsKindOf( RUNTIME_CLASS(CDialog) );
AfxGetMainWnd()->IsKindOf( RUNTIME_CLASS(CFrameWnd) );
AfxGetMainWnd()->IsKindOf( RUNTIME_CLASS(CMDIFrameWnd) );
I haven't, though, given this a try, so I can't guarantee it will work.
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
Hello!!
I am building a TAPI application in which there is one server and many clients.i.e. N client machines would be connecting and communicating with 1 server machine. Once the connection is established, server would be accepting the data sent by the clients and then the same data would be again sent back to the same client who sent it to the server, through modem. The application should have the capability to do data transmission and receive simulnateously with n-clients.
The application is supposed to run on Win 98,WinNT, WIN 2000 and Win XP. I am using C programming and TAPI 2.0. I do not want to use COM/DCOM. Can you please tell me if it is possible to build an application of n-clients and 1 server using language C, TAPI 2.0 and without COM/DCOM.
I already have built an application for data communication between single client and single server.
Data transmission is done through the COM port to which the modem is connected.
Can anyone please help and advise as to how I could go on to build a n-client 1 server TAPI application.
Any help would be higly appreciated.
Thanks
Sandeep
|
|
|
|
|
Hi,
Sorry, i don't have an answer for ur problem. Actually i wanted ur help. i'm trying to create an application with TAPI to send data between a single client and a single server. Can u guide me through that. I'm new to this TAPI programming , so can u pls list me the various TAPI functions which can be used.
Pls help.
vini
|
|
|
|
|
I am trying to do this:
...
CString strMsg;
...
char *pBuffer = new char[nLen+1];
...
strcpy(pBuffer,(const char*)strMsg);
...
I get error C2440: 'type cast' : cannot conver from 'class CString' to 'const char *'.....
How do I get this to work?
Thanks
-Matt Newman
-Politically Correct Sensoring Service
-We make sure you don't f*** up in public
-Sonork ID: 100.11179:BestSnowman
|
|
|
|
|
If you're using UNICODE, then why not use a TCHAR instead of a char?
CString strMsg = _T("Test me");
TCHAR *pBuffer = new TCHAR[100];
_tcscpy(pBuffer, (LPCTSTR) strMsg);
cout << pBuffer << endl;
HTH,
Jon Sagara
"There are lies, damned lies and statistics."
-- Mark Twain.
|
|
|
|
|
This Worked. Thanks for the help.
- Matt Newman
-Sonork ID: 100.11179:BestSnowman
|
|
|
|
|
try using wcscpy [the wide version of strcpy]
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
I assume you're doing this in a Unicode build? CString holds TCHARs, so in your case it's got WCHARs (wide characters, a.k.a. Unicode chars), and CString has no facility for converting between character sets.
Use one of ATL's conversion macros:
USES_CONVERSION;
strcpy ( pBuffer, T2CA((LPCTSTR) strMsg) ); T2CA() converts from a TCHAR string (Unicode string in Unicode builds) to a const ANSI string.
--Mike--
My really out-of-date homepage
"Not our fault we are intellectually superior to the rest of the office." -- Paul Watson in the Lounge, 12/12/2001
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
Hey, I was looking at all the sample programs on this site and even downloaded a few. When I try looking at them in my C++ program all the folders appear on the right hand side of the screen with nothing on the left side. There is no DSW or DSP files in these samples. Is there anything that I can do to try these programs?
|
|
|
|
|
If the zip contains only cpp and h files you prolly downloaded some CPP class source. Just add the cpp and h files to your existing project. The article would explain how to use the class.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|