|
Have a look at MFC samples CHATTER and CHATSRV here[^] to learn the basics.
Hope this helps
--
Roger
It's supposed to be hard, otherwise anybody could do it!
|
|
|
|
|
|
Hi KrishnaKumar,
What are you really searching for? Socket communication in MFC?
- NS -
|
|
|
|
|
Can anyone give me an idea as how you create an MFC ActiveX control using the "MFC ActiveX ControlWizard". Can you provide me some code snippet for creating a very simple ActiveX control and in turn using it in other application(like Internet Explorer etc etc).
|
|
|
|
|
|
First get yourself an idea of what ActiveX controls are and how they work by browsing MSDN here[^].
Or have a look in the article section at CodeProject here[^].
Then you may be able to ask more specific questions.
Getting a piece of code won't do you any good if you don't know what to do with it.
Also, since ActiveX controls are COM objects, you should post further questions regarding this in the COM forum here[^].
--
Roger
It's supposed to be hard, otherwise anybody could do it!
|
|
|
|
|
|
Hi all,
i am writing a simulation for traffic systems.I want to know which view(cview,form view etc..,)is better suited for such type of application.
Thank u all.
HEllo
|
|
|
|
|
It depends on how you want your GUI to look and function.
How do you want your GUI to look and what functionality do you want in it?
I suspect I would create a dialog-based application, or perhaps use CFormView in a SDI application if I want doc/view support.
--
Roger
It's supposed to be hard, otherwise anybody could do it!
|
|
|
|
|
Hi,
I think dialog based application is better, because you can visually place the components ( controls ) directly to the main window.
- NS -
|
|
|
|
|
But how to create lines using drag and drop controls.
HEllo
|
|
|
|
|
You can do the same thing with CFormView .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi all,
I'd like to have my toolbar, should be movable only inside the main window, like MDI child window. But even in Visual Studio, it is possible to move the toolbar outside the main window. How can make it possible?
Thanks in advance,
Sarvan AL
|
|
|
|
|
toolbar is a popup window, which can be moved anywhere by default.
i think u can check toolbar's position in its WM_MOVE message to see if it is inside main window.
if not, u can move it to right place by MoveWindow() function.
A special image tool for C++ programmers, don't miss it!
The world unique Software Label Maker is here for you and me ...
A nice hyper tool for optimizing your MS html-help contents.
-- modified at 6:30 Friday 7th April, 2006
|
|
|
|
|
Thanks includeh10,
Let me look into the alternatives.
Sarvan AL
|
|
|
|
|
You can use WM_MOVING instead of WM_MOVE. In that you can limit the movability.
- NS -
|
|
|
|
|
I have created a dialog based application using multiple dialogs, i am having a problem while focussing. how do i change the focus to current dialog ?
Code fragment :
"CCSocketcliDlg *dlg=(CCSocketcliDlg*) AfxGetApp()->GetMainWnd();"
Bharath Kumar V V
|
|
|
|
|
SetForegroundWindow or BringWindowToTop .
Nibu thomas
Software Developer
|
|
|
|
|
vvbkumar wrote: how do i change the focus to current dialog ?
What is the current dialog exactly ? And are you using modal or modeless dialogs (do you call DoModal) ? If you are using modal dialogs, then you cannot switch the focus between dialogs, you have to look for modeless dialogs instead.
|
|
|
|
|
How to write and read an object of user defined class say ABC into file.
|
|
|
|
|
Depends what you are using. Are you using the MFC's ? If yes you can look at serialization. And please, be more specific when you ask a question.
|
|
|
|
|
Hi anilksingh,
I used to write objects of my class, in the C way, using "fwrite". Here is the code snippet:
Regards,
Sarvan AL
class Student<br />
{<br />
int regno;<br />
char name[30] ;<br />
public:<br />
Student() <br />
{ <br />
regno = 0; <br />
strcpy(name, "NULL") ;<br />
} <br />
Student(int rno, char *tname)<br />
{<br />
regno = rno ;<br />
strcpy(name, tname) ;<br />
}<br />
void Display()<br />
{<br />
cout<<"Regno: " << rno << endl ;<br />
cout<<"Name: " << name << endl ;<br />
}<br />
} ;<br />
<br />
main()<br />
{<br />
FILE *fp = fopen("Test.dat", "wb") ;<br />
Student s1(1, "Robert"), s2(2, "Smith") ;<br />
<br />
fwrite(&s1, sizeof(Student), 1, fp) ;<br />
fwrite(&s2, sizeof(Student), 1, fp) ;<br />
<br />
fclose(fp) ;<br />
<br />
Student t ;<br />
<br />
fp = fopen("Test.dat", "rb") ;<br />
<br />
fread(&t, sizeof(Student), 1, fp) ;<br />
t.Dispaly() ;<br />
<br />
fread(&t, sizeof(Student), 1, fp) ;<br />
t.Dispaly() ;<br />
<br />
fclose(fp) ;<br />
<br />
}
|
|
|
|
|
How to write and read an object of user defined class say ABC into file.
|
|
|
|
|
why do you ask this on many forums ?
do you want to serialize your objects in Managed C++ or unManaged C++ way ?!
|
|
|
|
|
Dear all,
I trid to use SetWindowLong to replace the original Window Process.
But my custom wndProc can not recive the all CM_ begining message.
why? andbody could give me a hand?
thank you very much.
Bill Lin
|
|
|
|