|
Does anyone know how to catch the 'Stop Build' event? I need this feature in an add-in. It's the intention to detect when the user has pressed this button while a make is running. So far, I couldn't find anything on the net about this subject.
The add-in framework is made with the Mfc AppWizard (Dll).
Thanks in advance for any help.
Geert Vancompernolle
Belgium
|
|
|
|
|
Hi,
I really have a big problem about sending keystrokes to other applications. i am able to send many of the keys by using keyb_event() . However, i am not able to send keys like .,!'^+%&/()= since these keys do not have any virtual key codes. I am able to send these keys by sending shift or 'alt gr' with some other keys. However, this is not a good solution since it depends on the type of the keyboard.
Thank you for any helps in advance.
Mustafa Demirhan
|
|
|
|
|
Why is it that is some projects I can right click on a class and add a Windows Message Handler (from the menu)and If I go open another project (the one I want to manually add the message handler to) I dont have the option in the right click pull down menu. Also the .clw file is messed up and I dont want to restart the project. So how can I add a message handler without the class wizard method.
HELP
thanks
|
|
|
|
|
See: http://codeguru.earthweb.com/bbs/wt/showpost.pl?Board=vc&Number=164155
Does that help?
|
|
|
|
|
How do I manually add a class to a project without using the class wizard in Visual 6?
I added the name.cpp file to the FileView area under the Source files and put #include name.h" in the appropiate file. But I keep getting an error that says "error C2509: 'ONSIZE' :memember function undeclared" and it is declared in name.cpp. Is there something I'm missing? I'm new to MFC and appreciate you help.
thanks
|
|
|
|
|
You will need to add both the CPP and H files into the project. Right click on the project in the Workspace view and select add files to project. You can then add the cpp and h files. The IDE should automagically put the cpp in the source files section and the h file in the header files section.
If you want to have Classview support for those new classes...And, there may be an easier way to do this but this is how I do it.
Delete the *.clw file from the project folder. After you delete the file, bring up the classwizard. It will then prompt you to create a new file based upon the project files. When its done, your new classes will be included in the list.
Good luck,
Frank
|
|
|
|
|
|
I have been trying to place a background image on a CListCtrl using the SetBkImage(..) function, but have run into a problem. If I use a URL for the image on my local hard drive, then I am able to display the image with no problem, however, If I try to use a bitmap loaded from a resource ( via the CBitmap HBITMAP operator) then I am unable to get the CListCtrl to display the image. For example, the following code works fine:
m_ctrlList.SetBkImage(TEXT("file://c:\\temp\\image.bmp"));
But code such as :
CBitmap bitmap;
bitmap.LoadBitmap(IDB_BITMAP1);
m_ctrlList.SetBkImage((HBITMAP)bitmap);
Will not work at all. Am I simply missing something here, or has anyone else experienced this problem as well. Any information is greatly appreciated!!
|
|
|
|
|
Look at the docs for the LVBKIMAGE struct and you'll see that the hbm member is "Not currently used" which I infer to mean that supplying an HBITMAP for the background isn't supported yet.
|
|
|
|
|
The includes should read
#include <stdio.h>
#include <vector>
sorry about that
|
|
|
|
|
How on earth does one get stuff to compile with VC++ with the language extensions turned off ( compiler switch /Za)?
The following simple program won't compile and generates 102 error - almost all relating to the utility and xstring headers
#include <stdio.h>
#include <vector>
int main(int argc, char* argv[])
{
std::vector<int> m;
printf("Hello World!\n");
return 0;
}
I am running Win2000 pro, VC++ 6.0 (no VC service packs)
Any help will be greatly appreciated !!
|
|
|
|
|
You don't. It cannot be done.
|
|
|
|
|
I'm using GetCapture() to notice when the mouse leaves a CWnd-area. The problem is that this approach seems to block the F-Key events: While the mouse is over such a window, no F-Key events are not delievered. It's MFC...
|
|
|
|
|
There is a library to read ICQ 99a/99b/2000a/2000b database in www.icqroaming.com.
It is very interesting and useful.
|
|
|
|
|
|
It is an ATL component that fire events. I have asked their vb and vc++ examples on how to use the component.
|
|
|
|
|
Hi,
I am working on a MFC app that basically draws its own controls etc on a view that is maximized.
I am having quite some trouble, it seems, with device contexts. I have drawing code in lots of functions all over the place, e.g. when a mouse click comes in, the OnLButtonUp calls a function in my code that does drawing, and sometimes things do not appear on the screen or appear delayed, weird effect.
I am sure I am making a big mistake drawing things directly in reaction to OnLButtonUp() but I have no clue how to do it better.
If someone could give me a set of just the basic pointers how to organize a program like that, I'd be very grateful. The main problem I am having is drawing my GUI elements (Text, Lines, Rectangles).
TIA
Lutz
|
|
|
|
|
Would you be able to use one of the flicker-free drawing classes (here at CP) instead? That will significantly speed up screen updates, since the screen DC only gets written to once; everything else happens in memory.
|
|
|
|
|
You are right, you shouldn't be drawing in response to any event other than a WM_PAINT message.
Generally speaking, you should draw only in the OnDraw() or OnPaint() methods. If it's a view, the OnDraw() method is provided for you. If it's a dialog, then you need to add a WM_PAINT handler and then draw in the OnPaint() method provided by the handler (and the DC that it provides).
Generally speaking, when you click something and want to update, then you invalidate your window (if possible, only the portions of the window you need to update).
The Scribble tutorial that comes with VC++ should be enough to illustrate this for you. Use the Totorials Luke!
|
|
|
|
|
I recvently split my program into two modules (to save computer memory for unneeded components), but this the code in this dll file for some reason can't load Bitmap resource, the command simply doesn't work.
HELP
Joel
|
|
|
|
|
Hi Joel,
We need details if you want to be helped...
Is the bitmap resource in the same DLL or in the EXE?
What function are you using to load the bitmap?
Paolo.
|
|
|
|
|
Hi,
I think maybe I can help you..
But, I needs more information about your problem..
Could you reply to this thead with detail description?
Regardz
-Ryan
|
|
|
|
|
You need to call AfxSetResourceHandle() and pass the HMODULE
of the dll that has the resources in it, before you attempt
to get any data from the resources in the DLL.
Remember to set the resource handle back to the original
afterwards - so that you can load resources from the original .exe file (the default).
Stephen
|
|
|
|
|
I need to use the BROWSE... button to get just the location path.
Should I user CFileDialog for this?
What parameters do I user to get just the location path?
Thank you.
|
|
|
|
|
I have been meaning to write an article on this. I have some sample code that uses the browse button, and a checkbox to switch between the Browse for folder, and browse for file dialogs.
If you like, I can email that to you later on tonight. (As it is at home, and I'm currently at work). Let me know.
Frank
|
|
|
|