|
Hi,
I have a form view derived from CFormView on which I have placed several buttons,and onclick of the button i.e in LButtonUp handler, it takes the user to a different screen. It takes some time to show up the new screen as some thread processing has to take place for showing up the new screen. After the user clicks on a button and while the processing is going on, if the user clicks on another button my program is asserting. Hence I want to prevent the clicks on other buttons when the processing is going on. The buttons on my view are CBitmap buttons and totally there are 30 buttons. So when the user clicks on one button, I want to prevent him from clcking on all other 29 buttons, in other words I want to prevent the handlers in LButtonDown and LButtonUp from getting called. I want to revert back to normal state when the for view is shown initially and if for any reason the handler function returns and the user has to stay in the current view itself.
Can anyone please help me to do this.
Thanks
Madhavi.
|
|
|
|
|
Just disable the buttons when the user is not allowed to use them.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
Thanks for ur inputs. But it's not a CButton. It is CBitmap which is drawn on the view using BitBlt. I am handling LButtonDown and LButtonUp on these bitmaps by finding whether the point of click is inside the bitmap rectangle or not. Please let me know how I can disable a CBitmap?
Thanks
Madhavi
|
|
|
|
|
Well, if you handle the click, then deciding not to handle it is trivial, surely ? You can't 'disable a bitmap', that is, you can't stop your code from handling the click, nor can you automatically make it look disabled. You need to draw a different bitmap if you want to show it's disabled, and then just ignore the click in your own code.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi all, With some sercuity software if you try to end the task you receive an access denied message like below. Even when the process is running under my user and I'm a local admin on the PC.
---------------------------
Unable to Terminate Process
---------------------------
The operation could not be completed.
Access is denied.
---------------------------
OK
---------------------------
I was wondering where I could find some information on this topic. I've look on msdn, here and google but haven't found much. Really I think I just need a hand on what the topic is called so I know exactly what to research in MSDN.
Thanks all.
Luke
|
|
|
|
|
Sometimes if the process is running as a service, then you cna try stopping the service using the 'services' control panel application instead.
|
|
|
|
|
I don't beleive they are running as a service, can't see it in there. Also, I don't want to know how to kill it, I won't to know in c/c++ how to do they same thing, and I'm not sure where to begin to look, or more to the point what to search for.
Cheers,
Luke
|
|
|
|
|
TerminateProcess
ControlService with SERVICE_CONTROL_STOP
|
|
|
|
|
Hi All,
Can anyone pls post the code to import a X509 certificate to a PKCS 11 Token ?
Thanks & Regards
Raj
|
|
|
|
|
are u find the correct way to import certificate to pkcs 11 token?
i need the source samples too.
can u post some code?
|
|
|
|
|
are you find the way?
i need it too.
can you post it to me.
thanks.
|
|
|
|
|
I need to get a HWND (Win32 Window handle) for the Window that is under the mouse pointer.
Do you know how to do this off the back of your hand?
Thank you! I am using wxWidgets in Win32; No MFC/ATL.
-- Andrei B (andreib.com/blog)
|
|
|
|
|
|
It's nice when someone posts the answer, I sometimes browse here to see what problems others have solved for future use
Elaine
The tigress is here
|
|
|
|
|
Hi!
I'm currently making a project in VC++ (MFC) and when suddenly, I encoutered upon this problem. I compiled by program, and tried to execute it. There were no error messages that pop-upped but the app was not running either. So, I debugged the program and stumbled upon an Access Violation on this part:
CxxxxDlg dlg;<br />
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();<br />
So, I tried tracing those lines and never got a clue on how to fix it. Until I renewed the project, imported the resources. I ran it and it works well. But, when I added the class the I wrote, the error came up again. I figured out that the error must be in the class. The code in the constructor in the class when the error came up was:
CTristramCore::CTristramCore()<br />
{<br />
initConstants();<br />
}<br />
I removed the code in the constructor and the error disappeared...
It's really wierd. Does anyone know why it is so?
|
|
|
|
|
|
Ahh.. this is what initConstants do:
void CTristramCore::initConstants()<br />
{<br />
alBotAngle[0] = 4681;
alBotAngle[1] = 29671;
alBotAngle[2] = 29647;
alBotAngle[3] = 23497;
alBotAngle[4] = 31183;
alBotAngle[5] = 18927;
alBotAngle[6] = 29257;
alBotAngle[7] = 31727;
alBotAngle[8] = 31689;
<br />
alWindMagnitude[0] = 22730421;
alWindMagnitude[1] = 28687063;
alWindMagnitude[2] = 28687723;
alWindMagnitude[3] = 33553771;
alWindMagnitude[4] = 32202091;
alWindMagnitude[5] = 32202751;
alWindMagnitude[6] = 28683627;
alWindMagnitude[7] = 33554431;
}
All it does is set values in an array (-.-)
|
|
|
|
|
And alBotAngle has got 9 elements?
And alWindMagnitude has got 8 elements?
|
|
|
|
|
Just some checks.
both arrays are having 9 and 8 elements respectively. Is it intentional?(
One very optimistic way, try to comment line one by one
-- modified at 1:44 Friday 28th October, 2005
Oh ! O! I've same suggestion as Kakan
|
|
|
|
|
NeverFall wrote: All it does is set values in an array (-.-)
How is alBotAngle and alWindMagnitude defined in the class?
-prakash
Learning Symbian | Personal views
|
|
|
|
|
They're defined as private.
Declaration:
long alBotAngle[9];<br />
long alWindMagnitude[8];
|
|
|
|
|
CxxxxDlg dlg;<br />
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();<br />
<br />
CTristramCore::CTristramCore()<br />
{<br />
initConstants();<br />
}
how is CTristramCore initiated in the dialog class?
Sorry, i am asking too many questions, just trying to get to the Root cause
-prakash
Learning Symbian | Personal views
|
|
|
|
|
It is declared in the dialog class under the private section:
<br />
private: <br />
static UINT SetToTop(LPVOID pParam);<br />
void SetToTopEx();<br />
<br />
void updateFireAxis(int iFireAxis);<br />
void initiateMainCall();<br />
<br />
CTristramCore CoreEngine;<br />
<br />
bool m_bRunning;<br />
bool m_bTransparencySupported;<br />
};
|
|
|
|
|
Seems to be very weird, I tried to replicate the logic on my system and I did not get any access violation.
There could be more complex problem.
the statement you said where the exception occurs, seems to be safe.
I am kinda giveing up on this due to less informtion tht I have about your project than you have. Sorry about that.
I suspect if there is something to do with the LHS pointer.
apologies again.
-prakash
Learning Symbian | Personal views
|
|
|
|
|
I've tried to find help on here and I didn't find the answer, or recognized when something did tell me the answer.
First, the dialog question. When I create an SDI or MDI project, the document that's created just has a white space which I draw in. I want to replace that with a tree control and I don't know how to do that. Is that white space something set and called for somewhere or is it just a void? I want to put a tree control in it's place (bevel and all) and I don't see where to do that.
Second, the combo/list box question. How do I make a custom list box like the one in Windows SP2's available wireless network dialog. Under it says "Choose a wireless network" and each large item is in a list box of sorts but it has all kinds of things inside. How do I make that, it won't be as complex as that, but it'll be too complex than just text. I figure I'll override the combo box class but I can't find any info on how to actually do it all.
Thanks in advance, Nate.
|
|
|
|