|
Since #define cannot define other preprocessor directives..
eg. #define SOME_MACRO #ifdef something // no way
I suppose I have to preprocess the file before passing it to the C preprocessor, something like m4 on gnu.
Does anyone know of macro processing tool similar for VC++ or how can the above be done??
|
|
|
|
|
Hello,
I have an ATL ActiveX Composite Control dialog. On this dialog I've got a plain old Button. Now I need to know when the user moves the mouse over this button. I've overriden WM_MOUSEMOVE for the dialog, I get only a notification that the mouse is over the button, when the button is disabled.
Please note that in the Composite Control dialog I don't have PreTranslateMessage at disposition (or at least I wouldn't know how to implement it).
I'm pretty sure that there is some fantastically easy solution and I'm just not seing it. Since I'm having "hair-on-fire" mode, every help is highly appreceated.
Thanks a lot.
Matthias
|
|
|
|
|
Hi
I'm only a guru-wannabe so i can't help. You might get some clues from http://www.codeproject.com/miscctrl/subclassdemo.asp
|
|
|
|
|
Hi All :
Not a single one who can give me information about RDS programming with VC++.
Any references or good articles / books . i know there is MSDN and Microsoft.
|
|
|
|
|
How can I simply get the information - handle, etc. of any window under the cursor even if it belongs to another application.
Thanking you in advance.
Happy programming!!
|
|
|
|
|
WindowFromPoint
The WindowFromPoint function retrieves a handle to the window that contains the specified point.
HWND WindowFromPoint(
POINT Point // point
);
Parameters
Point
[in] Specifies a POINT structure that defines the point to be checked.
Return Values
The return value is a handle to the window that contains the point. If no window exists at the given point, the return value is NULL. If the point is over a static text control, the return value is a handle to the window under the static text control.
Remarks
The WindowFromPoint function does not retrieve a handle to a hidden or disabled window, even if the point is within the window. An application should use the ChildWindowFromPoint function for a nonrestrictive search.
Requirements
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
From MSDN ;0)
|
|
|
|
|
Hello people,
I am using MCI commands to play AVI movies and
I would like to draw the frames on a specific region in the window using its device context (HDC of the window).
I know that we can use the Window handle of the target windows as a parent handle for the video, but in my case using the Device Context would be better.
Does someone know if MCI commands can solve this problem?
Thank you for your attention.
Atlus_
Is there any way to perform an AVI playback using the device context (HDC) of a Window. The way I know
|
|
|
|
|
I got a bug report on a program that I wrote saying that when it tries to open the file dialog that it crashes under windows 2000 professional. I used to following function to open a "file open" dialog:
BOOL DlgGetFileName(HWND hWnd,LPSTR lpszTitle,LPSTR lpszFormat,LPSTR lpszFileName,BOOL save)
{ OPENFILENAME of;
int result;
// Initialize the OPENFILENAME members
of.lStructSize = sizeof(OPENFILENAME);
of.Flags = OFN_ALLOWMULTISELECT | OFN_HIDEREADONLY | OFN_NOCHANGEDIR |
OFN_FILEMUSTEXIST | OFN_EXPLORER;
of.hwndOwner = hWnd;
of.hInstance = hInst;
of.lpstrFile = lpszFileName;
of.lpstrFilter = lpszFormat;
of.nFilterIndex = 1;
of.nMaxFile = 5120;
of.lpstrInitialDir = NULL;
of.lpstrTitle = lpszTitle;
of.lpTemplateName = 0;
of.lpfnHook = NULL;
of.nFileOffset = FileOffset;
// Display the dialog
if (save) result=GetSaveFileName(&of);
else result=GetOpenFileName(&of);
return result;
}
Does anyone have any ideas why this would crash? I will give credit for the fix if you help me out... I am thinking there must be a problem with the file open common dialog and windows 2K, maybe windows 2K uses different common dialogs that win 98 or something and my code doesn't take that into account?
Thanks for any ideas,
Jon (webmaster@compumatrix.com)
|
|
|
|
|
The OPENFILENAME struct was made bigger for the Win2K features - you'll need to check the OS at runtime and set the lStructSize accordingly: 76 for 9x/NT4 and OPENFILENAME_SIZE_VERSION_400 for Win2K. MSDN has all the details in the OPENFILENAME page.
|
|
|
|
|
I presume you are passing the correct parameters to the function?
Also, you use the flag OFN_NOCHANGEDIR , but set lpstrInitialDir to NULL. Although if the file anme contains a path, the folder containing the file should be selected, it could be your problem.
Why it should work on Win98 but not Win2K I have no idea.
|
|
|
|
|
Hi
Does anyone know how to access the video memory portion that contains the desktop screen? Does anyone know if it's possible to access this surface directly using CreateSurface in DirectDraw or I definitely have to use GDIs?
Thank you very much for your time!
Susan
|
|
|
|
|
only way I know is:
CWnd * pDesktop = GetDesktopWindow();
CDC * pDC = pDesktop->GetWindowDC();
...
//Mess around with DC
...
pDesktop->ReleaseDC(pDC);
I suppose you could create a copy in memory before BitBlt'ing it back? I'm sure someone else on here has a *much* better way....
|
|
|
|
|
How to get path to application execuable file???
Please send me solution on my email;
piopawlu@interia.pl;
|
|
|
|
|
I just get the value stored in
CWinApp::m_pszHelpFilePath
and do a CString::Replace(".HLP", ".EXE");
e.g
in CWinApp::InitInstance(...)
...
CString strPathExe = m_pszHelpFilePath;
strPathExe.Replace(".HLP", ".EXE");
...
It can't be the best way, but it's always worked for me.
|
|
|
|
|
Does anyone know of any "AOL like Instant Messenger" software that I could integrate into a custom designed application. It doesn't need to work with AOL (or any other proprietary type system). I would just like to give my users the ability to quickly send messages to other users that are logged on. Maybe a simple ICQ chat would do? Any suggestions?
|
|
|
|
|
I seem to remember someone posting a socket-based IM program either here or on CodeGuru.
AlsI think there are a number of OpenSource IM programs, although I don't know which to recommend. Sorry!
|
|
|
|
|
Does anyone know of a revision control system that I could easily integrate into a custom designed application? My users need to be able to check in/out text files and view past revisions. I would like to be able to setup a document server and then add simple menu button to my application to give my users access to the files. All of the revision control systems that I have seen are either a) standalone systems without any integration, b) expensive when you need a site license, or c) bloated with features that my users don't need. Can anyone offer any suggestions?
|
|
|
|
|
Yes, you can use GNU RCS, which comes with source code. However, since it's GPL'd you'll also have to release your source with it.
The other things you can do is simply use RCS standalone executables and just call them from within your program.
|
|
|
|
|
Does anyone have a free line drawing control that can be used in VC6 like the one in VB6? I want to visually
draw lines on a dialog box or CFormView-derived view. The hard way is to implement the OnDraw() event handler,
but doing it visually at design time would be terrific.
|
|
|
|
|
If I've ever needed to draw a line, I've always done a really thin control.
|
|
|
|
|
I'm trying to write a program that will allow reliable transfer of files between computers on a network. It would be very useful if I could list all the uses user names on a network as network Neighborhood does.
Is there a way to do this?
Thank you for any help
|
|
|
|
|
How do I print the GIF file from a VC++ application
|
|
|
|
|
Do you know what the GIF is ? I assume not, in which case you'll need to either
a/ forget it or
b/ pay UNISYS a swag of money.
GIF uses LZW compression, and even if your program doesn't make money, you need to pay them if you support GIF. That's why a lot of graphics software ( mine included ) does not support GIF. Assuming you chose GIF at random, the answer for any other format is you need first to read it in, which entails using a library like paintlib ( www.paintlib.de ), then it's merely a case of stretching it onto a print DC. I say stretch because printers measure size in TWIPs and a screen shot in pixels equates to enough TWIPs to make a small postage stamp.
If you're using Doc/View most of the work is done for you, if not, there are classes on this page that will give you everything you need.
|
|
|
|
|
don't!
if your app reads GIF files, you have to get a license from the Unisys corporation. this applies even if you use an external appliation (like IE) to read and render the image.
use a different format, if possible.
-c http://www.smalleranimals.com
|
|
|
|
|
I would like to create a dialog window from a win32 console program, but i dont know how to go about doing
this. Anyone know how? I created the CALLBACK procedure, and the resource template, but when i go to call
CreateDialog(), i do know what to pass in for the current instance, and the parent window, and NULL does
not work (it will compile, but it won't create the window).
--Dave
|
|
|
|