|
Hi
I want to open a form from a running form, how is that done ?
Regards
|
|
|
|
|
Hi,
you try to open a CDialog deriven form, or change a view into a Frame, or
open a new Frame within a new view?
I try to help you at my best
|
|
|
|
|
are you talking about .NET Windows Forms ?
if so, you're on the wrong forum.
but if using mfc, use the DoModal() function for instance. see an example[^]
|
|
|
|
|
I used CColorDialog for choosing colour but the color chossen should be displayed in mainframe
S.Yamini
|
|
|
|
|
See Here[^]
Read some of the comments as well, cause there are some solutions too.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Do you want to show selected color or apply this color for background color ?
|
|
|
|
|
yes thats correct
S.Yamini
|
|
|
|
|
yaminisridaran wrote: yes thats correct
oh but Which? not problem
For apply selected color use of WM_CTLCOLOR </code message and you need to a variable for hold return value that is COLORREF for use in the <code>SetBkColor .
-----------------------------------------
For show an intensity value of selected color GetRValue for red GetGValue for green GetBValue for blue .
|
|
|
|
|
Hello all,
I have made a SDI application.On close window of that SDI application(i.e Cross in the upper right corner) i want to show a Message Box when i click on that.
How to do it???
Thanks in Advance...
|
|
|
|
|
Doesn't handling WM_CLOSE message for main frame window helped you ?
Prasad
MS MVP - VC++
|
|
|
|
|
i have written code on ExitInstance
but it first exit the window n then shows the MessageBox....
|
|
|
|
|
Try whatever I said in my oroginal reply.
Prasad
MS MVP - VC++
|
|
|
|
|
Can you just tell me the way of using it
|
|
|
|
|
Add WM_CLOSE message handler for you CMainFrame class. This is the handler called, when you click on cross button.
Prasad
MS MVP - VC++
|
|
|
|
|
Thank you very much
It solved my problem
|
|
|
|
|
Hi All,
I want to generate different GUIDs in my ANSI C++ application. Can anyone help me to do this or can point to a library which i can use?
Regards,
Aamir
Aamir Zia
|
|
|
|
|
Use the CoCreateGuid() or UuidCreate() APIs. If you need to avoid Win32 APIs, the algorithm for generating them is in RFC 4122[^].
|
|
|
|
|
Is this ColorDialog(RGB(255, 0, 0)) a MFC member function
S.Yamini
|
|
|
|
|
yaminisridaran wrote: Is this ColorDialog(RGB(255, 0, 0)) a MFC member function
Probably, you wanted to say CColorDialog[^].
Prasad
MS MVP - VC++
|
|
|
|
|
I used the below coding
CColorDialog dlg(RGB(255, 0, 0), CC_FULLOPEN);
int retval = dlg.DoModal();
if(retval == IDOK)
// retrieve the chosen color
COLORREF color = dlg.GetColor();
but I want to display this color how can I implement it
S.Yamini
|
|
|
|
|
yaminisridaran wrote: but I want to display this color
where ? how ?
you want to pick a color to use it somewhere ?
|
|
|
|
|
Hi,
I have developed an installer for my MFC based application.
I create a new Environment variable at the time of installation.
But my MFC application is unable to access the new Environment variable unless I restart the computer.
Is there any way that I get the newly created Environment varialbe without restarting the computer?
Thanx.
|
|
|
|
|
After you make a new environemnt variable, you need to broadcast a WM_SETTINGCHANGE message.
|
|
|
|
|
Hello,
is there some event that can be registered for a new process that might start in the future?
So far I have a Thread that checks whether there is a new process running and then sleeps for some time.
I dislike using the sleep-function. I'd rather like to register some event for this.
Is there anything like that?
I hope I could make myself clear and I hope you have an answer?
Thank you for reading so far.
regards
-- modified at 19:47 Sunday 15th April, 2007
|
|
|
|
|
Look up "Interprocess Synchronization" and "Synchronization Functions" in MSDN. I've never done this across processes...only interthread, but a quick glance at it suggests it is basically the same.
The concepts you'll be interested in are alertable waits, the function WaitForSingleObjectEx, and probably CreateEvent and SetEvent.
However, this requires that the other process participate in the syncronization and I'm not sure if that is precisely what you were after or if you require the other process your waiting on not have any knowledge or code committed to this syncronization. If that is the case, this will not likely help you much but I thought it worthwhile to put it out there, just in case.
I hope it helps.
|
|
|
|