|
#hackC++ wrote: I've looked and looked, but i can't seem to find any good articles on pointers....
http://c-faq.com/ptrs/index.html[^]
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Is there a way to detect when a 3rd party application displays a messagebox?
|
|
|
|
|
Write a system wide hook for WH_CBT or something of your choice go through hooks .
Regards,
FarPointer
Blog:FARPOINTER
|
|
|
|
|
Probably not, as a message box is nothing but a dialog (#32770 class). Any application can have one of those displayed.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
For my purposes even counting the number of dialogs created would probably work since the case I'm looking for is the app spitting up an error on startup. I'm working primarily in .net though, and the framework only allows global hooks to be set for keyboard and mouse events. Writing a c++ launcher app's probably more effort than the issue justifies.
|
|
|
|
|
As FarPointer said, a CBT hook is probably the easiest way to do it, since that hook is specifically designed to let an app monitor window creation.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
VB > soccer
|
|
|
|
|
Hello,
I am having some trouble controlling where my buttons in my dialog go when I resize the window. I want a certain group of buttons towards the right of the dialog to sort of move right when the dialog is expanded, however, I can't figure out how this is done in the properties. Can anyone point me in the right direction? Thanks!
|
|
|
|
|
See the code snippet in the Extras section of this article.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Greetings all!
I'd like to create a bar which will have a mixture of the tool buttons and controls (combo, pushbutton, edit, etc).
The CToolBar class will work for the tool buttons but the job of implementing the controls is too involved.
The CDialogBar class will work for the controls but how do I get the tool buttons to work? I've tried a standard button with the BS_ICON style; two problems: 1) button is 16x16, icon is 16x16 but the display lops off part of the icon and 2) how do I get the button to stay "depressed"? I've tried a standard button with the BS_BITMAP style but it: 1) loses the 'transparency' feature of icons, and 2) I still cannot get the button to stay "depressed". The BS_PUSHLIKE style does cause the button to appear to be pushed in on mouse click but does not remain pushed in.
The CReBar class will allow for the wrapping of a CToolBar in one band and the CDialogBar in another band but I'd really like to mix the tool buttons and controls in a more logical order.
So, the upshot is, I'd like to use the CDialogBar with BS_ICON style if the following problems can be fixed:
1) how do I display the full (standard sized) icon?
2) how do I simulate the icon being "depressed"?
Regards,
Kylur.
|
|
|
|
|
- set BS_OWNERDRAW style, and draw yourself in CButton::DrawItem overridden function (you need in this case to create your own class derived from CButton), or an easier alternative is to use CBitmapButton class.
- add BS_AUTOCHECKBOX and BS_PUSHLIKE styles.
Ovidiu Cucu
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks! I appreciate the advise.
Regards,
Kylur
|
|
|
|
|
I have a project to do that requires me to add the "mouse event". The directions says, "Visual C++ doesn't give a control to capture the mouse event.In Design view select application form, under properties window click on an icon event shown as lightning bolt."
I follow the direction but can't find the lighting icon. Could someone help me.
Thanks, Moujan
|
|
|
|
|
HOMEWORK again.
Double check all the tabs in the property panel carefully.
Best,
Jun
|
|
|
|
|
Thanks, I found it. I just didn't look at the four icons on top, I only looked through the controls properties.
Thanks again,
Moujan
|
|
|
|
|
When I created a console application (VC++ .net) it added a file named AssemblyInfo.cpp. What is the purpose of this file?
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
SaRath C wrote: What is the purpose of this file?
The file's purpose is to contain code that is relevant to the project.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Could someone help me to understand, " When the code in a try block does not throw an exception, which of the following is false?"
1. all the catch handlers immediately following the try block are skipped
2. execution resumes with the first line of code after the catch handlers
3. a default exception is thrown
4. none of the function calls within the try block threw an exception
Thanks, Moujan
|
|
|
|
|
Could you have at least bothered to format this question so that it was not screaming
HOMEWORK!
How about spending a few hours studying up on what a try /catch block is/does? Is your education not worth at least that much effort?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
If I would know what a try block is, I would be able to answer the question. I wrote could someone help me to understand what the try block is and give the 4 choices. I didn't ask for the answer, but I ask for understanding the concept. You could it give suggestion what try block. Thanks David
|
|
|
|
|
|
Sorry David i wanted to give 5 but by mistake pressed 1.
Sorry Again.
Regards,
FarPointer
Blog:FARPOINTER
|
|
|
|
|
David, I really didn't mean anyone give me an answer. I posted the question as it was stated to show what I am looking for since I don't know what try block is.
However, I looked through the posting and it seems most of them are homework questions but in a different way. If I offended anyone I am sorry.
Thanks for suggestions, Moujan
-- modified at 15:27 Monday 26th June, 2006
|
|
|
|
|
Moujan wrote: If I offended anyone I am sorry.
I can't speak for others, but I would hardly get offended at someone for asking a homework question. I was simply pointing out to you what a better protocol would be.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|