|
Hello,
If someone can simply break down the steps, as I think I'm missing something...
My application is a dialog box, with a few buttons. On the button click, I want to launch a new dialog box which I have created in Resources. I have also added classes for it, so it has a cpp and h file.
Now, how do I simply link the button to the dialog box, such that it will simply launch?
Thank you.
|
|
|
|
|
if you are using the MFC class wizard you can double click on the button in the resource editor and it will add a handler for you (you are looking to get an ON_BN_CLICKED handler) Inside the handler declare and instance of the new dialog and away you go
|
|
|
|
|
just to clarify, is this assuming I have created a class for the new dialog as well?
and then you are saying to double click on the button in the old dialog and declare an instance of the new dialog?
I think I am creating too many classes, so please just clarify for me where and for what I am creating the classes, thanks!
|
|
|
|
|
BEGIN_MESSAGE_MAP(CMyMainDlg, CDialog)
ON_BN_CLICKED(IDC_BROWSE_PATH, OnBnClickedBrowsePath)
END_MESSAGE_MAP()
void CMyMainDlg::OnBnClickedBrowsePath()
{
CAnotherDialog dlg;
dlg.DoModal();
}
CMyMainDlg is the dialog for my main application...CAnotherDialog is the new dialog that I want to bring up on the button click.
hope this helps
cje
|
|
|
|
|
Hope I understood your question
if you want to run another dialog use m_yourdialog.DoModal() or m_yourdialog.Create
whitesky
|
|
|
|
|
I have a picture control on a dialog app.
Anybody know how to play a video inside that picture control.
I can play video using a default player like media player no problem, but i would like that video to be played from my app on my picture control.
Is there some sort of plugin or active x control that i can use?
|
|
|
|
|
directshow better
Kuphryn
|
|
|
|
|
can you expand on how i would use this in C++?
|
|
|
|
|
better msdn
directshow directdraw
IGraphBuilder
IMediaControl
IVideoWindow
IDirectDraw
Kuphryn
|
|
|
|
|
there are articles here on CodeGuru that are pretty good regarding DirectShow - you can also find some sample applications with the DirectX SDK
|
|
|
|
|
Hey guys,
I am trying to study how functions with POINTER PARAMETER WORKS. Does anyone know any link where I can study how Functions with pointer parameters work.
Thanks
void ObjectRoot::classInit( RTI::RTIambassador* rtiAmb, const char* classIdStr )<br />
{<br />
ObjectRoot::ms_rtiAmb = rtiAmb;<br />
ObjectRoot::ms_classIdStr = classIdStr;<br />
<br />
if ( ms_rtiAmb )<br />
{<br />
ms_classId = ms_rtiAmb->getObjectClassHandle( ms_classIdStr );<br />
}<br />
}
|
|
|
|
|
|
I am trying to study how functions with POINTER PARAMETER WORKS. Do you know any good links which will provide me with the details of FUNCTIONS WITH POINTER PARAMETERS
|
|
|
|
|
|
I'm wondering if you're going to again delete your post after getting the answer. For your reference, here is the link[^].
Best,
Jun
|
|
|
|
|
Hey Jun,
Im new to this thing so im just messing around .. hahaha
|
|
|
|
|
It's Ok. Hope you enjoy here.
Best,
Jun
|
|
|
|
|
|
Jay03 wrote: ...how Functions with pointer parameters work.
They work just the same as any other function does. When calling them, simply pass the variable's address instead of its actual value.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Has anyone written any code to expand a string with embedded environment variables in it, e.g.
%systemroot%\system32\drivers\etc\hosts
.. to form a literal string (as required by functions such as CreateFile()):
c:\windows\system32\drivers\etc\hosts
?
Many thanks.......
cheers,
Neil
|
|
|
|
|
|
Thanks. I thought there had to be something, just couldn't spot it.
You the man!
cheers,
Neil
|
|
|
|
|
Anyone know how to place an HBITMAP into a PDF File? or Save a CDC as a PDF File?
Chris
|
|
|
|
|
|