|
I posted a question a little while ago, and someone helped me with using an embedded dialog. It worked, but I have two problems.
1. the dialogs show up ok, but if I hit the Enter key, my dialog disappears.
2. The second dialog has a dialog embedded in a static text control (like it is itself), but the smaller dialog has a Custom Control on it that I'm using for an instance of Chris Maunder's MFC Grid Control. Everything else shows up in the smaller dialog except for the custom control.
Does anyone have any suggestions? Oh, the static control is on a CFormView. I chose to use the CFormView to utilize some of the Doc/View architecture, but I still need the CDialog-derived classes for other purposes.
Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store
My articles[^]
bdiamond
|
|
|
|
|
When you press enter key you get to the OnOK(); and OnClose(); you must set some he on that funktions.
|
|
|
|
|
the custom control wasn't showing up because the style wasn't set right, and the enter button was like the answer to my post said, I just had to overrid trhe OnOK() handler and put a return statement in;
Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store
My articles[^]
bdiamond
|
|
|
|
|
how to download a web-page in C++ (not display it)?
includeh10
|
|
|
|
|
WinInet
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/about_wininet.asp
also check out
http://www.mindcracker.com/mindcracker/c_cafe/wininet/wit0.asp
wWw.KruncherInc.cOm
|
|
|
|
|
It is wise reading the RFC for the HTTP protocol. rfc2616, a page can always be requested, it is just up to you if you want to "display" it or not.
michael
|
|
|
|
|
hi there!
there is very good article or you can say a Utility in Internet section of CP namly AmhttpSocket.
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
What is this? -> uses undefined class
I have 2 dialod windows and I have add the dialog as a member variable like this
CDialog2 m_dialog;
This has work for a while but now I get this message;
'm_dialog' uses undefined class 'CDialog2'
This I get on the dialog1 Is there anyone that nows what it is?
|
|
|
|
|
CDialog1 doesn't know about CDialog2
You'll need to forward declare CDialog2 in the CDialog1 header
class CDialog2;
and then #include "CDialog2.h" in the CDialog1.cpp file.
Michael
CP Blog [^]
|
|
|
|
|
is there some thing similar to CWebBrowser2 in VC?
(except HtmlView).
thx
includeh10
|
|
|
|
|
I was recently looking at a piece of sample code to stop more than one instance of your app from being opened in which is uses a mutex along with your app's GUID. I know how to use the guid generator, but then what? Is a guid automatically generated for a regular mfc dialog app? if not and I create one, what do I do with it? How important is it for you to have a GUID for your app?
Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store
My articles[^]
bdiamond
|
|
|
|
|
See This Link
http://www.codeproject.com/dialog/MessageMgmt.asp#GUIDGEN[^]
Quoted From The Link Above
"
But there is a way around it. There is a program which is part of the SDK, called GUIDGEN. What this program does is create a unique 128-bit binary value. Each time you create a new Globally Unique IDentifier, a GUID, you can be sure that it is really, truly, unique. It is not only unique for you, it is unique for everyone, everywhere, all the time. It incorporates the time and date, the MAC address from your network card (and if you don't have a network card, it uses another method, which has something like one chance in 263 of conflicting with another GUID), and a bunch of other information. Therefore, there is no way, short of explicit collusion between two programmers, that they will use the same GUID.
"
|
|
|
|
|
The reason the GUID is suggested is because they were creating a mutex and or other kernel object. The kernel object name space is shared among all processes on a system. So, using a STUPID name for a mutex like 'SingleInstance' is likely to get you into trouble later on when some other dolt uses the same name. If you name your mutex "MyNiftyApp_07DD65CCE50F46a09840D62B8DFD72C5", then the odds someone else could pick that name 'accidentally', by design, or just genetic cruelty, is extremely small.
|
|
|
|
|
this is more along the lines of what I was looking for. Thanks!!
Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store
My articles[^]
bdiamond
|
|
|
|
|
I've seen this done before, I thought somewhere on this site, but I can't seem to find it. Can anyone point me in the right direction for putting a dialog into a static picturebox control? Any help is appreciated. Thanks
Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store
My articles[^]
bdiamond
|
|
|
|
|
the static is usually used as a placeholder ( or a size and position reference ).
You simply need to create a modeless dialog and Create it in the parent dialog and place ( MoveWindow ) to fit the size of the placeholder.
One thing to remember is to disable the default ok and cancel behaviours so that you don't end up closing the child dialog while the parent dialog is still alive.
here's one example, here on CP :
an example
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
perfect! thanks
Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store
My articles[^]
bdiamond
|
|
|
|
|
how can I create a process and deny it to show any window?
For the first window I can set the flag in the startupinfo but for all the other windows that a process can create how can I hide or destroy them?
here a little example
ZeroMemory(&startupInfo,sizeof(STARTUPINFO));
startupInfo.cb = sizeof(STARTUPINFO);
startupInfo.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
startupInfo.wShowWindow = SW_HIDE;
startupInfo.hStdOutput = NULL;
startupInfo.hStdInput = NULL;
startupInfo.hStdError = NULL;
success = CreateProcess ("c:\\windows\\notepad.exe", "notepad.exe aaa", NULL, NULL, TRUE, CREATE_NO_WINDOW, NULL, NULL, &startupInfo, procInfo);
if (!success){
printf("error");
exit();
}
in this example notepad start successfully, the main window isn't showed but the messagge box appear, I want to hide this messaggebox and every other "window" or message that a generic process can create on the screen, how can I do this?
|
|
|
|
|
Can someone give the way to load a particular form or dialog on execution of an MFC appwizard application?
Drushti
|
|
|
|
|
That depends on how you made the application. If you're using the document/view architecture then just make the view class a CFormView (it's the last step when using the wizard).
If not then use this workaround:
(a) Create a dialog resource, and make a class for it. MAKE SURE TO OVERRIDE THE OnOk and OnCancel functions.
(b) In your application add the dialog as a member variable.
(c) In your applications' OnCreate function, create the dialog by calling CDialog::Create, put WS_CHILD | WS_VISIBLE for the style. DO NOT CALL DoModal.
|
|
|
|
|
I want to compile a source code for my pocket pc. It requires the gcc compiler.
The command to compile is as follow:
arm-coff-gcc -S -o CODE.S -mcpu=strongarm1100 -O3 \
-I/usr/local/lib/gcc-lib/arm-coff/3.1/include -I/usr/include CODE.c
I want to know how can I get a copy of GCC for ARM? Is there anyone know about it?
Thanks,
A. Riazi
|
|
|
|
|
Start at:
http://gcc.gnu.org/
Installation could be difficult. On Windows you might need mingw or cygwin to start with. I'm not sure where to go from there. Even on Unix type systems, installation is not exactly trivial. Take your time, search the web and mailing lists to see who has done this. Read all the documentation you can find, then start installing.
gcc is perhaps the most common compiler for any system other than windows. There are better ones in most cases, but it is hard to argue with free, so gcc gets used everywhere. As a C compiler it is good to excellent, for C++ it works, but that is about all you can say.
P.S. If you don't find useful documentaiton, write a log of what you do. When you get it working post instructions someplace. Others will thank you.
|
|
|
|
|
CString cs="http://company.com/some.html";
CWebBrowser2.Navigate(cs, 0, 0, 0, 0);
if the URL above is unavailable, the html page can not be opened - but how can I know about that programmatically?
thx
includeh10
|
|
|
|
|
Hi all,
Please could someone tell me if there is an event which is triggered when a window has completed painting?
I am using “OnShowWindow”, however, it is not possible to ask questions at this stage regarding button states as the window has not been drawn.
Is there another event which I can us that indicates the completion of the drawing of the window.
Thanks for your help
Phil
|
|
|
|
|
What are you trying to do here ? I don't quite get the scenario
|
|
|
|