|
Two methods,
1. Turn it off with HTML !
either by navigating to the appropriate page or
use MSHTML with insertAdjacentHTML method.
2. Alter the HostInfo After every Navigation the Control
reloads the DocHost info
STDMETHOD(GetHostInfo)
(DOCHOSTUIINFO FAR *pInfo)
{
pInfo->cbSize = sizeof(DOCHOSTUIINFO);
pInfo->dwFlags = DOCHOSTUIFLAG_SGROLL_NO;
return S_OK;
}
Hope this helps somehow!
|
|
|
|
|
Hi there! Is there anyway to open a unicode filename using standard C++ (no SDK/MFC please). I would like to use fstream, but the constructors for both ifstream and ofstream take a const char*. How can I pass in a wide char string containing the filename to be opened (Unicode), as this is a requirement for me? I investigated wfstream, but it seems to be just a cover-up. The doc says it's just a synonym for fstream, and moreover, if you take a look at the class definition of wfstream, you'll see that it internally uses const char* as well. Any suggestions?
|
|
|
|
|
I have a C++ dll(No MFC) in release mode. In the initialization process I read some environment variables and copy them to string variables(members of MyClass). Strangely the values are not copied to the string members. When I debugged the code(release version), the address of this pointer in the constructor of MyClass changes with each line of code!!
MyClass::MyClass
{
...
char* szEnv;
szEnv = getenv("CONFIG_PATH"); // Environment variable
m_sConfigPath = string(szEnv); // m_sConfigPath is a member variable of MyClass of type string(STL)
...
}
For testing purpose, I tried this
char szBuff[100];
strcpy(szBuff,"Hello!");
Even this failed!
Can anybody help me out?
Note: Everything works fine in debug mode.
Thanx,
Jagadish.
|
|
|
|
|
Hi all !
I have done an ActiveX control non-subclassed in which I create a Grid I've done for desktop applications. In that grid, I handle the TAB key to move in the cells and I can edit a cell with a little CEdit derived control. It works fine in destop applications, but in ActiveX control, I have some bizarre behaviours ! The TAB works one time (ie the next cell is selected), but at the second time, the grid loses the focus ! In the same way, the arrow keys don't work in the little cell edit !
Why doesn't my grid work like in a desktop app ?
Thanks for any help !!!
Emmanuel Derriey.
Windows Software Developer.
e-mail : mderriey@hotmail.com
|
|
|
|
|
I've run into this before too. I can't remember the exact solution, but I believe it requires a change to the message routing in MFC. If you do a search in MSDN for activex arrows and MFC I think the knowledgebase article will come up. If I get a chance today, I'll see if I can find the exact link to the article.
|
|
|
|
|
I have inherited some source that contains a large number of very complicated macros.
Is there a why I can print out what those macros expand to when compiled?
Thanks
|
|
|
|
|
Run cl /? and look at the switches listed in the Preprocessor section. You can send the preprocessor output to a file or stdout.
--Mike--
|
|
|
|
|
I need to read and write data in binary format, but working on any platform. For example, a file created on Windows should be read on Unix. I can’t find any info on that. Anyone can give me hints?
TIA.
|
|
|
|
|
Hmmm, I can't see why this would be any great problem. Most importantly you need to make sure that every platform uses the same format for the binary files (but that's a given).
Platform to platform you're going find differences in the number of bits used to represent a value, how arrays are stored, and the whole big-endian, little-endian thing as well.
I think if you stick to using 8 bit bytes and use your own routines for building the binary files, you should be ok?
|
|
|
|
|
Goto
http://chesworth.com/pv/downloads/libs.htm
and download bllib11.zip
This will give you a start.
|
|
|
|
|
Hello,
I would like to hide my application from the taskbar when the user decides to minimize it (and show an Icon in the SystemTray instead - but I don't need help with this).
So how can I make sure, my application does not appear on the taskbar and in the window that is shown when the user presses ALT+TAB. But this only if the window is minimized.
I know that it has been posted already somewhere somewhen, but I really couldn't find it
Best wishes,
Matthias
|
|
|
|
|
Add the extended style WS_EX_TOOLWINDOW to your Mainframe window. I think that'll do it.
|
|
|
|
|
How to execute an executing exe from VC++ ? and to pass the control back to the same program once the exe is closed.
|
|
|
|
|
Hi,
you can do so by launching a process (with ::CreateProcess) and waiting until it's finished (with ::WaitForSingleObject).
Here is how it could look like. This code is raw, add checks on return values and errorhandling.
STARTUPINFO startupi;
PROCESS_INFORMATION processi;
::CreateProcess(NULL, _T("C:\myexe.exe"), NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &startupi, &processi);
::WaitForSingleObject(processi.hProcess, INFINITE);
Check for the retval of the CreateProcess() function!
Hope that helps!
|
|
|
|
|
Hi,
you can do so by launching a process (with ::CreateProcess) and waiting until it's finished (with ::WaitForSingleObject).
Here is how it could look like. This code is raw, add checks on return values and errorhandling.
STARTUPINFO startupi;
PROCESS_INFORMATION processi;
::CreateProcess(NULL, _T("C:\myexe.exe"), NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &startupi, &processi);
::WaitForSingleObject(processi.hProcess, INFINITE);
Check for the retval of the CreateProcess() function!
Hope that helps!
|
|
|
|
|
Can an SDI application support 2 or more Views?? and depending on the commandline parameters the application be opened up with a specified view
|
|
|
|
|
yes. There is a sample in MSDN fot single-doc-multi-view. Sorry I forgot the name. You have to handle the switch/flag by yourself.
HTH,
Wenfei Wu
|
|
|
|
|
How can I peek Windows message such WM_LBUTTONDOWN from a region(rectangle) in a window that is the desired region can not receive the message.(I used the PeekMessage() function but this function unfortunatly peek the message from the window not from the region).
|
|
|
|
|
I'm not sure I understand what you're trying to do. All of the space on the Windows desktop is owned by one window or another, so messages are always sent somewhere.
Are you trying to trap messages in the Non-client area of the window?
|
|
|
|
|
Hi, i want to display a backgrond bitmap image in scrollbars pane. how should i do it. i can't derive my own class from CScrollBar and override DrawItem() cause i can't make it ownerdrawn reason being there is no style like SBS_OWNERDRAW availble. any help highly appreciated.
thanx in advance
mukesh.gupta@promap.co.uk
|
|
|
|
|
I am after info on the best way to structure a large MFC/C++ project, addressing the following points:
- Fastest Compilation Speed
- Minimal dependencies
- Minimal knowledge required to add new classes, i.e. no need to remember all the include files involved
The application consists of about 7 Dll's, each containing related functionality (windows, core, document, reporting)
Most new development requires the use of the main Dll's.
|
|
|
|
|
The Holy Trinity of large projects!!
Here is the best single suggestion I can make: Avoid including headers within headers....I made this mistake with my first large C++ project, and as time went on I realized that any change I made to a header (like adding a new method) had the potential to cause recompiles across the application.
To support this, you'll need to replace the member variable object definitions within your classes with pointer or reference members.
|
|
|
|
|
Hi forum,
how can I get datas from a CDocument-Class to a dialog? Is this possible? The function GetDocument() doesn't work, because CDialog is derived from CObject and not from CView!
Can somebody help me?
Thanks
|
|
|
|
|
1. In MyDlg.h add
#include "MyDoc.h"
2. Add a member variable to you dialog class
CMyDoc* m_pDoc;
3. In the function that creates the dialog - after the dialog is create but before DoModal() - add
dlg.m_pDoc = (CMyDoc*)GetDocument();
|
|
|
|
|
Hi,
I need to draw a series of images to the display as fast as possible. What is the fastest way to do this? Also, is there anyway I can time my updates to vertical blanking to avoid tearing? I can't seem to find any function out there. I know this is available in direct-x, but we cannot use direct-x for this application. Thanks for any help!
Chris Hafey
|
|
|
|