|
Use the SetWindowPos using the topMost value in the pWndInsertAfte parameter...
Cheers!!!
Carlos Antollini.
|
|
|
|
|
Use the SetWindowPos using the topMost value in the pWndInsertAfte parameter...
Cheers!!!
Carlos Antollini.
|
|
|
|
|
Use the SetWindowPos using the topMost value in the pWndInsertAfter
parameter...
Cheers!!!
Carlos Antollini.
|
|
|
|
|
You mean like the "always on top" effect? Just create the modeless dialog box normally (ie "CDialog::Create(IDD_MY_DLG);" and you are done. It doesn't need extra flags, and can't have the system modal flag set.
- John
|
|
|
|
|
Hello,
I have a question about dialog boxes. I have a dialog type application and I need to "DoModal()" other dialog boxes within the app, eg. DialogA is main app and i need to DoModal() to open DialogB.. my question is, I want to use timers on the created dialog boxes (DialogB), will the timer stay active/keep running if DialogB is "OnOK()"/Closed but the main app (DialogA) is still running? If not, how can I hide and unhide Dialog B without closing it.
Thanks,
RobJones
|
|
|
|
|
If the dialog is closed, it is destroyed. You want a modeless dialog box, and use ShowWindow(SW_SHOW/SW_HIDE) to close it/open it. You can easily set a flag in your main dialog to make it appear modal by making the main dialog unresponsive.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Christian,
Thanks for the help.. I have implemented this code.. it appears to be working but I'm not sure I'm doing this correctly or if I should be doing this differently.. In the main dialog application I use this to open the modeless dialog:
void CBSDeluxeDlg::OnBAdd1()
{
if (!::IsWindow(m_dlgAdd1.GetSafeHwnd()))
m_dlgAdd1.Create(IDD_ADD1, this);
m_dlgAdd1.ShowWindow(SW_SHOW);
}
In the properties of IDD_ADD1 Dialog box I have style "Overlapped" if I use style "child" all the buttons from the main app show through the modeless dialog and I can't use any of the controls of the modeless box.. now to hide the dialog box I use the following code when the OK button is pushed.
void CAdd1Dlg::OnBOk1()
{
CAdd1Dlg::ShowWindow(SW_HIDE);
}
I havent tested to see if the dialog stays active and is just hidden.. I wanted to make sure that the code was correct first..
Thanks for all your help!
Rob Jones
|
|
|
|
|
That looks right. I tend to create modeless dialogs as pointers and set to NULL, but I like the way you've done it, I may have to try it that way in future...
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
If you only want to keep timer alive, you can create a timer without association to the dialog. See my article "Timers tutorial" to find more about it.
I vote pro drink
|
|
|
|
|
Hi,
I need to find a good tutorial on how to use MFC. Basically, what I am trying to do is use MFC-designed dialogs (maybe from a dll) with ActiveX controls in them from a non-appwizard application.
Thanks.
|
|
|
|
|
You could look here http://www.adminmod.org/karel/2/index.htm
This is a "How to" type site so it's pretty basic, but it also has some good information..
Hope it helps,
Rob Jones
|
|
|
|
|
One of the best i had found around
is
http://devcentral.iftech.com/default.php
it has alot about MFC and VC++ win32 programming
________________________________________________
Those that have really found the meaning, dont find it meaningful
|
|
|
|
|
Hello everybody,
In a program i need to change the style of a ComboBox (Using Win32 SDK) from CBS_DROPDOWN to CBS_DROPDOWNLIST (either way). I tried using SetWindowLong() and ModifyStyle(), but failed in both the ways and failed to get what i want. If anybody knows plz help me.
Thanx in advance.
|
|
|
|
|
I have some image lists that are 256 colors. I use them in CTreeCtrl and CListCtrl, but they will only be shown in 16 colors! I've tried to see if there was a way to specify the color depth, but i couldn't find anything!
what i am doing wrong????
Thanks!
|
|
|
|
|
WHY IT DOESN'T WORK ??????????? TELL ME WHY !!!!!! PLEASE PLEASE PLEASE PLEASE PLEASE !!!!!
CHARFORMAT cf;
cf.dwMask = CFM_COLOR;
cf.crTextColor = RGB(255, 0, 0);
myRichEditCtrl.SetDefaultCharFormat(chf);
myRichEditCtrl.SetWindowText("Stupid Control show this in Red!!!!!!!!!!!");
But he doesn't do it, I see the text in black (and NOT, I'm not using a monochrome screen!)
|
|
|
|
|
Then you need to select the text and must use
SetSelectionCharFormat(CHARFORMAT&).
I'm sorry....
Carlos Antollini.
|
|
|
|
|
Can anyone tell how to create Plugins for MSInternet
Explorer 4 and above.
Thanks
Sansky
|
|
|
|
|
Yeah, create an ActiveX control. I wouldn't invest the time in this endeavor, especially when Microsoft has dropped plugin support in IE 5.5 and above.
|
|
|
|
|
Hi, I’ve been trying for most of the day now to write a function that is basically the same as JScript's split function (you pass a string containing one or more key letters, and the key letter, and the function returns an array [or list] of the strings).
e.g. (pseudo code).
CStringList Foo::Split(CString strBigString, CString srtKeyletter)
{
.. do stuff here that creates an array of keyletter delimited strings
return [CStringList containing the strings]
}
However, I can’t get it to work. Not even slightly! Could anyone here help?
Yours,
Peter
|
|
|
|
|
Hi Peter,
are you after a strtok or wstrtok type function. Its a c library call that tokenizes as you describe
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt_strtok.2c_.wcstok.2c_._mbstok.asp
or use the CString FindOneOf to implement what you want
John
|
|
|
|
|
Thanks, i've managed to write a function using wstrtok that does exactly what I wanted.
|
|
|
|
|
Hi again,
Somebody has to know how to fix this... cause I can't!
If you use nested splitters and click on a splitter bar WITHOUT moving the bar, the bar automatically moves 2 pixels to the right (or down). Why is that? It's a CSplitterWnd bug but I can't seem to get around it...
NEW: I can mail you a sample project for anyone interested in removing this bug! Just mail me!
All help is greatly appreciated,
/Tommy
|
|
|
|
|
maybe it's because you move the mouse without noticing.
BTW: for some of you that wished for CodeProject irc server
I create a channle on DalNet called "#CodeProject "
|
|
|
|
|
No, I'm not accidentally moving the mouse...
Somebody please solve this!!!
/Tommy
|
|
|
|
|
I'm using a lot of nested splitter windows in my current application and it doesn't happen to me.
|
|
|
|