|
I tried it, no help. It never makes it to the HOOK call back function. So it dies on the SetWindowsHookEx function.
It dies right here:
HandleToHook = SetWindowsHookEx(WH_CALLWNDPROCRET,
WindowsMessageMonitorHook,(HINSTANCE)DLLHandle, 0);
|
|
|
|
|
Is anybody knows how to rebuild MFC files under the folder "Microsoft Visual Studio\VC98\MFC\SRC", I know roughly there are two processes involved, one is to add the "Microsoft Visual Studio\VC98\Lib" to the "path" Environment variable, the other is to nmake certain makefile!But haven't seceed yet!
|
|
|
|
|
I don't know that you can, and I'm sure that you shouldn't. If you want to replace MFC, you should do so explicitly. Changing MFC, and calling it MFC42.dll is a DISASTEROUS idea.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You can: There is a readme.txt in the atlmfc\src path, read it, there are the instructions how to re-compile MFC and ATL.
Don't try it, just do it!
|
|
|
|
|
I have a handle to a button from an external application.
I want to fire that button on that app.
what API call would I use?
Maybe send message? Im not sure?
The app i'm calling is an MFC app and using spy++ the says its "Button"
and I already found the button and window using FindWind and FindWindowEx.
thanks
nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
forget it. I figured it out.
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
I wanted to use source file from the article "A Rich Edit Control That Displays Bitmaps and Other OLE Objects"
By Mike O'Neill
but the zip file is dameged or currupted. Is there anyone who has correct file?. If yes then please send me that file on
aqueelmirza@hotmail.com or aqueelmirza@yahoo.com
Thank you
Aqueel A. Mirza
We Believe in Excellence
|
|
|
|
|
Ask the author.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I know that in Windows95, we use the function _outp and _inp to access the I/O port. But they can't be used in Windows2000. What can I do? Should I have to use some software to develop a driver?
|
|
|
|
|
You must develop a kernel mode driver or may be using the already exist driver such as WinIO.
Best regards,
A. Riazi
|
|
|
|
|
You can use CreateFile & WriteFile [^]
to access to serial port.
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
When I create a MFC application using the wizard and choose it to be maximized and with no maximize button the status bar seem to be misplaced (below the windows task bar?). When I hide my windows task bar and un-hide it again then the status bar is correctly placed. Help appreciated. Thanx
|
|
|
|
|
Can a rich edit control show images and background colors used in .rtf file.
We Believe in Excellence
|
|
|
|
|
|
I don't know how to correctly acquire the device context for a control. If I put similar code in the OnCtlColor routine where a pointer to the device context is provided, the code works. However, when I try setting the device context, the code doesn't work. Two samples are provided - the first is the code that doesn't work. I appreciate any help fixing it. Thank-you.
This code compiles and runs without error, but does not achieve the color change. (c_navValid is a text box control)
LOGFONT lf;
CDC* dc = new CDC;
dc->Attach(c_navValid.GetDC()->m_hDC);
GetFont()->GetObject(sizeof(lf), &lf);
font.CreateFontIndirect(&lf);
dc->SelectObject(&font);
dc->SetTextColor(RGB(0,100,0));
font.DeleteObject();
This code works.
HBRUSH CNavDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
W_Position_Data_Type* pPositionMsg;
pPositionMsg = (W_Position_Data_Type*)&CInMsgs::wPositionMsg;
HBRUSH hbr = CPropertyPage::OnCtlColor(pDC, pWnd, nCtlColor);
if (pWnd->GetDlgCtrlID() == IDC_NAV_VALID)
{
if (pPositionMsg->Mode_Word.Nav_Valid)
{
LOGFONT lf;
GetFont()->GetObject(sizeof(lf), &lf);
font.CreateFontIndirect(&lf);
pDC->SelectObject(&font);
pDC->SetTextColor(RGB(0,100,0));
font.DeleteObject();
}
}
|
|
|
|
|
Use CClientDC or CWindowDC to get a DC for a window. Use the former to draw in the window's client area only, or the latter if you need to draw in the non-client area too.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | 1ClickPicGrabber | NEW~! CP SearchBar v3.0 | C++ Forum FAQ
Wizard needs food, badly!
|
|
|
|
|
Could you please show me the code? To use CClientDC I need a pointer to a window. How do I convert the static control to a window pointer? cCliendDc dc(c_navValid); I know isn't correct. What parameter do I pass to CClientDC to get a dc for the control? Thanks.
|
|
|
|
|
Does anyone know how can I embedd some text into an existant PDF that can indexed by search engines?
I want to hide the embedded text but search engines can index it.
Best regards,
A. Riazi
|
|
|
|
|
Hello,
Can anyone know how can I query windows for its devices.
What I mean is that my program needs to know which modems are installed on the pc and thier ports, etc..
The windows device manager is a good example, I want to know how to get data the device manager displays.
Thanks
Y.R.
|
|
|
|
|
|
Thank you very much.
After posting this message I searched in code project and indeed got to your article "Enumerate Installed Devices Using Setup API[^]". I loved it very much very intresting.
I will read the second one now.
Regards
Y.R.
|
|
|
|
|
A. Riazi
|
|
|
|
|
hi guys,
I need a help.
How to set height of Edit Control?
Please let me know if you have any advices or solutions.
Thank you very much!
Best Regard,
KHLin.
|
|
|
|
|
You can set the height/width of the edit control using any of the following
mehtods.
BOOL MoveWindow(HWND hWnd,
int X,
int Y,
int nWidth,
int nHeight,
BOOL bRepaint
);
HWND CreateWindow(LPCTSTR lpClassName,
LPCTSTR lpWindowName,
DWORD dwStyle,
int x,
int y,
int nWidth,
int nHeight,
HWND hWndParent,
HMENU hMenu,
HINSTANCE hInstance,
LPVOID lpParam
);
Cheers,
Vishal
|
|
|
|
|
I use function shellexecute (0, "open", "filename", "", "path", SW_SHOW) to execute a program and it runs ok. But I want to get the HWND (handle) of this executed file so that i can hide, minimze, or close it. Please help me how to code (in win32 api) to get the HWND. Thanks.
|
|
|
|