|
Hello everyone:
I want to load a dialog from dll and display it into child view. How to realize it? Please help me.
Thank you.
-Freehawk
|
|
|
|
|
Load/Create the dialog with CDialog.
Now set the parent of your dialog to be child-view window, and resize the dialog accordingly.
this is a semi-hack, because the way to do it is to create a window that can host another window, or what I call a 'Pane Container' and a 'Pane'.
there's nothing too special about the pane, except that you set it's parent to be the container, but the container should 'remember' the pane it contains (store a ptr to it), and resize the contained pane when the container is resized, etc.
|
|
|
|
|
Thank you very much for the reply.
I will try it.
-Freehawk
|
|
|
|
|
anybody knows how could I add minimize & maximize button like those on the right top of most Dov/View application to a dialog control? I can't make it from resource editor by inserting a dialog.
|
|
|
|
|
found the solution already.
|
|
|
|
|
|
in the resource editor double click the dialog control to show it, right click the shown dialog choose properity, in style tab you can enable & disable minimize/maximize box.
|
|
|
|
|
i did see some works that shows how to read HTML from a dll file
but these functions didn't work on mine ...
it returns me something like that: " []<"
[] is a closed box , it's that what LockResource returns.
if i open the file, can i seek with FSEEK the position of this return to get my HTML code at last?
|
|
|
|
|
Hey,
Got a question for you guys.
I have 7 combo boxes. All with time duration options in them, like 10 mins, 20 mins etc etc. Then I have an edit box that is to display the total of the values selected from the 7 combo boxes.
Here is the code I have so far.
<br />
void CDEPDlg::OnCloseupCombo15() <br />
{<br />
int totalswim=0;<br />
int cur1 = m_dur1.GetCurSel ();<br />
CString text1;<br />
m_dur1.GetLBText (cur1, text1);<br />
if (text1 == "10 Minutes") <br />
{<br />
totalswim=+10;<br />
m_swimtime=totalswim;<br />
}<br />
<br />
}<br />
m_dur1 is the 1st combo box, m_dir2 is the second etc etc.
m_swimtime is an int var of the edit box.
Thanks for any help
|
|
|
|
|
Don't combo boxes allow each value to have a hidden value associated with it ? Or have I just been web programming for too long ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
And what's the question? If you've got a specific question, I'm sure people will be glad to help, but if you're wanting someone to write your code for you, you're probably not going to get what you want. (Or was there a question and I just missed it?)
|
|
|
|
|
heh no, i was wondering how do you get the value in the combo box to be displayed in the edi box? I know how to get strings in there, but doing it the same way using ints, it doesn't work
|
|
|
|
|
Ah. I see.
All you need is to convert your calculated integer into a string. One way you can do that is with the CString Format() method:
CString str;
int someInt = 1000;
str.Format(TEXT("%i"),someInt);
// send your formatted string to the edit control
|
|
|
|
|
I put together a program which asks for the login name
and passcode and knows an internet address.
Any idea on how to run something like Internet Explorer
in the background and login for the individual and go
get information. I have seen other programs that do this;
they login and then report back certain information. It
doesn't seem that difficult but I hit a big road block.
Any ideas any one can give me will be greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
u might want to think about implementing the http GET and POST methods in a c++ app that runs in the system tray for example ... then its fairly easy to do all the stuff u want
"there is no spoon" biz stuff about me
|
|
|
|
|
You can:
1) Search info on msdn for automation.
Then you can control your I-net explorer.
you can "feed" data to the I-net explorer with GET (via URL) or POST (if I'm not mistaken data in HTML header section)
Note: This is possible, but not easy.
2) if you know MFC (or have Visual Studio) maybe you can find functions there.
Good luck.
|
|
|
|
|
|
is it possible to check a variable's type?
e.g.
if m_variable is equal to CString, DoSomething()...
|
|
|
|
|
if ((dynamic_cast<CString*>(m_variable))!=0)
{
DoSomething();
}
hope it helps
|
|
|
|
|
unfortunately that didn't work.
error C2682: cannot use dynamic_cast to convert from 'class CString' to 'class CString *'
and const_cast didn't work either (not that I fully understand either of them )
changing CString to double didn't help - apparently it's not possible to dynamic_cast double*
anymore ideas ?
|
|
|
|
|
what if you remove that * with dynamic_cast?
|
|
|
|
|
no success
CString m_variable = "test";
if ((dynamic_cast<cstring>(m_variable))!=0)...
error C2680: 'class CString' : invalid target type for dynamic_cast
|
|
|
|
|
You have to do this way:
CString m_Str = "test";<br />
if(dynamic_cast<CString*>(&m_Str))<br />
DoSomething();
Maxwell Chen
|
|
|
|
|
that didn't work either.
i tried:
CString m_Str = "test";
if(dynamic_cast<cstring*>(&m_Str)) TRACE("yes !\n")
else TRACE("no !\n");
error C2683: dynamic_cast : 'CString' is not a polymorphic type
do i have to declare it as a polymorphic type?
|
|
|
|
|
I typed up a reply explaining that I'm pretty certain you need to qualify the dynamic_cast in this case (i.e. add <CString *>), but that won't fix your problem here.
CString has no virtual functions (apparently) and as such, is not polymorphic, which means you cannot use dynamic_cast on it.
Use typeid instead. It should theoretically be faster anyway.
typeid Operator (MSDN)
|
|
|
|