|
It works fine.
Thans Dear.
|
|
|
|
|
use CWnd::GetFocus() , it will return you the handle of the windows having the focus...
|
|
|
|
|
hi
I have written this
int status = CView::OnMouseActivate(pDesktopWnd, nHitTest, message);
if(GetFocus()!=GetParent())
GetParentFrame()->SetFocus()->RedrawWindow();
return status;
what i want is it will not redraw window when foucs is on the same window and i clicked.
but in this code it always go in if condition.
Thanks ,
Rushiraj
|
|
|
|
|
Hi,
How to add Html help to an existing mfc Dialog based application.. can u please suggest some ways.
Harsha
|
|
|
|
|
|
I found everything I needed to know about HTML help here:
HTML Help Workshop and Documentation[^]
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
Hi,
I am using this line right now to change statusbar color
m_bar.GetStatusBarCtrl().SetBkColor(RGB(45,200,200));
note:m_bar is CStatusbar variable.
but with the help of this statement i am able to change statusbar color in "visual studio 2003" but not in "visual studio 2005". Any suggestions please.
Harsha
|
|
|
|
|
harsh_2961 wrote: but with the help of this statement i am able to change statusbar color in "visual studio 2003" but not in "visual studio 2005". Any suggestions please.
check libarary you are using
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Hello everybody!
I would like to know if there is any way to block a user from shutting down or logging off the system. Or atleast postpone the shutdown process for a particluar time interval.
Is it possible to do that?
I humbly request to respond me!
Thanks in advance!
regards,
Shalini
|
|
|
|
|
Handle WM_QUERYENDSESSION message is your application. return FALSE to stop the shutdown of logoff process.
if (message == WM_QUERYENDSESSION)
{
if(allow)
{
return TRUE;
}
else
{
return FALSE;
}
}
|
|
|
|
|
overide the WM_QUERYENDSESSION message and return 0. And after you have done your time interval call ExitWindows() to shutdown.
nave
|
|
|
|
|
Handle WM_QUERYENDSESSION and return false from there.. then shutdown the window using InitiateSystemShutdown api
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
How to use the SendDlgItemMessage() function to simulate a click event of button instead of using SendMessage() or PostMessage()?
Thanks & Regards,
Suman
|
|
|
|
|
Use BM_CLICK .
SendDlgItemMessage(IDOK,BM_CLICK,0,0);
|
|
|
|
|
prasad_som wrote: BM_CLICK.
they is no such thing like BM_CLICK .... are you referring BN_CLICK
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
ThatsAlok wrote: are you referring BN_CLICK
No, I'm refering to BM_CLICK[^].
|
|
|
|
|
prasad_som wrote:
No, I'm refering to BM_CLICK[^].
Ohh thanks!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
BM_CLICK Message
An application sends a BM_CLICK message to simulate the user clicking a button.
|
|
|
|
|
Hello,
I have a tricky problem and I hope anyone can point me a solution. I have an C++ Unicode application that received a parameter form the browser. If the parameter is a Greek word for example, I get something like this &u=%u03C5%u03B2%u03AD& (html entities). Does anyone know an efficient method to convert the html entity into the Greek character?
Thanks.
|
|
|
|
|
micutzu wrote: &u=%u03C5%u03B2%u03AD&
one doubt. In the above string does 03c5,03b2... represents some Greek character?
nave
|
|
|
|
|
Yes. They are. I want to obtain the unicode character represented by 03c5.
|
|
|
|
|
I think the below code will work..
wchar_t* ptext = _T("%u03C5%u03B2%u03AD&");
wchar_t* pEntity = new wchar_t[ _tcslen( ptext ) + 1];
_tcscpy( pEntity, ptext );
/// in u r case u can start from here
wchar_t pGreek[50] = {0};
int ncount = _tcslen( pEntity );
int nChar = 0;
wchar_t *pStart = pEntity + 2;
for( int i = 0, j = 0; i< ncount-2; j++, i += 6 )
{
*(pStart + 4) = 0;
*(pStart + 5) = 0;
swscanf( pStart , _T("%x"), &nChar );
pGreek[j] = nChar;
pStart+= 6;
}
AfxMessageBox( pGreek);
delete[] pEntity;
nave
|
|
|
|
|
Hi All.
I have some simple problem.
In my program, I use
HANDLE FindFirstFile(
LPCTSTR lpFileName,
LPWIN32_FIND_DATA lpFindFileData
);
I Have problem if I wont to find all files in folder.
I cant write:
FindFirstFile("C:\\My File\\*",&FileData);
or
FindFirsttFile("C:\\My File\\*.*",&FileData);
Thanks for any help.
|
|
|
|
|
I think you need to read the documentation[^] once again.
The first parameter is a handle, not a string. This handle is retrieved by calling FindFirstFile.
|
|
|
|
|
Sorry I use FindFirstFile and not FindNext.
it wos my mistake.
|
|
|
|