|
Thanks a lot fo the help! very clear and detailed answer!
|
|
|
|
|
Hi,
How do I access a Global variable of one Dialog box from a another one.Some suggested sending messages, but how do I send a variable using sendmessage? anone line example would be great.
Thanks
Deepak Samuel
|
|
|
|
|
One solution is to send a pointer. Another solution is to declare the global variable using extern inside, for example, stdafx.h.
Kuphryn
|
|
|
|
|
If the second dialog box is modal, then you can add a variable fo the same type as the global variable in your dialog's header file - in the public: section.
Then when you instantiate your second dialog box, you can assign the value of that dialog's variable:
CMyDialog dlg;
dlg.TheLocalVariableIWantToBeTheSameAsTheGlobalVariable = GlobalVariableValue;
dlg.DoModal();
|
|
|
|
|
In Fact the simplest way to do this is to have a parent class handle the variable so that both dialogs can access the variable, regardless if they are modal or modeless dialogs. For example if both dialogs are displayed from a handler in the MainFrame class, have the mainframe class contain the variable, make the variable public (or better still add functions to get and set the variable), then pass this into the dialog classes when they are created, then either dialog can call GetParent()->(variable name) or GetParent()->(function name).
As an alternative to this you can make a third class that is soley used for holding data (e.g. not a display class), this could then hold the data to change, and both dialogs could hold a pointer to this class and then they can access the variables and functions of that class.
Mark.
|
|
|
|
|
Hello,
how can I create a Folder (for example: "MyPersonalFolder") under an existing Folder such as "Inbox".
Actually I can create a folder on the same rank as for example the "inbox".
Thanks a lot for helping me !
|
|
|
|
|
I am cleaning up my code a little bit and put the window procedure of a subclassed list box into a class but when I get the following compire error when calling SetWindowLong:
<br />
cSkinListObject.DefSkinListProc = (WNDPROC) GetWindowLong(hwndSkinList, GWL_WNDPROC);<br />
SetWindowLong(hwndSkinList, GWL_WNDPROC, (LONG) cSkinListObject.SkinListProc);<br />
<br />
error C2440: 'type cast' : cannot convert from 'long (__stdcall cSkinList::*)(struct HWND__ *,unsigned int,unsigned int,long)' to 'long'<br />
Where as if it is not in a class it casts fine...how to cast this properly?
|
|
|
|
|
A member function can't be a callback because of the implicit this parameter. Your options are use a global function or a static member function (which has no this ).
--Mike--
Ericahist [updated Oct 26] | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"Linux is good. It can do no wrong. It is open source so must be right. It has penguins. I want to eat your brain."
-- Paul Watson, Linux Zombie
|
|
|
|
|
Is there any way to display all the processes/applications which install Keyboard hook in windows.
|
|
|
|
|
Install a system wide WH_DEBUG hook then press a key?
(Not so sure about this as I haven't done it but I think it should give you the list?)
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
Can I close all the processes by using that process list.
|
|
|
|
|
from where can i get shlobj.h for version 5.0 of shell32.dll
its urgent
modified 21-Apr-21 21:01pm.
|
|
|
|
|
|
i already have visual studio 6. do i have to download the sdk again?
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Yes. The Platform SDK is a separate entity.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hello, everyone!
I have tried this sample on both Windows 2000 Professional and Windows 2000 Server, both works perfectly when monitering:
Network Interface --> Bytes Total/sec of [My network adapter]
But it does not run properly on Windows XP system. When monitering the above performance parameter of my XP machine, I can not get the bandwidth value output.
Here is the URL link of this sample,
URL Link:
----------
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/perfmon/base/browsing_performance_counters.asp
----------
Can anyone help?
Thanks in advance,
Geo
|
|
|
|
|
Hi, everybody, there is a article at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/creating_a_child_process_with_redirected_input_and_output.asp
I built the sample code into two programs: a parent process and a child process named child.exe. When I test it, it is sure the child process's output can write to the parent process's console. However, I seemed to be impossible for the child to read from the parent. Anyone who is interested can try it. Since it is put on the Ms's website......, I can not imagine there is a bug so prominent!
any advice by Gurus?
|
|
|
|
|
u need to create 2 pipes.
the pipe from parent to child is OK according to ur question.
create another one similar to this one from child to parent.
includeh10
|
|
|
|
|
Hi,
I have a button, which on clicking pops up a new dialog box. When I click the button once more the dialog box is created once more. i want to avoid this. I want the dialog box to be created only once, and if the button is clicked while its popped up , i dont want to be created. I just want only one instance of it .what should I do,
Thanks in advance
Deepak Samuel
|
|
|
|
|
Hi there,
there are several ways to avoid this
1 Can keep a Flag and check if it is set dont open the dialog box again,
2.If u can make ur dialog box class singleton it will solve ur prob !!
3. u Can also use Mutex to avoid this .
4. And dear u can also achieve this by making ur dialog box Modal instead of modeless...then no one can ever be able to click that dam'n button again
Abhishek Srivastava
Software Engg (VC++)
India ,Noida
Mobile no 9891492921
|
|
|
|
|
Thanks a lot four your kind suggestions..
Deepak Samuel.
|
|
|
|
|
I have a edit box, where i need to type in comments.There is also a ok button. my problem is that when i want to go to the next line in the edit box,I press enter (which is the usual procedure in MS word or applications like that) but it does not go to the next line , rather it reacts as if I pressed the ok button.What should I do in order to go to the next line in the edit box as soon as i press enter?
Thanks
Deepak Samuel
|
|
|
|
|
Hi ,
open the property dialog of ur edit box check the style of edit box -MultiLine,
it will solve ur prob !!
Abhishek Srivastava
Software Engg (VC++)
India ,Noida
Mobile no 9891492921
|
|
|
|
|
Edit the properties in the resource editor.
Select the Styles tab.
Ensure that "multiline" and "want return" are selected.
Then Enter will work as desired.
Kevin
|
|
|
|
|
a, b = 0;
Is the above assignment ONE statement in sense of C++ semantics?
(Under which name is this documented?)
|
|
|
|