|
hi every body !!
got a little problem
i'm doing a chat view. So what do i have to get in .
2 parts : one for reading and the other one for writng!
So that does mean if you do this with splitter window you need Row
ok
now the problem
i split my window with the 2 views (edit and edit or richedit)
i lock the split bar so that the user will not be move it nut my problem is that
:
1/ when you split and define 2 row you can just specifie the size of the first row.and this first row must be on the top the second on the bottom.
2/ that's not what i need because i would like to fix the bottom side or the second row which is the window where you can write.
in another word the size of the window in which the user will write must be fixed.
the problem is that this window is unfortunatly the second when you split your window .Indded this window is at the bottom
i would like to know a method to do this :
what i konw : split put the view and lock the bar
what i would like to know :
a°) specifie size of the second window (which on the second
row) which is the window where the user can write his text.
b°) for the first row where text will be display, which is on the top i don't care about his size.It can move
c°) what i want is to lock my split bar relativly to the bottom
having a fixed size for the bottom row
just that
if you don't anderstand ask me picture
or more question or code
this is what i try to do :
my idear was to reverse the coordinate so that the first row would be created on the bottom and fix and the second row on the top level widow but it doesn't work !!
i did this
BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
/*if (!m_wndSplitter.CreateStatic(this,1,2) ||
!m_wndSplitter.CreateView
(0,0,RUNTIME_CLASS(Csearck),CSize(128,0),pContext)
||!m_wndSplitter.CreateView
(0,1,RUNTIME_CLASS(CScearchList),CSize(0,0),pConte
xt))
return FALSE;
m_wndSplitter.Locked(TRUE);*/
m_wndSplitter.CreateStatic(this,2,1);
CClientDC dc (&m_wndSplitter);
CRect rect;
m_wndSplitter.GetClientRect(&rect);
dc.SetViewportOrg(rect.Width(),rect.Height());
m_wndSplitter. CreateView(0,0,RUNTIME_CLASS(CEditView),CSize(0,12
8),pContext);
m_wndSplitter. CreateView(1,0,RUNTIME_CLASS(CScearchList),CSize(0
,0),pContext);
m_wndSplitter.Locked(TRUE);
return TRUE;
}
if you think that you can't , that means that you can : if you understand this there youn can
|
|
|
|
|
Hi,
I use PreSubclassWindow() to test font size in my edit control.
When I destroy my edit control and recreate it.... PreSubclassWindow() is called again but has no valid font set, eeks! The line CFont* pFont = GetFont() return a CFont with pFont->m_hObject == 1 , strange. Filling a LOGFONT structure fails.
Can anyone explain what happens & what can I do against?
Thx, Moak
PS: I think I used PreSubclassWindow() because OnCreate() is not called from dialogs (but I'm not sure on this).
|
|
|
|
|
I'm using a workaround: getting window's font once + catching changes.
|
|
|
|
|
I have "men.x"(<--this word) in Listbox when I double click at "men.x" , the 3D model is loaded to show in frame suddenly so... "men.x"'s type is CString. How can I convert CString to LPSTR? because I have to use D3DLoadMeshFromX(LPSTR pfilename,....)to call file.x
So .... How can I do????
Bug
|
|
|
|
|
Maybe (LPSTR)((LPCSTR)strFilename) works or make a strcpy to a char,
Gero
|
|
|
|
|
Converting CString to LPSTR is easy:
CString csString;
LPSTR lpString;
lpString = csString.LockBuffer();
csString.UnlockBuffer();
-Dominik
|
|
|
|
|
Try this:
CString csString;
LPSTR lpString;
lpString=(LPSTR) csString.GetBuffer(0);
I hope, this will work!
A. Riazi
|
|
|
|
|
How do I control remote program over the network with Visual C++. I mean, for example, I want to move a button from that program to a new location or lock the program or what ever. Thank you very much in deep for your interest...
P.S. Please tell me a correct site if my problem is not related to this site. Thanks...
Phalanx
|
|
|
|
|
Do you know Client/Server architecture? Do you familier with programming sockets?
if so, use CSocket derived class to send data/information from one computer to another. Also its possible to use Named Pipe.
A. Riazi
|
|
|
|
|
How do I control remote program over the network with Visual C++. I mean, for example, I want to move a button from that program to a new location or lock the program or what ever. Thank you very much in deep for your interest...
P.S. Please tell me a correct site if my problem is not related to this site. Thanks...
Phalanx
|
|
|
|
|
|
I have my website located on a remote server, and there is a MDB database on the server. The Server is Win 2000 Advanced Server. I want to make such a software in VC++ that can import data from the remote database and show the filtered records to the client.
Can this thing be made in VC++, if yes then please help me how to make this thing.
Regards
|
|
|
|
|
Are you familier with Client/Server programming? Do you know how programming with sockets?
A. Riazi
|
|
|
|
|
Ya I am familier with Socket Programming.
But the socket can only send and receive message among themselves. How will the socket get the database records to send to the client socket. How will the server socket connect itself to the database.
|
|
|
|
|
Server does not connect to database. Your client must drive and work with your database. Client gets commands from server and returns data (results).
Then server shows data (Database records) in such a list control.
A. Riazi
|
|
|
|
|
OK, Thanks for your reply. Then please tell me how to connect the client socket to the server datbase. Usually we use ODBC or ADO to connect to the database on the PC we give the DSN or direct address of file and connect to it, but how will we connect to the database that is located on the web server. Indeed I can make a DSN pointing to my database on the web server
Regards
|
|
|
|
|
I am trying to create a Windows Service tonight that can be called via ASP and ASP.NET, as a way to store session state between them. Getting the service going in .NET with C++ is proving a nightmare, I create a skeleton and it won't compile, there is no meaningful help, etc.
Can anyone help me ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
It'd probably be fairly easy to make a bot that'd post random stupid VB questions, and nobody would probably ever notice - benjymous - 21-Jan-2003
|
|
|
|
|
Do you want a service in managed c++?
If you just need a service, I have a small skeleton I have used for several services, and I have also compiled it as managed C++...
Do you want a copy?
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I'd love a copy, so long as it's callable from classic ASP via COM. I don't need managed C++, the standard C++ one would be better.
Thanks heaps.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
It'd probably be fairly easy to make a bot that'd post random stupid VB questions, and nobody would probably ever notice - benjymous - 21-Jan-2003
|
|
|
|
|
Christian Graus wrote:
so long as it's callable from classic ASP via COM
Woops, I did not think about that, it's not callable via COM
Why don't you make a new ATL Project, then you can select "service" from the wizard.
That's the easiest way to get a service that you can call via COM
Right now my service skeleton only works with Named Pipes as communication to the "outside world", but if you are interested, just ley me know, and I'll send you a copy tomorrow...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Anders Molin wrote:
Why don't you make a new ATL Project, then you can select "service" from the wizard.
That's the easiest way to get a service that you can call via COM
Yeah, but the resultant service does not compile and it seems most of the help on creating C++ services has been removed to make room for the exciting news that I can do it in VB.NET.
Thanks all the same.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
It'd probably be fairly easy to make a bot that'd post random stupid VB questions, and nobody would probably ever notice - benjymous - 21-Jan-2003
|
|
|
|
|
Hi everyone.
I am working on a small program for school project. Apparently the teacher does not want to help so I decided to look for a help on the message board.
I need to write a function that takes seven digits input by user
ex. 123454 store them in the array and after that do some mathematical operations on them such as add, multiply.
Well, I can read them in as characters and tried to converted them into int after inputing to array but did not work.
I tried casting with the same result.
Can anyone suggest what should I do in order to read in as characters and convert them into integers. ( the whole program should resemble calculator that will add two big numbers let say 16 digits.)
Any help would be appreciated.
Here is my code.
#include <iostream>
#include <cstdlib>
#include <string>
using namespace std;
void main() {
const int ROWS = 6;
char inNum1 [ROWS];
int sum = 0;
int conValue = 0;
cout << " enter your number" ;
for ( int i=0; i <rows; i++="" )="" {
="" cin="">> inNum1[i];
}
cout << "num [0]= " << inNum1[0] << endl;
cout << "num [1]= " << inNum1[1] << endl;
cout << "num [2]= " << inNum1[2] << endl;
for ( int j = 0; j< ROWS; j++ ) {
sum += inNum1[j];
}
cout << "total sum = " << sum << endl;
}
|
|
|
|
|
Read the user's input into a std::string , which will properly null-terminate the char array so that atoi() works.
std::string sInput;
cin >> sInput;
--Mike--
Looks like I picked the wrong week to stop sniffing glue.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Thank you, I will try this tonight, the pointer looks good.
|
|
|
|
|
The old fashioned trick was to subract ASCII 0 (zero) from the character, e.g.
for ( int j = 0; j< ROWS; j++ ) {<br />
sum += inNum1[j] - '0';<br />
}
You of course need to validate the data, i.e. is it between 0 - 9
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|