|
If you're using MFC, you may take a look at CString::Left() and CString::Right(), which are identical to VB counterparts (also CString::Mid()).
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
Hello,
Does anyone know of a good example/code that will dock a dialog-based app to the edge of the desktop? Any leads/help is greatly appreciated.
Bret Faller
Odyssey Computing, Inc.
|
|
|
|
|
I have the following code wich is out in msdos promt.
printf("lastname = %s\n",lastname);
I need to do the same output only in a file. How do I do this? Thanks
|
|
|
|
|
Use fprintf() instead of printf(). Also see fopen() and fclose().
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Could you give me more details on this. I am not really familiar with C++. I have two lines to be output in a file. How do I do this?
|
|
|
|
|
Could you give me more details on this. I am not really familiar with C++. I have two lines to be output in a file. How do I do this?
|
|
|
|
|
It's C, not C++.
You should read about file I/O in any elementary book on C (or C++). It seems like you're trying to get someone to do your assignment for you.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi, I have a CFrameWnd derived class that works fine using its default view however I need it to use a different view entirely. I am not using a Doc/View architecture so this is the first time I have attempted to set a frames active view by hand and I am haveing many problems, a few questions:
Exactly where in a CFrameWnd derived classes construction process do I create a new view and attach it to the frame, if possible I do not want the default CView to be hanging around if possible.
How exactly do I create a CView derived class, for example this asserts in my attempts:
view->Create(NULL,NULL,WS_VISIBLE | WS_CHILD,rect,NULL,0);
It asserts due to the WS_CHILD part.
This code (with the CView * cast to a CWnd * to illiminate the WS_CHILD assert) works up until the CFrameWnd::SetActiveView where an assert is thrown due to having WS_CHILD window set.
wnd->Create(NULL, NULL, AFX_WS_DEFAULT_VIEW | WS_CHILD,
CRect(0,0,0,0), this, 0, &context);
in this code the context structure is set to contain the runtime class of the view, and NULL for the document part and the CFrameWnd for the frame part.
Has anyone any idea how to create/add a new view to a CFrameWnd without using docview (and even without using CRuntimeClass's)
Thanks
|
|
|
|
|
hi
how to draw a graph by taking x-axis as "time" and y-axis as "pressure".These value are to be take from database/file.
And how to represent the peak value of the graph and peak duration.
please help me
thank you
anjaneya raju datla
|
|
|
|
|
http://www.codeproject.com/miscctrl/index.asp#Charting%20Controls
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
How can I add a help file in the Tools menu ? Thanks
|
|
|
|
|
Why creating a brush doesn't accept high colors (only pure 16 colors)?
This will create a red brush:
m_rcBackColor=RGB(255,0,0);
Cbrush br(m_rcBackColor); or br.CreateSolidBrush(m_rcBackColor);
But this will create a gray brush:
m_rcBackColor=RGB(254,0,0);
Cbrush br(m_rcBackColor);
A high color is changed to the closest pure color.
I'm trying to put some text (as Static Control) on the main window and I want the text to have the same background as the window. If window has a pure color like white, or gray, or red, there's no problem. But if my window has a background set to, let's say, RGB(255,0,100), the text is displayed in gray background.
Static control uses, by default, color of Dialog's background.
Any ideas?
Jerzy.
|
|
|
|
|
I to all.
Does anyone have a fully functionaly sample on using NetMessgaeBufferSend API call from MFC.
I've tryed more samples but no one give me the success of sending a little message over the LAN.
Thanks.
|
|
|
|
|
Hi,
Try this sample:
http://www.mvps.org/win32/network/nmbs.html
Also, you need some user rights (which I don't know) and some services running to send the message successfully.
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
|
I've tryied your code , but I constantly get an error message like : "ERROR 2273: The user name could not be found or is not logged in.".
I've searched for messanger services and it's started, I've found on some articles that by default all user have rights to send messagges across LAN.
Some other ideas?
Thanks a lot.
Massimo
|
|
|
|
|
Try the sample with:
nmbs.exe \\homer homer paolo "ciao"
Where homer is my computer name, paolo is the sender name (which doesn't need to be a registered message alias) and "ciao" is the message text (quotes are required).
The computer name should be always registered by the system, but I'm not sure. I have no LAN at home, so my user name is not registered, but the computer one is (I just tried).
Hope this helps,
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
Check this out. The NetLib will allow you to marshal an arbitrary C++ object via sockets. A OO way of network communicating so to speak
http://www.codeproject.com/useritems/peer_to_peer_communicator.asp
Happy coding to you,
Marat
|
|
|
|
|
|
Another way to send messages to the Messenger service on NT/2000, or to Winpopup on 9x is using the "messngr " mailslot.
Use CreateFile() with this filename:
\\server-name\mailslot\messngr
Where server-name is "." for local system or a computer name (NetBIOS) in the LAN.
Use WriteFile() to send the message, according to the following format:
from-name\0to-name\0message-text\0\0
You can write what you want in the "from-name" and "to-name" fields, message is delivered to the logged-on user.
The length of the buffer you write to the mailslot must be exact, and must include the 2 trailing zeroes.
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
Hi
I installed MSXML3 parser in replace mode.
When I use ADO26 streams to execute SQL XML I have an error.
ADO26 can't initialize {5D531CB2-E6Ed-11D2-B252-00C04F681B71} object. This is object from msxml2.dll.
What command language dialect (GUID) I have to use with ADO26 and msxml3.dll ?
Thx 4 hlp
|
|
|
|
|
Is there anyone who knows the inner workings of CSplitterWnd cause there are lots of stuff I don't get with the implementaion of the splitter...
|
|
|
|
|
If you're unable to find sufficient docs online, check out the book MFC Internals which covers CSplitterWnd and just about everything else in MFC in great detail.
--Mike--
http://home.inreach.com/mdunn/
A recent survey reports that 1/4 of all internet users in England surf for porn.
The other 3/4 just didn't want to admit it.
|
|
|
|
|
Hi all,
I think I've found a bug in CSplitterWnd which I don't know of how to resolve:
Clicking (NOT moving) on a splitter bar that splits a window in two columns where the left column is a nested splitter window, makes the clicked bar jump ?!?!?! a few pixels to the right!!!
Any one knows why?!? I've prepared a sample project for you to have a look at! Just mail me and I'll send you the code.
Any help would mean a lot!
/Tommy
|
|
|
|
|
Pls help me
HOw can I attach teh new accelerator key to the new menu?
|
|
|
|