|
sdhtyjnniutnbjnhbghb wrote: What fuctions could I program for the target??
What's "the target?"
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi all
i made my project in mfc's dialog based and back end is mysql
now project works good
but my problem is that i want to change this dialog based project in to single document interface(SDI) but i dont know how to convert it .
plz tell me procedure and plz as i dont know much about SDI
so plz solve my problem
Ashish Dogra
MCA
Noida
|
|
|
|
|
Use CFormView as the view in SDI App.
I think you can import the resource into your application by opening the RC file (Specify open type resource).
Copy the dilog and other controls you need to the SDI application
you may have to work on the dialog class to show it in the CFormView.
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
i am sorry sir as i cannot understand plz tell me in detail so that i can pick easily
plz......
Ashish Dogra
MCA
Noida
|
|
|
|
|
There is no 'real' procedure. What you have to do is start a new project and copy paste the code you want to reuse. Of course, this depends a lot of your project.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
when I convert my project from VC6 to VC.NET2005,I met a compile error named Error 1 error C2668: 'fabs' : ambiguous call to overloaded function the corresponding code as follow
if ( fabs(_C[0] < SVarSet::PT_COINCIDE)&& fabs(_C[0])<0.0001*fabs(_C[4]))
where _C is a function parameter whose type is real64 *_C
I find the reason in MSDN but I can't correct it,who can tell me the answer,many thanks
|
|
|
|
|
|
Maybe instead of
fabs(_C[0] < SVarSet::PT_COINCIDE)
you should have
fabs(_C[0]) < SVarSet::PT_COINCIDE
Otherwise the compiler cannot choose between fabs(float) and fabs(double) having a parameter of boolean type.
|
|
|
|
|
Hi,
Please let me know if this is ok to shutdown(or break) the loop...
//this is in server side, server listening for new connections
while(1)
{
start:
clnt_sokt = accept(m_sokt,..)
if(clnt_sckt == INVALID_SOCKET)
{
if(WSAGetLastError() == WSAEINTR)
break;
else
goto start;
}
}
void StopServer()
{
closesocket(m_sokt)
}
Call StopServer() would close the server listening to socket
Thanks
Rove
|
|
|
|
|
If you do the same, the established connection with client will reset.
I read somewhere that using goto: is not a good practice.
There are alot of sample code regarding creating simple server with multiple clients. Google for it
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
Below i'm trying to give my code structure, so that it can understandable
I've a class named "Chi",
i've taken a ptrvariable to that class(hi), say tp;
tr, is simple class variable( of "hi")
now i've a structure called "hi"...
i've a list to store the all structure variable....
now i want to store the tr(variable of Chi) in that list, nd then it gives me the error...[Can't convert struct hi to Chi*]
my code in brief::
class Chi:public someclass
{......
......}// this is the cpp file
in .h file i declare a variable of class Chi,
and i have struct hi
{.......
........}
it' ll very plesure to me, if ny body let me know the exact way to store in this way........
ok...Good day to all off u.........
kamalesh
|
|
|
|
|
kamalesh82 wrote: I've a class named "Chi",
i've taken a ptrvariable to that class(hi), say tp;
tr, is simple class variable( of "hi")
This is not clear at all: it is really confusing what you are trying to explain: Chi, hi, tp, tr, "hi", ...
Put some code (with a short description if required) and a precise question.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
I couldn't make head or tail out of it either.
Steve
|
|
|
|
|
You have to understand the sense behind converting data.
For instance:
class A : public B
{
}
class C //or struct
{
}
You can:
A *p = new A;
B *p1 = (B*) p; //because A inherits B !!!
you cant
B *p2 = (B*) new C;///Bullshit C isnt a B (or A)
because C is NOT a B.
You can store any data type in a void*, but you have to cast it with a legal cast to a object.
I guess you a learning working with pointers?
Greeting from Germany
|
|
|
|
|
hai anyone help me
i have one dialog i want to use maxmize or minimize that dialog
plz send that code in VC++
prem
|
|
|
|
|
right click on the dialog
take properties menu->Style.
U can find two check box "Maximize box" and "Minimize box". check both
nave
|
|
|
|
|
use SW_MAXIMIZE SW_MINIMIZE withShowWindow();
whitesky
|
|
|
|
|
hi..
can somebody plz send me a VC++ code to transfer a file or data on LAN without using MFC class(it has to be without MFC plz)...it has to be in Winsock API....plz quickily before 30th june or 1st july....
if u can send it to maddy_manit@yahoo.co.in
plz help me...
Madhur
|
|
|
|
|
Check this.[^]. This is using windows sock function for file transfer.
writing a simple client or server is easy. you will get loads of code if you google for it.
Some sample source files
http://www.cs.rpi.edu/courses/sysprog/sockets/client.c[^]
http://www.cs.rpi.edu/courses/sysprog/sockets/server.c[^]
madhurgupta wrote: plz quickily before 30th june or 1st july....
if u can send it to maddy_manit@yahoo.co.in
Shall I point out one thing? Don't send a message on excitment. Sometimes it may feel bad to others. Here people are not answering as part of any contest. It would be nice if you specifically say what do you are bugging with or seeking for rather than what your feeling and urgency. Hope you will take it in its sense
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
Hi all,
i need to execute code on the primary form
(the one the project start with, CalphaDlg in my case) from another
modal form.
I try with
CalphaDlg::OnBnClickedButton2();
including "alphsDlg.h" of course,
but i get the error
error C2352: "CalphaDlg::OnBnClickedButton2": not valid call to non static member function
What should i do ?
TIA,
Desmo16.
|
|
|
|
|
In the second dialog create a pointer to the CalphaDlg as member variable
CalphaDlg *m_pCalphaDlg;
now from the first dialog set this member variable
Now if u want to cal any function of the main dialog, use this pointer and call.
m_pCalphaDlg->OnBnClickedButton2();
nave
|
|
|
|
|
Sorry i made the first and the 3rd step but i don't understand the meaning of
"now from the first dialog set this member variable"
What should i do exactly ?
|
|
|
|
|
i hope u will be calling the DoMAodal of the second dialog from the first dialog. if so do like this
let m_SecDlg be the second Dialog then
m_SecDlg.m_pCalphaDlg = this; // this is what i mean
m_SecDlg.DoModal()
nave
|
|
|
|
|
Yes I understood that later.
Now it's ok.
Thanx.
|
|
|
|
|
Hi all ,
I created a dialog based application in MFC and added one menu item (ID_MENUTEST_MENU1 )
after hitting on that menu only ON_UPDATE_COMMAND_UI andON_COMMAND gets called .
i want to know the use of ON_COMMAND_EX and when it gets called?
CODE:
ON_COMMAND(ID_MENUTEST_MENU1 ,OnCommand1)
ON_COMMAND_EX(ID_MENUTEST_MENU1 ,OnCommandEx1)
ON_UPDATE_COMMAND_UI(ID_MENUTEST_MENU1 ,OnCommandUI1)
void CDataExchangeDlg::OnCommand1()
{
AfxMessageBox("Oncommand1");
}
BOOL CDataExchangeDlg::OnCommandEx1(UINT nID)
{
AfxMessageBox("OnCommandEx1");
return true;
}
void CDataExchangeDlg::OnCommandUI1(CCmdUI* pCmdUI)
{
AfxMessageBox("OnCommandUI1");
}
|
|
|
|