|
Why you need modeless dialog ?
|
|
|
|
|
Because the user must be able to do other things while the dialog is active.
The user performs some actions (outside the dialog) and then clicks Ok or Cancel.
|
|
|
|
|
Your requirement is very contradicotry. There is no way you can achieve this.
|
|
|
|
|
IMHO, you should look for a mechanism to pass a pointer of your parent dialog to the child dialog, when the user clicks on the OK button modify the value in the parent using the Get/Set function, and then use them in your parent.
You can also try using the GetParent() and then setting the value in the modeless dialog class.
I hope that this helps.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
piul wrote: ...I don't know how to make the program wait until the user clicks on a button.
To do this, use a modal dialog.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
My program is creating a file named file.prop with one of the following in it...
...
Max records=10
Temp size=94
<pre>
Next, I parse this file line by line and get the values...
As I finish reading a line from a file I want to erase that line from the file for e.g. I read Temp size=94. After reading this line I want to erase it from file.prop . How can this be done. Please help me out.
THANKS..
|
|
|
|
|
Without knowing your code, hard to say.
In general, if you are reading the file line by line do the following:
Write each line you read to a temporary file. Once you reach the line you want to delete, skip it. Once your done reading, rename the temporary file overwriting the original file.
modified on Friday, May 16, 2008 6:57 AM
|
|
|
|
|
pl_kode wrote: As I finish reading a line from a file I want to erase that line from the file
Why? What is it that you are trying to avoid?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all,
I have made a dialog box application, in that application i have made various controls and on clicking on buttons some resources are being hide and some are being shown. My problem is sometimes when i press button or simultaneusly press various buttons controls take time to load and at that time cpu usage is 75-100%.
Can anybody help me in solving this....
thanks in advance
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
How many buttons you have on the forum ?
|
|
|
|
|
12 buttons
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Can you show us the code you use to hide/show the controls?
|
|
|
|
|
m_Dialog_Path.ShowWindow(FALSE);
m_Shortcut_Info.ShowWindow(FALSE);
m_Reg_Det.ShowWindow(FALSE);
m_Uninst_Gen_Info.ShowWindow(FALSE);
m_Del_Edit.ShowWindow(FALSE);
m_Files.ShowWindow(TRUE);
m_Fil.ShowWindow(TRUE);
m_Add_Dir.ShowWindow(TRUE);
m_Clear_List.ShowWindow(TRUE);
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Look up the documentation for ShowWindow(). Use SW_SHOW and SW_HIDE as parameters.
However, I doubt that it solves your problem with high CPU usage. It could be something else in your code.
|
|
|
|
|
when i have just written code to show and hide controls problem existed
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
I dont think problem is of these buttons.you click them repeated or once?
|
|
|
|
|
Without the relevant code there is not much we can do.
Use the debugger or even the profiler to isolate the function that uses too many CPU cycles.
|
|
|
|
|
If you comment out these nine statements, what happens? If you uncomment them one at a time, what happens?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi
Create a Tooltip for dropdown menu using Win32 .
Thanks and Regrads
Prabhat Singh
|
|
|
|
|
..on a toolbar, or on a dropdown menu? You contradict yourself in the two sentences you wrote.
One is easy, one is hard. There's a good reason the help text for a menu item goes in the status bar normally...
Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|
|
Sir
I want to Create a Tooltip on Toolbar Menu using Win32 API.
Prabhat Singh
|
|
|
|
|
I know of no thing as a "toolbar menu".
Do you mean a popup menu, that you make appear when someone clicks on a toolbar button?
If you use TrackPopupMenu (from memory), then the window used as a parameter will get WM_MENUSELECT messages, and you can then put help text somewhere (eg the status bar).
Enough guessing - you need to provide more information.
Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|
|
yap Toolbar popupmenu
How Can I do this ?
is there any example for that ?
Prabhat Singh
|
|
|
|
|
pls help me to solve my problem.
Prabhat Singh
|
|
|
|
|
Prabhat.Singh wrote: pls help me to solve my problem.
Pls be clear about what your problem *is*.
Do you have a toolbar?
Do you have a handler that is run when a button is pressed?
Have you make a popupmenu? (hint: TrackPopupMenu).
Have you written a handler for WM_INITMENU?
The answers to those all need to be "Yes" before you need further help.
I've already said putting a tooltip next to a menu that has popped up is very hard, and you should use some other way of giving feedback to the user. MFC uses the status bar for it. If they're not clever enough to put a tooltip next to the menu, then neither are you - or me.
Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|