|
I dont know how to explain this.
I have a Visual Basic project which i wrote it for long time.
Now,I want control VB project from VC++ project.
For Example:
There is a "A" Button, and Text in CString of VC++ project (MFC exe).
when "A" button is pressed.
It will act like "B" button in VB project and Text will show on VB dialog.
I have heard the visual studio has tool for this but i can not find how does it look like..
Looking forward for your advice .
Thank
M
|
|
|
|
|
Member 4626568 wrote: I dont know how to explain this.
That's a bad start...
Member 4626568 wrote: There is a "A" Button, and Text in CString of VC++ project (MFC exe).
when "A" button is pressed.
It will act like "B" button in VB project and Text will show on VB dialog.
So...the VB and VC++ applications are both running and you want to control aspects of the VB app from the VC++ app? Tricky...
Member 4626568 wrote: I have heard the visual studio has tool for this but i can not find how does it look like.
Nope, can't say as it does.
|
|
|
|
|
I dont understand what do you need do you want to convert your code or you want to use of a project on other project?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
I have a list control in my View class, (i created a list control using on draw )which I can see it on my main frame. But it does not show up in the print preview. Any help would be appreciated.
|
|
|
|
|
You have to draw your data onto the print preview (or, for that matter, the print) youself - all you get is a DC (device context) on which to draw. Control's won't help you with printing.
|
|
|
|
|
How did you make your preview?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hi,
Could anyone tell me how to create a view using the "Create()" in the child frame and that too the view should completely occupy the ChildFrame's client area.
Thanks in advance
Taruni
|
|
|
|
|
|
I am to provide RTL Layout for the CPropertySheet.
As it is derived from the CWnd, I am setting WS_EX_LAYOUTRTL as the extended style.
But it is doing nothing. Just added a Debug Assertion Failure to my code.
Please suggest me how can i provide the RTL layout for the CPropertySheet.
<br />
#include "stdafx.h"<br />
#include "CmnCtrl1.h"<br />
#include "propsht.h"<br />
<br />
#ifdef _DEBUG<br />
#define new DEBUG_NEW<br />
#undef THIS_FILE<br />
static char THIS_FILE[] = __FILE__;<br />
#endif<br />
<br />
<br />
BEGIN_MESSAGE_MAP(CCmnCtrl1App, CWinApp)<br />
ON_COMMAND(ID_HELP, CWinApp::OnHelp)<br />
END_MESSAGE_MAP()<br />
<br />
<br />
CCmnCtrl1App::CCmnCtrl1App()<br />
{<br />
<br />
}<br />
<br />
<br />
CCmnCtrl1App theApp;<br />
<br />
<br />
BOOL CCmnCtrl1App::InitInstance()<br />
{<br />
AfxEnableControlContainer();<br />
<br />
<br />
CAllControlsSheet allcontrolssheet(_T("Common Controls Sample"));<br />
allcontrolssheet.ModifyStyleEx(0, WS_EX_LAYOUTRTL);<br />
allcontrolssheet.m_psh.dwFlags |= PSH_RTLREADING ;<br />
m_pMainWnd = &allcontrolssheet;<br />
m_pMainWnd->ModifyStyleEx(0, WS_EX_LAYOUTRTL);<br />
allcontrolssheet.DoModal();<br />
return FALSE;<br />
}<br />
<br />
|
|
|
|
|
Looking at this page[^], I think you need to set WS_EX_LAYOUTRTL in the resource file for each property page (as each property page is a dialog), rather than directly on the property sheet?
|
|
|
|
|
Thanks for your reply. I tried setting the Layout RTL flag to true for each property page in the resource file. I also set the language of these property pages to Arabic. The result was that the individual pages (tabs) are getting displayed in the Right to Left layout.
But the container window (main dialog box that is the Property Sheet) is still in LTR layout.
Please suggest for the same..
|
|
|
|
|
Looking at the description of PSH_RTLREADING on this page[^], maybe you don't need to set both PSH_RTLREADING AND WS_EX_LAYOUTRTL ?
CAllControlsSheet allcontrolssheet(_T("Common Controls Sample"));
allcontrolssheet.ModifyStyleEx(0, WS_EX_LAYOUTRTL);
allcontrolssheet.m_psh.dwFlags |= PSH_RTLREADING ;
m_pMainWnd = &allcontrolssheet;
m_pMainWnd->ModifyStyleEx(0, WS_EX_LAYOUTRTL);
|
|
|
|
|
I tried the same after removing both the lines pointed by you. Still the main container window is in LTR layout.
What i got from the PSH_RTLREADING documentation and its implementation in my project, is "PSH_RTLREADING" only changes the the caption. What is require by the RTLLayout is change in the whole TITLE bar, Status bar, tabs all these should be in the Right of the screen.
Canption should be displayed in the Right of the Title bar.
However PSH_RTLREADING only changes the caption in RTL. However the position of the caption in the Title bar still reamings in teh left.
|
|
|
|
|
I'm wondering if you might be better using SetProcessDefaultLayout and removing the other explicit RTL options in your app...
I'm afraid my knowledge of the subject is exhausted now
|
|
|
|
|
SetProcessDefaultLayout(LAYOUT_RTL ) is not solving the problem.
|
|
|
|
|
CPropertySheet layout is automaticly change by the OS
|
|
|
|
|
My project is Dialog base and I want to change "Font" of all control on this dialog.
What's the function can support this issue?
|
|
|
|
|
|
Plz....Give me an idea or source code to create a scenary in the client area of the frame window.
|
|
|
|
|
You posted the same question THREE TIMES within 5 minutes. Not a good start for you.
"Well, we're getting "F"'d at work. WPF, WCF, and WWF... WTF?" --John Simmons
|
|
|
|
|
Requesting source code to divide the client area in to 4 quadrants with different gradient patterns.
|
|
|
|
|
Requesting source code to divide the client area in to 4 quadrants with different gradient patterns.(required soon)
modified on Friday, January 9, 2009 7:34 PM
|
|
|
|
|
Hi All,
I had poarted VC++ 6.0 code to VC++ 2008. I am facing a problem with this piece of code.
typedef std::vector<char> Buffer;
void LoadFile(CString filePath, Buffer &data)
{
std::ifstream file(filePath, std::ios::in | std::ios::binary);
if (file.fail()) {
ThrowError(GetLastError(), "", (LPCTSTR)filePath);
}
while (!file.eof()) {
char c;
file.get(c);
data.push_back(c);
}
}
File Data: 212*R:\PRDS\Helptable\HL17.DAT *006*R:\PRDS\Helptable\HL58.DAT
<b>When i open the file instead of * i found a box </b>
When i look at the data vector in VC++ 6.0 the first element is 212, second is "r:\..." so on...
but when i retrieve the data vector in VC++ 2008, i am getting individual characters.
I am thinking on the boxes that he used to seperate the elements in the file.
Any suggestion will help me.
Thanks All
|
|
|
|
|
pratap1980 wrote: first element is 212, second is "r:\..."
First element of what? The vector contains chars, so can't have a string as an element.
pratap1980 wrote: when i retrieve the data vector in VC++ 2008, i am getting individual characters
That's what I'd expect to see in a vector of chars?
|
|
|
|
|
I am still fairly new to MFC, I have been mainly working on embedded/chip level C.
Now I have a MFC application talking to my controller through ActiveX. Certain data retrieived by ActiveX needs to be displayed to MFC user interface. data retrieiving and filltering are successful. I am trying to pass the data to MFC into an Edit control. Edit control received the notice OK. Then I get stuck. The value of the Edit control is NOT updating until the call to ActiveX is returned. As a result, only the last data is displayed. all data sent while ActiveX is running is not shown to User (although Edit control got all data).
MFC Application -> User Interface -> User Click "Retrieve" -> Display certain data to Edit box on User Interface at run-time.
What am I missing?
in .h file:
afx_msg void OnChangeStatus();
in .c file:
void CReceiveSend::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CReceiveSend)
....
DDX_Text(pDX, IDC_STATUS, X_Current_Status);
....
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CReceiveSend, CDialog)
//{{AFX_MSG_MAP(CReceiveSend)
...
ON_EN_CHANGE(IDC_STATUS, OnChangeStatus)
...
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
void CReceiveSend::OnChangeStatus()
{
//transfers values from the member variables to the controls
UpdateData( FALSE );
}
inside ActiveX function call:
int CReceiveSend::XReceive()
{
....
X_Current_Status = some_value;
this->SetDlgItemText(IDC_STATUS, X_Current_Status);
return(0);
}
Thanks
|
|
|
|