|
no, I think he want to have the parent's dialog application data display in a modal dialog of that dialog application
anyway, You can either passer the data in the modal dialog constructor ( override the current constructor ) or pass the parent pointer to the modal dialog.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
As a matter of fact there is only one program (dialog based) and it processes data. And there is also a modal dialog as an inserted dialog resource.
Regards.
|
|
|
|
|
That's simple enough then. Change the constructor of the second dialog to also accept a pointer to the first dialog (the parent). Then the second dialog will have access to properties/methods of the first dialog. Something like:
class CDialog2 : public CDialog
{
public:
CDialog2( CDialog1 *pDlg, CWnd *pParent = NULL);
private:
CDialog1 *m_pDlg;
}
CDialog2::CDialog2( CDialog1 *pDlg, CWnd *pParent )
: CDialog(CDialog2::IDD, pParent)
{
m_pDlg = pDlg;
}
...
CDialog2 dlg(this);
dlg.DoModal();
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
It looks fine. I have done everything as you wrote but there is 1 error:
“error C2512: 'CDialog2' : no appropriate default constructor available”.
The error occurs in the method of the CDialog1 in line with CDialog2 dlg;
What should I do?
Regards.
|
|
|
|
|
I messed up.
Johnny Peszek wrote:
What should I do?
Recheck my post again. Sorry about that.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Ok I will do that.
Thanks.
|
|
|
|
|
HI,
How can i Detect that Appearence setting of Desktop is changed.
i mean to say that ,, RightClick->Properties->settings and chages the Pixels appearnce settings of Desktop is changed by user,.
how can i detect by my application ,, so i chage my coordinats too.
thanx
Regards.
|
|
|
|
|
Provide a handler for the WM_SETTINGCHANGE message.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi..
I have 2 VC++ Projects..Each project builds a Dll..I have a separate .exe application which will be run and this will access these 2 dll's.. Right now i can debug only one project at a time through VC++..
I want to know if there is any way by whcih I can debug the 2 projects simultaneously..
Thanks
Sudhakar
|
|
|
|
|
HI,
MSDN states for CM_CYVIRTUALSCREEN n CM_CXVIRTUALSCREEN
Windows 98, Windows 2000: Width and height, in pixels, of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. The SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN metrics are the coordinates of the top-left corner of the virtual screen.
it is for Window 98 and 2000
wt for XP,
On windows XP its not working
and
SM_CYFULLSCREEN and SM_CXFULLSCREEN
i used but not draw the fuull screen ,
from buttom there is a space empty
thanx
Regards.
|
|
|
|
|
You should not have a problem on WinXP. I have written code that uses those parameters to GetSystemMetrics() and they return the appropriate x and y for the virtual screen when running on XP.
Can you elaborate on what you mean by not working?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
hello!
how should i create a 2D line chart using MSChartControl in VC++.I have 2 arrays,one for x-axis and one for y-axis.How should i provide data from these two arrays.
How can i get scale on y-axis(like 1 to 100 instead of R1,R2...)
pls. help me urgently
thanx
sandhyadec26
|
|
|
|
|
Hi..
I'm sending http request in which i'm passing userID/password, then it got struck on HttpEndRequest() in case of windows XP..even on fresh Windows 98 PC.
What do you think it's reason..Is it any reason of security in WinInet or some OS file missing.
In My PC with Windows 98 it's working fine. but as I transfer it stop working,
I've checked Dependency with "Depends" & provided all files, but system Hang (Freeze) when execute function HttpEndRequest().
Plz Suggest any Solution..
Thanks..
---Sumit Kapoor--- sumit_kapoor1980@hotmail.com
|
|
|
|
|
HI,
How can i Get DeskTop RECT .....
as i do to get RECT of dialogs using GetWindowRect();
actualy i want to draw mine application Window equals to the desktop coordiantes excluding TaskBar area.
any sample. or help ..
thanx
Regards.
|
|
|
|
|
Try using GetSystemMetrics(SM_CXFULLSCREEN)
Regards,
Mahadevan.
|
|
|
|
|
You missed SM_CYFULLSCREEN in order to get the y.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
if i will try like this then
is it right way
CWnd * wnd = GetDesktopWindow();
RECT rect;
wnd->GetWindowRect(&rect);
MoveWindow(rect.left,rect.top ,rect.right ,rect.bottom -35 , TRUE);
RECT rec;
this->GetWindowRect (&rec);
GetDlgItem(IDC_BUTTON1)->MoveWindow(rec.left,rec.top+70, rec.right ,rec.bottom );
is it right
tell me how i use GetSystemMetrics(SM_CXFULLSCREEN)
thanx
Regards.
|
|
|
|
|
Additionally to what has already been stated.
If you have multiple monitors (or want multiple monitor support) us
SM_CXVIRTUALSCREEN to get the x
SM_CYVIRTUALSCREEN to get the y
As the parameter to GetSystemMetrics
NOTE: the rect will be (0, 0, x, y)
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Dear all,
I try to save a GDI+ Bitmap in monochome GIF in as following code but failed. Any one can help?
*********
Bitmap* bit= Bitmap::FromFile(L,"Test.bmp");
unsigned long nColorDepth;
nColorDepth=1;
EncoderParameter encParam;
encParam.Guid=EncoderColorDepth;
encParam.Type = EncoderParameterValueTypeLong;
encParam.NumberOfValues = 1;
encParam.Value=&nColorDepth;
EncoderParameters encoderParameters;
encoderParameters.Count = 1;
encoderParameters.Parameter[0]=encParam;
CLSID GIFCodecClsid;
GetCodecClsid(L"image/gif", &GIFCodecClsid);
bit->Save(A2W(strGifPath),&GIFCodecClsid,&encoderParameters);
*********
Kindly help me to solve my problem.
Thanks & Best regards
Le Dac Liem
Vietnam
|
|
|
|
|
Hai frens.
Plz Any one tell me how many kinds of grids r there ?
What r there functionalities ?
How specific we should use those grids ?
Thanx
|
|
|
|
|
hello, im looking for some help in sending a file in a client server enviroment using winsock,i have managed to do this in the past using a small text document however i face problembs when using lareger files that wont fit into a small char buffer.
my aim is to divide my file up into chunks,and individualy send theese chunks of data to the server, wich inturn will reasemble the data and write the file to a directory.
i face problembs in knowing agsactly how to divide the file up into chunks,and how to reasemble the file at the server side,also i have problembs in knowing when the file has been completley sent and completley recived. any information that could be relevant to helping me would be greatly appreciated.
thank you for your time.
|
|
|
|
|
|
hello
i am develeloping a project in vc++ of Remote Administrator
in Workgroup model.I want to connect to another computer
in workgroup by wnetaddconnection2 function
features of my project is
1.control of services by openscmanager
2.remote shutdown
3.control of process on remote system
can somebody help me
viksd jindal
|
|
|
|
|
vikasjindal wrote:
can somebody help me
Can you narrow it down a bit? What exactly do you need help with? Is a piece of code giving you troubles? Do you not know how to use WNetAddConnection2() ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi,
I include a modeless CDialog into my program by :
m_pDlgRelance = new CDlgRelance(); // CDialog
BOOL ret = m_pDlgRelance->Create(IDD_DLG_RELANCE,this);
if(!ret) //Create failed.
AfxMessageBox("Error creating Dialog DlgRelance");
m_pDlgRelance->ShowWindow(SW_SHOWNORMAL);
But it appear always over the parent windows.
What can i do to avoid this ?
Thanks
Best Regards
Olivier JOLY
|
|
|
|