|
from MSDN...
"MFC71.dll does not need to be redistributed with MFC applications if you statically linked to the MFC DLL (that is, unless you specified Use MFC in a Static Library on the General tab in the Project Settings dialog box)."
|
|
|
|
|
I'll try to be brief here because I could go on and on:
We have an existing app which keeps track of employee in/out status. It uses UDP in a client/server architecture.
We are starting to use Remote Desktop and are having some problems with this app. Originally, we kept getting the error that basically said the listen port (on the client app) was already in use. I made the change to allow reuse and that error is now gone.
Now, it seems that the first client to get the notification from the server (in the OnRecieve() call) is the only one that gets data. I have a feeling the data is removed from the socket buffer and the other apps are probably getting a recv length of 0. They may not be getting a notification at all - I need to verify this.
To be a little more clear - we are testing with multiple people logged into the Terminal Server. At the most, only one client works properly at any time.
How can I handle this?
-- modified at 15:53 Wednesday 7th June, 2006
|
|
|
|
|
i found some MDI extension classes called MDI tabbed interface or MTI. By using these classes, we can create tab in the workspace (main frame window) to navigate all the child window in this workspace.
My question is if we also have some classes which can be used to create multiple workspaces at the same MDI application and there is also a tab to navigate the workspaces. And we also can load and store workspace layout file for each workspace seperatedly.
note1: "Workspace" is another name for main frame window in MDI application, there might be several child windows in each workspace.
note2: i know there is a stock trading software call TradeStation, which has already implement this feature in its system.
thanks for all the help.
Bing
|
|
|
|
|
OK, here is what I have done.
I am looking to use a timer to complete some refresh operations every 2 seconds. However, I cannot get my OnTimer()function to be called.
I set up a timer with the following line of code:
SetTimer(1, 2000, 0);
Then, I have the Ontimer function, which I created from ClassWizard as a message handler for WM_TIMER.
That is, I have ON_WM_TIMER declared in my message map.
ON_WM_TIMER()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
Here is my handler:
void CProbeTalkMenu::OnTimer(UINT nIDEvent)
{
m_szStatus += "*";
UpdateData();
CDialog::OnTimer(nIDEvent);
}
OnTimer() is never called. I am afraid that I am failing to do something grossly important. Can anyone explain what my problem might be?
Brett Feero
|
|
|
|
|
Never mind......
UpdateData(); =====> UpdateData(0);
|
|
|
|
|
( with MFC, VC6/VS.net 2003 )
I have 2 docking windows in my MDI application, docking window A can dock on either the left or right side, and docking window B can dock on the bottom.
now, I have something like : where the docking window B takes the whole width of the frame.
--------------------------------------------|
| | |
| Dock| |
| ing | |
| | |
| Wind| |
| ow | |
| | |
| A | |
|-------------------------------------------|
| |
| Docking Window B |
--------------------------------------------|
Is there a way to have the docking windows look like this instead ? :
--------------------------------------------|
| | |
| Dock| |
| ing | Main Window ( child wnd ) |
| Wind| |
| ow | |
| A | |
| | |
| | |
| |-------------------------------------|
| | |
| | Docking Window B |
--------------------------------------------|
Maximilien Lincourt
Your Head A Splode - Strong Bad
-- modified at 14:45 Wednesday 7th June, 2006
|
|
|
|
|
I like to write a program to read several arrays of function of time and then to display these arrays in multiple channels stacked up in a page.
Please help me to get some key code segments to start with.
Thanks
|
|
|
|
|
I have a dialog box with lots of edit controls and some
check boxes and a date time control. Is there an easy
way to know when one of the items has changed, so that
I can then do:
SetModifiedFlag(TRUE);
The only way I can think of right now is to EN_CHANGE
on each and every control and if something changes, then
do:
SetModifiedFlag(TRUE);
Im hoping there is an easier way to know when at least
one control has changed just alittle.
Please, any response any one can give me will be
greatly appreciated.
Sincerely,
Danielle Brina (an overworked graduate student)
|
|
|
|
|
Could you not derive a class from CEdit , and put the ON_CONTROL_REFLECT(EN_CHANGE, ...) code in it?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
It works but it doesnt work. The function:
ON_CONTROL_REFLECT(EN_CHANGE, OnChange)
calls the OnChange function when an edit box is changed. However,
in this new class, CMyEdit, I cant call:
m_pDocument->SetModifiedFlag(TRUE);
or,
GetDocument().SetModifiedFlag();
Im stumped on calling SetModifiedFlag in the OnChange function.
Please, please, any response you can give me will be greatly
appreciated.
Sincerely,
Danielle Brina (an overworked graduate student)
|
|
|
|
|
When the OnChange() method is called, set a static member variable to true . Add a static method to your CEdit-derived class, something like:
bool CMyEdit::HasChanged( void )
{
return m_bChanged;
} Then in your code that needs to know if any of the edit controls were changed, simply call CMyEdit::HasChanged() . Make sense?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
WEll for edit controls you can derive them from a common CMyEDit class
and add the following macro
ON_CONTROL_REFLECT(EN_CHANGE, OnChangeVal);
OnChangeVal :- this function will be called on the change of the edit controls
Check for reflect Messages in MSDN.
Regards,
FarPointer
Blog:http://farpointer.blogspot.com/
|
|
|
|
|
I use a slightly modified version of the method described here[^]. I re-calculate the checksum in an OnIdle handler so t is always checked without having to worry about it in any of my other code.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Hi,
I have a tree control with checkboxes (using the following tip http://www.pocketpcdn.com/articles/checktree.html)
Now I'd like to know how I can retrieve the boxes that have been checked. And if it is possible NOT to display the checkboxes corresponding to some items of the tree (I'd like checkboxes only for the leafs of the tree).
Thanks
|
|
|
|
|
Hi,
Wenever you click the treecontrol item the image coresponding to it is retreived from the imagelist and displayed .
TreeCtrl sends a notificastion message of type TVN_GETDISPINFO .
for this you need to set some flag in the LPARAM in the InsertItem.(check MSDN)
So wen the user clicks the item it send a notification and inside you can maintain the list of items thats are geting checked and wen you uncheck you remove the index from your container.
You can chcek this link:-
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcesdkr/html/_wcesdk_win32_TVITEM_str.asp[^]
Regards,
FarPointer
Blog:http://farpointer.blogspot.com/
|
|
|
|
|
hi,
i want to develop one application in VC++ MFC ,which can insert & retrive data from a database(oracle), through a dll .The Dll is resposible for handling all database operation.
can any please help to work on that...
"EXE" + "DLL" + "DB"
1.how can i make a connection string for oracle database which is in remote system.
2.how can i handle DB opeartion in Dll.
i try with Dll , but it through error
send reply ,,,early
Try again and again,
At last you will say
I don't know the meaning for impossible.,.
-- modified at 11:37 Wednesday 7th June, 2006
|
|
|
|
|
maharaja pandian wrote: i try with Dll , but it through error
And that error would be what?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: And that error would be what?
You sure are nosey, aren't you
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
in the Dll file when i try to open DB using the below function it work but
when i try to open the recordset open i.e.,rsOpen() , it open a DataSource dialog screen will opened ,instead of executing a sql query
//////////////////////////////////////////////////////////////////////////
bool CDaoDB::dbOpen(CString strFilePathName)
{
try
{
db = new CDaoDatabase(NULL);
db->Open(strFilePathName);
return true;
}
catch(CDaoException* error)
{
delete db;
db = NULL;
LPTSTR errors = "";
error->GetErrorMessage(errors,100,NULL);
AfxMessageBox(errors);
return false;
}
}
bool CDaoRS::rsOpen(CString sql,CDaoDatabase* db)
{
CDaoTableDef *df;
try
{
if(db)
{
rs = new CDaoRecordset(db);
rs->Open(dbOpenDynaset,sql);
return true;
}
else
{
AfxMessageBox("There is no current database open.");
return false;
}
}
catch(CDaoException* error)
{
delete rs;
rs = NULL;
LPTSTR errors = "";
error->GetErrorMessage(errors,100,NULL);
AfxMessageBox(errors);
return false;
}
}
Try again and again,
At last you will say
I don't know the meaning for impossible.,.
|
|
|
|
|
maharaja pandian wrote: LPTSTR errors = "";
error->GetErrorMessage(errors,100,NULL);
This will likely fail as no memory has been made available for GetErrorMessage() to write the error message to.
maharaja pandian wrote: rs->Open(dbOpenDynaset,sql);
What is the value of sql ? Have you stepped into this method to see what is prompting the Open dialog to be displayed?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello everybody
i am working on MDI application using mfc, the user can have new file in the regular way, or by using a wizard. i have no problem in the regular way since the document , the view and the framework are attached to each other in the initinstance method in the application.
the problem is in the wizard way.
in the wizard i have to set the child frame hidden, and attach the document to the wizard, and to destroy the document after finishing the wizard.
any help or sample is appreciated
thanks alot
bye
|
|
|
|
|
hi,
Why you want to destroy the doc in the finish of your wizard .
After the wizard is over the view comes up is that the way your app works .
Regards,
FarPointer
Blog:http://farpointer.blogspot.com/
|
|
|
|
|
Hi
first thanks alot for your reply
actually in the finish page of the wizard i give the user the choice to end the document and save the results in a file, or to open the view to show him the data he already chose in the wizard to enable him to update them.
i also need to know how to hide the child frame, and how to associate the new document with the wizard
thanks
|
|
|
|
|
Hi ,
So let me get it straight :-
So the view should come ony when he does a finish in the wizard and that to depending on the checkbox valueand I also assume that the wizard mode only gets enabled after the first document is created .
if yes then you shouldnt take the pain to destroy the document since
OnFileNew() will destroy the prev document(and it should be called in the wizard finish) if any present and if the user preses cancel in between the wizard mode you can show the previous view.
So the problem comes were will you store the data during that process ,
I would suggest you to make an CContainer class which will hold the data and will stay in the App and in the finish after the document is created you set the container to the document and which will be deleted in its destructor .
Regards,
FarPointer
Blog:http://farpointer.blogspot.com/
|
|
|
|
|
Hi,
I want to use excel for displaying graph. I refer MSDN artical "Use MFC to Create a Microsoft Excel Chart (Q178783)". It almost satisfy my need. But it display the chart in same sheet in which values for drawing graph is. I want to display the graph in another chart. Simply stating in sheet1 I want value for plotting graph and in chart1 I want the graph of it.
I tried for it hard but faailed to do it can anyone help me out.
Mike
|
|
|
|