|
Compound-document properties. See this thread.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hello guys,
I am wondering if there is a way to get a handler and so to kill the messageboxes created by ::MessageBox() or AfxMessageBox() from other thread?
Or I have no choice but to manually make a class to produce the very same dialogue and kill it by destroy the class.
Thanks alot
|
|
|
|
|
This[^] article that describes an auto-close modal dialog may come in handy.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
You may use FindWindow to retrieve the message box's handle which then you can destroy with DestroyWindow .
Regards,
Alvaro
Give a man a fish, he owes you one fish. Teach a man to fish, you give up your monopoly on fisheries.
|
|
|
|
|
Check out GetLastActivePopup
|
|
|
|
|
Hi,
I need to change a dropdown list button so that its arrow points to right rather than down...
Any advice please?????
Thanks,
Sandrine
|
|
|
|
|
I guess, the easiest way to do it is to process WM_PAINT, WM_MOUSEMOVE, WM_LBUTTONDOWN, and WM_LBUTTONUP in a CComboBox derived class. Mouse messages are needed to get button state (pressed/depressed). In WM_PAINT you are free to draw whatever button you like. The hardest part in the process outlined is to draw all the shadows correctly. Note that the button is not an actual child window, it's drawn in WM_PAINT processing. And, finally you will need to subclass your dialog item if combo-box is created via a dialog template. Enjoy!
Maksim Lepikhin
www.softforpros.com
|
|
|
|
|
I'm trying to compile my DLL and have received help so far, but now I'm getting this error:
error LNK2005: _ceil already defined in libcmt.lib(ceil.obj)
I've tried to include this filename in the 'ignore default libraries' textbox, but it still doesn't help. Does anyone know why this is happening? I looked in the MSDN and I've tried the solutions suggested there, but still no luck.
If it's broken, I probably did it
bdiamond
|
|
|
|
|
I just changed my project settings for the DLL to use MFC in a shared library instead of a static one and it compiles fine now, what gives?
If it's broken, I probably did it
bdiamond
|
|
|
|
|
There are debug/non-debug versions of the libraries.
There are static link and DLL import (aka shared) versions of the libraries.
There are single thread and multi thread versions of the libraries.
Unless you're consistently using the same ones for each component in a project, you tend to see the results you originally got.
For instance, shared-library means at runtime, pull in MFC42.DLL (and MSVCRT.DLL) or, if it's a debug version, MFC42D.DLL and MSVCRTD.DLL.
If you see "already defined in" messages, chances are your project settings (C++ tab, Code generation category, at least, in VC6!) are not consistent, more specifically, the 'Use run-time library' setting.
Here, there are 6 options, and we tend to use Multithreaded DLL or Debug Multithreaded DLL as appropriate.
Any help?
Steve S
|
|
|
|
|
yes, it was a lot of help. Thank you!
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Who can be my mentor in C++ programming pls email me.
@ Or_ange@yahoo.com
C++ Programming
|
|
|
|
|
Go away, we don't want guys like you here!
Don't try it, just do it!
|
|
|
|
|
Ignore Alexander M, he's just being cranky
I don't have time, teching skill, or inclination to do mentoring myself, but you might find the following text books useful as a starting point:
Accelerated C++ (Koenig & Moo) - Beginners C++ book for people with little or no programming experience.
Essential C++ (Lippman) - Beginners C++ book for people with at least moderate programming experience (fluent in another language).
Effective C++ (Meyers) - Useful book on good C++ programming style and basic idioms, targeted at all ranges of skill (although you'll need to know some C++ first). Get the 2nd Edition.
The C++ Programming Language (Stroustrup) - Reference guide to C++ and the standard libraries. Get the 3rd Edition - this is the first one based on the C++ standard.
Once you get more confident with the language (this will probably take at least a few months):
Exceptional C++ (Sutter) - Intermediate to advanced level discussion on C++ idioms
More Effective C++ (Meyers). More advanced topics than his other book in the series, but definitely suitable for an intermediate developer. He also has an Effective STL book that is worth looking at if you will be using the STL frequently.
Advanced level books would include Modern C++ Design (Alexandrescu). Don't even think about getting this unless you have the skill to understand some really scary, cool and powerful idioms relating to template metaprogramming. You'll also need to have a up-to=the-minute state-of-the-art C++ compiler to get this stuff to work, so if you're using an older version of Visual C++ or G++ or something, don't bother
None of the books above cover anything other than C++ and it's standard libraries. If you need a book to cover MFC or any other C++ framework, then you'll need to find a text to cover those separately.
Also if you do get stuck on a specific question, then check the C++ FAQ on this site first for solutions, otherwise someone on this board is likely to be able to help.
Ian Darling
"The trouble with the world is that the stupid are cocksure and the intelligent are full of doubt." - Bertrand Russell
|
|
|
|
|
Why do u write this guy such an essay?
The purpose of this forum is not to ask homework questions!
And this cranky sh*t is not funny at all!
Don't try it, just do it!
|
|
|
|
|
Alexander M. wrote:
Why do u write this guy such an essay?
The purpose of this forum is not to ask homework questions!
He wasn't asking a homework question - he wanted someone to mentor him, rather than write a program that was obviously an assignment. I can't mentor him (and I think that goes beyond the purpose of this site), but I can and did recommend some textbooks which will help him get started, and suggest some guidelines for any further questions he might have (check the FAQ, and be specific).
I also thought you were somewhat abrupt with this guy (hence the cranky remark - which I intended in a good natured manner, even if it didn't come off right) - I think he was genuinely wanting to get started and wanted some help - and comments telling him to buzz off aren't very helpful. When I feel the urge to do that here, I just stay quiet.
Ian Darling
"The trouble with the world is that the stupid are cocksure and the intelligent are full of doubt." - Bertrand Russell
|
|
|
|
|
this.label1.Font = new System.Drawing.Font("PMingLiU", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(136)));
How to change this C# statement to C++ statement?
Please help me.
|
|
|
|
|
Is this a joke?
That simple line statement (made easy in C#) has a little bit of code behind it. Unfortunately in C++ and MFC we have to write these bits ourselves.
I suggest you start by looking at http://www.codeproject.com/staticctrl/clabel.asp?target=CLabel[^]
It is a very good class, written by Norm Almond, that's derived from CStatic. That implements the sort of functionality I believe you want.
Ant.
|
|
|
|
|
I do a project on .NET Visual C++. I use naturely messageboxs in my project.
But When a messagebox is closed by OK buuton, The project is closed completly(An Application::Exit() methot occours). On different projects there isn't any problem about messagebox but on project which I study on there is this problem.( Even if I use direct windows API (messagebox), the error still continues)
|
|
|
|
|
posting a snippet of code of the function that is calling the message box might help.
More info is needed. Try reming out the applicaiton::exit() and see if the app closes after pressing the ok button on the message box.
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Hi
I am new to VC++ and I need to change my mouse cursor whenever my mouse is on the boundary of the button object. The problem is that VC++ allows me to set the WM_SETCURSOR message map but this message is used to set the cursor image of the button if the button style is BS_ICON . I don't want to set the icon image of the button rather change my mouse icon whenever my mouse moves over the boundary. therefore i cannot use SetCusor function for it.
I want to handle this message in the button class only not in the view class.
Can somebody guide me how to do the same? Is it possible ?
|
|
|
|
|
You have WM_MOUSEMOVE message where you get position of cursor and you can compare the point with boundary points of the button and if you need change cursor type.
Regards,
|
|
|
|
|
What you are saying does not seem to make since. A button is just anouther window and as such the message WM_SETCURSOR is all you need to change the cursor as it passes over the button. The statment that "this message is used to set the cursor image of the button if the button style is BS_ICON" does not make since. The cursor image is independent of the window that it's over and it's up to the programmer to change it or accept the default for it.
If you are changing the button image it's because that's what you are telling your program to do. From your description, I would conclude that the reason you only see a change when the BS_ICON style is set, is that you are sending a message to the button instead of setting the cursor.
INTP
|
|
|
|
|
hi everyone
does anyone know how i can round a value up
if you consider the below
a should equal 3
b = 68
a = (b / 30)
thanks
si
|
|
|
|
|
try
a = ( (b + 29) / 30 )
The general case:
int roundup(int n, int div)
{
return (n+(div-1))/div;
}
Steve S
|
|
|
|