|
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
|
|
|
|
|
Hi. If I have a bitmap handle created with
h = CreateCompatibleBitmap (...)
can I replace this line to
h = CreateDIBSection (...)
without having to change anything else?
Can I then attach the new handle to a DC and draw in it? Can I then access the bitmap bits
via the ppbits pointer returned from the Create DIBSection?
Thanks,
Mike
|
|
|
|
|
Our company wants to use an AVI file as the splash screen for our new application.
I cannot get the CAnimateCtrl to show the AVI file. I even tried decompressing the AVI file - making it a whopping 30 megabytes - but that didn't work either.
What are my options at this point?
Do I need a third party control?
Do I need to write a custom viewer from the ancient AVIView source code in MSDN?
Do I need to somehow scramble something together from the bizarre MCI API?
|
|
|
|
|
Check out my animation control at http://www.codeguru.com/multimedia/AviCtrl.shtml
(I really should post this here some day...)
HTH, Jens
|
|
|
|
|
Hi everyone,
is it possible to have a ListCtrl in report-style with multiline entries?
TIA, Chris
|
|
|
|