|
Actually i am using hooking technology. ya, i want what the user deleted. U r assumption is correct.
e.veera raghavendra
|
|
|
|
|
You can write a keyboard hook to do that. Look for SetWindowsHookEx Win32 API function.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I am trying to handle drawing a header control so that I can support
multi-line items. It tried both owner and custom draw but neither will tell
me the control is 'hot' when the mouse is over it. Everything is ok if I
revert back to standard drawing so the window styles must be right. Can
anyone suggest what is wrong?
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
This may be a simple thing but I,m stuck. In the last function of this class I am trying to show m_image_new. This is not for a serious project I am just learning, but the project will not compile. The class is:-
// dlg_new.cpp : implementation file
//
#include "stdafx.h"
#include "EditTest.h"
#include "dlg_new.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// dlg_new dialog
dlg_new::dlg_new(CWnd* pParent /*=NULL*/)
: CDialog(dlg_new::IDD, pParent)
{
//{{AFX_DATA_INIT(dlg_new)
m_image_new = _T("");
//}}AFX_DATA_INIT
}
void dlg_new::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(dlg_new)
DDX_Control(pDX, IDC_BUTTON_IMAGE, m_image_button);
DDX_Text(pDX, IDC_STATIC_IMAGE, m_image_new);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(dlg_new, CDialog)
//{{AFX_MSG_MAP(dlg_new)
ON_COMMAND(ID_VIEW_NEW, OnViewNew)
ON_BN_CLICKED(IDC_BUTTON_IMAGE, OnButtonImage)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// dlg_new message handlers
void dlg_new::OnViewNew()
{
// TODO: Add your command handler code here
}
void dlg_new::OnButtonImage()
{
//using ::CWnd;
m_image_new.CWnd::ShowWindow( SW_SHOW );
// TODO: Add your control notification handler code here
}
The error I get is that CWnd is not a member of CString.
Please help
regards
Paul
|
|
|
|
|
Try
GetDlgItem(IDC_STATIC_IMAGE)->ShowWindow(SW_SHOW);
instead of
m_image_new.CWnd::ShowWindow( SW_SHOW );
|
|
|
|
|
Thanks, this worked.
Regards
Paul
|
|
|
|
|
Stirfie wrote:
I am trying to show m_image_new
what do you mean ???
i think m_image_new is a CString variable and i completely don't understand
what you're trying to do with this :
m_image_new.CWnd::ShowWindow( SW_SHOW );
"Go as far as you can see,and when you get there you’ll see further" - Unknown
|
|
|
|
|
Today is "2005-6-2", if I add 100 days to it, the day is...? I don't known how to calculate it. for help, thanks.
qqworm
|
|
|
|
|
If you use MFC, you can use the CTime and CTimeSpan classes, they will allow you to do exactly what you are looking for.
|
|
|
|
|
Thanks. Can I spare you some time? What should I do to find the simplest way?
qqworm
|
|
|
|
|
qqworm wrote:
Today is "2005-6-2", if I add 100 days to it
Something like:
CTime Time(2005,6,2,0,0,0);
CTimeSpan Span(100,0,0,0);
CTime NewTime = Time + Span;
[EDIT] I don't use that very often so you have to check if that works, it was just for information... [/EDIT]
|
|
|
|
|
|
cedric moonen wrote:
CTime Time(2005,6,2,0,0,0); // Look in the doc for the "daylight savings time" that you want to useCTimeSpan Span(100,0,0,0);CTime NewTime = Time + Span; // NewTime will hold the time you are looking for
Cool, even i don't know that
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hi,
I have an application (in VC++ 6.0) wherein it displays the images in ListView. So the application starts displaying the images from the Top left corner (0,0).
Now I have added the manifest file (to give XP look to application) in applicatoin resource successfully. (as outlined in the below mentioned link http://www.codeguru.com/Cpp/controls/controls/article.php/c5227/)
The application is having the XP look but the images are displayed from the Bottom left corner.
Please I need some help in understanding
1. Why origin of the ListCtrl is changing
2 .How to set the origin of the ListCtrl to top left corner (0,0) so that the images are displayed from the top left corner (0,0) ?
Any help in this regard is highly appreciated.
Thanks in advance
Thanks & Regards,
Neeraj
|
|
|
|
|
Hi.
This problem has been driving me mad for too long now. I have a 640x480 char array of data. I need to display that in grayscale in a Window (currently using a CFrameWnd). I can't copy it to a 640x480x3 array and use SetDIBitsToDevice - that isn't fast enough (it's for a video application).
At the moment, I am using SetDIBitsToDevice with BITMAPINFO.biBitCount set to 8. The image displays correctly, except not in Grayscale - it's in a psychedelic 256-color palette mapping of some sort - I assume Window's default.
Try as I might, I can't get it to use a grayscale palette. I can't even create a palette from scratch - maybe if I could, I could get this to work. I've read Chris Becke's article on Bitmaps, and checked out forums all over - but nothing seems quite related to what I want to do. I can't believe that it is this difficult!
If anyone has an answer, or can recommend an article that would help... please do!
|
|
|
|
|
|
Hi All!
What's the SDK function of the DeflateRect of MFC
|
|
|
|
|
There is no corresponding function in the SDK. Actually, if you look at the definition of CRect::DeflateRect , you will see that it calls ::InflateRect by negating the parameters.
|
|
|
|
|
Which finger are you using today?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
That's because I have plugged 2 keyboards on my PC so that now I can type twice faster than you!
|
|
|
|
|
Stlan wrote:
I have plugged 2 keyboards on my PC
Stlan wrote:
now I can type twice faster than you!
;)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Dennis L wrote:
What's the SDK function of the DeflateRect of MFC
No SDK available for that, you have to implement that. here is small logic to proceed :-
void MyDeflate(RECT *rect,int left,int top,int right,int bottom)<br />
{<br />
rect->bottom-=bottom;<br />
rect->right-=right;<br />
<br />
rect->top+=top;<br />
rect->left+=left;<br />
<br />
<br />
}<br />
<br />
void MyDeflate(RECT *rect,SIZE size)<br />
{<br />
MyDeflate(rect,size.cx,size.cy);<br />
}<br />
<br />
void MyDeflate(RECT *rect,int x, int y)<br />
{<br />
MyDeflate(rect,x,x,y,y);<br />
<br />
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hey People,
I am finding using VC6 under Virtual PC to be very painful esp. when designing a dialog? Other Apps respond fine. Any Suggestions? I am running the latest VPC, XP, etc.
Thanks,
Davy
My Personal Blog - Homepage
|
|
|
|
|
I suggest using RDP to access the virtual machine instead of using the 'normal' console. a RDP session is much more responsive.
Rutger
|
|
|
|
|
Hello Friends,
It it possible to import c++ function in C program.
For example we can import c program to to cpp using extern "C".Is it possible other way round.
Best Regards
Philip.
|
|
|
|