|
So I edit the afxdlg.rtf file in ignorance and completely whacked all the tags and other formatting, and subsequently attempted to re-generate the help files.
The upshot is that the help files are hosed.
AfxDlg.rtf is auto-generated by the MFC AppWizard; is there a way to RE-generate this file?
|
|
|
|
|
Nick Cassavaugh wrote: AfxDlg.rtf is auto-generated by the MFC AppWizard; is there a way to RE-generate this file?
As far as I remember, the file AfxDlg.rtf is generated by the AppWizard, but leaves lots of places for you to modify. If you have totally lost the original file, you could create a new project like your current one, copy the file, and delete the new project. Then make a copy of it just in case.
But why are you using the old style help compiler? Use the newer HTML help system. You get a better product, and if you have to start from the beginning anyway, there is not much lost.
Shraddhan
|
|
|
|
|
Hi,
I am trying to launch a process (a Web browser) from inside a screensaver app using ShellExecuteEx. I can get the new process spawned, but it terminates when the screensaver quits. Is there a way to launch it as an independent process so it stays active after the screensaver quits? Thx.
Bodhi
|
|
|
|
|
I'm surprised to hear that - Once a process is launched it should be independent of the process that spawned it. Have you any more info?
Steve
|
|
|
|
|
Thanks for writing. It is a weird problem. I'm using VC++ 6.0, Windows XP Pro. If I launch the 'saver manually from the shell, or through the display properties screen saver preview, no problem. If the 'saver is launched by the system (i.e., as it normally would be), the browser (or Control Panel, or Appwiz) process it spawns is active only until the 'saver terminates.
|
|
|
|
|
I broke out my old "Pay rise" screen saver (it's a long story) and modified it to launch another process. Sure enough it behaves exactly as you say. I tried using ShellExecuteEx and CreateProcess but it happened with both. I think this ones gonna be hard to crack - Smells like some security "feature". Good luck (I suspect you'll need it).
Steve
|
|
|
|
|
The ScreenSaver runs in a separate desktop from the regular user logged in.
When you launch the new app, it is created in same desktop as screensaver, and it is terminated when the screen saver desktop ends.
You might try SetThreadDesktop on your newly created app, before the screen saver quits. There might be a way to specify which desktopthe app gets created in using one of the parameters with the CreateProcess call. I don't think you have very much control with the ShellExecuteEx.
So, indirectly it is a security feature you ran into.
|
|
|
|
|
When I use ondrawitem to draw the owner draw button, the button is seem very blunted. The code is just like the article "The art of subclassing".
Please help!
|
|
|
|
|
|
In fact that I only do
if ((state & ODS_SELECTED)|m_ClickControl)
pDC->DrawFrameControl(rect, DFC_BUTTON, DFCS_BUTTONPUSH|DFCS_PUSHED);
else
pDC->DrawFrameControl(rect, DFC_BUTTON, DFCS_BUTTONPUSH);
rect.DeflateRect( CSize(GetSystemMetrics(SM_CXEDGE), GetSystemMetrics(SM_CYEDGE)));
if (m_ClickControl)
pDC->FillSolidRect(rect, RGBBUTTONDOWNCOLOR);
else
pDC->FillSolidRect(rect, RGBBUTTONUPCOLOR);
in the onDrawitem.
Please give me more hints to solve this problem!
|
|
|
|
|
LaHaHa wrote: if ((state & ODS_SELECTED)|m_ClickControl)
Why are you doing this(m_ClickControl). I guess you are checking for the button pushed state. You only need to check for (state & ODS_SELECTED). That will suffice.
LaHaHa wrote: if (m_ClickControl)
pDC->FillSolidRect(rect, RGBBUTTONDOWNCOLOR);
else
pDC->FillSolidRect(rect, RGBBUTTONUPCOLOR);
Even for this the above rule applies.
Jesus Loves <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background:#aabbcc;border-bottom:thin solid 1px #6699cc">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
The m_ClickControl is used to hold the button state.
But even I remove the m_ClickControl, the button has the same problem.
It will has a short time that cannot be clicked.
Please help!
|
|
|
|
|
Oh he had a problem with u
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
So he help me! Just joking!
|
|
|
|
|
LaHaHa wrote: the button is seem very blunted
Can we see the picture so we understand what u mean?
-Prakash
|
|
|
|
|
In fact that the button is just look like simple button.
When you click the first time, it will response to your click.
If your second click is very fast, it will not pushed.
It need about 1 second between each click, then it will seems no problem.
Please help!
|
|
|
|
|
|
I have tried it. No change.
Which time I click it, the button is up.
(the first, second, or third...)
I do this in the normal button, it works.
Please help!
|
|
|
|
|
|
I know what is the problem now!
I need to add your code into the subclass not the main dialog!
It works now!
Thank you for your great help!
It means problem with ownerdrawn button should ask ownerdrawn(you);P
|
|
|
|
|
Can anyone tell me how to save the items in a CListCtrl to a file and then to load it when the dialog is opened?
Thanks in advance
|
|
|
|
|
The control itself can't do anything like this, you need to decide where to store it, and write the code accordingly. Some options include a database ( if you have one already ), a text file, or XML ( which is just a formatted text file, after all ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yes i'm looking at a text file. You have any idea how to SAVE into a text file & how to LOAD into control. Any sample application where i can see the code?
|
|
|
|
|
An ofstream will write the file, and ifstream will read the file. You can google these if you don't know how they work. The format is up to you, and again, it's your code, and no built in magic that will turn the text in the file into data in your control, and vice versa.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
1. Find the number of items in the CListCtrl using the method CListCtrl::GetItemCount
2. Then use the WritePrivateProfileInt() API call to write this information to a file (.INF or .INI)
3. Run a loop and get each and every item from the CListCtrl. Write all these into the .INF file using WritePrivateProfileString() API call.
4. GetPrivateProfileInt() and GetPrivateProfileString() will help you to get the information back.
5. Display it.
6. If you face a problem, reply and let me know.
Regards,
Rajesh R. Subramanian.
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|