|
Call GetSystemMenu on your window.
Then you can call DeleteMenu on the close menu item with the SC_CLOSE ID.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Beautiful - thank you for the backup workaround for my problem!
It greys out the 'X' just fine, allowing the '?' to be displayed.
Hopefully there's a way to hide the 'X' altogether though, I'd much prefer that.
: Dean 'Karnatos' Michaud
|
|
|
|
|
Is there any way to send a string to the control to be displayed? I hate writing to a file first and I don't want to use a string resource.
I have seen where you could send "about:your string" to it but haven't tested that.
Am I missing something?
thanks
Like it or not, I'm right.
|
|
|
|
|
I hope that you are comfortable with COM, because here is what you will need to do:
Get the IWebBrowser2 interface from your HTML control.
Use the get_Document method to get the IHTMLDocument interface.
Call get_documentElement to get the root IHTMLElement interface for the document.
then you can call put_outerHTML to set the HTML string that you are interested in.
Good Luck!
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I need to return a pointer to a structure from a method of an interface.
The problem is that VB can't see the ** pointers, so i think i should use VARIANT.
Do you know how?
rechi
|
|
|
|
|
if VB doesn't have to use the pointer, just use a DWORD - VB can treat it like a Long.
-c
ABSURDITY:
A statement or belief manifestly inconsistent with one's own opinion.
|
|
|
|
|
I start up Visual Studio C++ 6, start adding code, set the compiler for debug mode, 30k lines later, everything works fine. Data is in good shape; class instances initialize properly; member functions call each other as they should.
I then go outside of Visual Studio and execute the exe file from within an Explorer window, and pretty soon I get an unhandled exception error. No chance to debug; program just stops.
So, I go back into Visual Studio, load up the program, perform exactly the same set of user steps ... works just fine.
I know this isn't a problem with debug vs release versions, but why won't it run outside of Visual Studio? What am I missing? Can someone point me in the right direction?
Thanks,
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
What is most likely happening is that your debugger is handling the exception automatically when you are running it in the IDE. There is no debugger to handle the exception if you are not running the IDE.
What you should do is change the Debug | Excpetions settings. On that dialog select all of the exceptions, and change their state to Stop always. That way when the exception occurs in your debugger, it will stop and you will be able to trace the problem.
When you are done you can go back into that dialog and reset the exception handlers back to their default state.
Good Luck!
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Well, this may be a bigger problem, but I don't see where the Debug/Exceptions settings are.
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
Sorry. I found it. The debug menu comes up after the program is started. No wonder I couldn't see it.
Thanks,
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
One other thing to check - file paths. Do you open any files, and do you depend on their existence in certain locations? If you go to Project Settings, Debug tab, is there anything in the "Working Directory" path? Try changing that to point to the directory where the EXE is and see if you get the same crash as when running it from explorer.
I think by default, the "working directory" when running under Visual is the directory where the .dsp is.
If you aren't looking for or opening any files, though, this shouldn't matter.
No generalization is 100% true.
Not even this one.
|
|
|
|
|
Thanks, this is worth checking, but I have already seen other instances where expected files were not present and the file open/error handling routines caught them. I wouldn't think this would give me an abnormal termination error, but if I can narrow down more precisely where the error occurs, I may find that it turns out be something simple like this.
Thanks,
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
I need to make my own file dialog because i want features that are not in the standard one. Does anyone know how to make a control that shows all of the files like the one in the standard file open/save dialog.
==================================================
When Your Mind Wonders...Where Does It Go???
|
|
|
|
|
Have you thought about subclassing the standard file dialog?
You could use the common file dialog, give it your own DialogProc, and add the new controls or features that you are interested in.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
sounds like a good idea, but there is only one problem, i have no idea what so ever about subclassing dialogs. Ill look up on it though, thanks.
==================================================
When Your Mind Wonders...Where Does It Go???
|
|
|
|
|
You can add controls to the standard dialog. Look up OFNHookProc in MSDN.
Like it or not, I'm right.
|
|
|
|
|
I had a look at that article, and to be honest i have little to none knowledge of c++ so I did not understand how i would use that function in context.
==================================================
When Your Mind Wonders...Where Does It Go???
|
|
|
|
|
If you use MFC you can enumerate all files like this:
CFileFind cFind;
CString cstrFileName, cstrTempFile;
cstrFileName = "C:\\*.*";
if (cFind.FindFile(cstrFileName))
{
BOOL bFound = TRUE;
while (bFound)
{
bFound = cFind.FindNextFile();
if (cFind.IsDots())
continue;
else
{
cstrTempFile = cFind.GetFilePath();
}
}
}
cFind.Close();
Look up FindFirstFile for the API equivalent.
Like it or not, I'm right.
|
|
|
|
|
See this article.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Is there a way to programically disable/enable the close button on a dialog box (I mean the little "X" in the top right corner)? I don't want to over ride the OnClose() function. I want to gray out the "X" or enable the "X".
Any ideas?
|
|
|
|
|
Call GetSystemMenu on your window.
Then you can call DeleteMenu on the close menu item with the SC_CLOSE ID.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Thanks,
WOrked like a charm.
|
|
|
|
|
Your welcome!
BTW, you may have to remove the separator on the sytem menu as well if that bothers you to have and empty section after the separator.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Hi all,
Is there any way I can intercept GDI calls, i.e. for accessibility or computer-based training apps? I couldn't find any consistent documentation on doing such a thing.
Thanks!
|
|
|
|
|
you can hook those calls, but this is no little task. See for instance Ivo Ivanov's API hooking revealed.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|