|
I would like to know if in vc++ we could choose an option which make the debugger more accurate. I already know that there is a difference between Debug and Release.
thanks in advance
gerald
|
|
|
|
|
I would like to know if in vc++ we could choose an option which make the debugger more accurate.
What kind of accuracy do you need?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
There 're some link error in the following
"error LNK2001: unresolved external symbol imp__bind@12"
" error LNK2001: unresolved external symbol __imp__socket@12"
Please notify me how to solve this problem
Best regards,
THomm <tomm_mmx@yahoo.com>
|
|
|
|
|
You should be able to fix it by just adding 'Ws2_32.lib' to your project settings.
Ben Burnett
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
I'm writing a program using DirecX 8.0 in a Win32 environment. This program takes exclusive control over the screen and aquires the mouse using DirectInput. During the course of the program after a set amount of mouse clicks the pc speaker starts beeping for every movement or click (including the keyboard.) I must state that the program's performance isn't affected by what's going on in the background. I'm thinking that the OS's (Windows 9x) internal buffer is overflowing which is what's producing the beeping but I'm not sure. Is there a way to flush the OS's mouse buffer? Is this the solution to the problem?
Thank You,
Shimon
|
|
|
|
|
I have tryed the founction SetItem(icol,&item),but the function returned TRUE only when icol=0,that I cann't set the HeaderControl's image except item0.What's wrong? Thanks for your help.(sorry, my Englishi is so poor
|
|
|
|
|
What in the hell are you talking about ? A listbox ? A listctrl ? A FlexGrid ? Please ellucidate.
Christian
Secrets of a happy marriage #27:
Never go to bed if you are mad at each other. It's more fun to stay up and fight.
|
|
|
|
|
It's a HeaderCtrl in a ListView
|
|
|
|
|
Not in Control pannel.
|
|
|
|
|
I am an intermediate Visual C++ programmer.
I am writing a program which I need to read CPU and Motherboard temperature. I know that I have to get those info from some IO ports. But I don't know.
I appreciate any kind of help on this project.
I can also make an affiliate thing or anything. I am desperately in need!!!
Thanks in advance
Damon
|
|
|
|
|
Can anyone tell me how I can save a file which has a custom extention and set the icon programatically ? I want to make the icon a preview of the image in the file. I don't care if I register the filetype with Windows or not.
Thanks
Christian
Secrets of a happy marriage #27:
Never go to bed if you are mad at each other. It's more fun to stay up and fight.
|
|
|
|
|
Hey Christian,
What you're after is an icon handler extension. Michael Dunn has an article on this here which you may be interested in. That's the part for changing the icon at least.
To get an icon as required, I'd create a correctly-sized bitmap, put it into an image list, extract the icon and then use that as the icon to be displayed as required by the shell extension. The article has all the details on how to write the shell-extension itself. There's probably a better way of generating the icon but that's the first thing that popped into my head.
Hope that helps,
> Andrew.
|
|
|
|
|
Cool - thanks.
Christian
Secrets of a happy marriage #27:
Never go to bed if you are mad at each other. It's more fun to stay up and fight.
|
|
|
|
|
I have added several variables (all doubles) to a class. They appear in the header file as public doubles. They also appear in the class. When I try to access them some are there, and some error out as undeclared identifiers. Where, Oh Where have I failed.
Richard
|
|
|
|
|
So you're saying that in your header you have
double d1, d2, d3, d4;
and in your cpp file you try to use these variables and they are not there ? Or from somewhere else ? Because it's not clear - if it's not somewhere else, why does it matter they are public.
If you posted some code I could help you.
Christian
Secrets of a happy marriage #27:
Never go to bed if you are mad at each other. It's more fun to stay up and fight.
|
|
|
|
|
I have SDI app with Doc/View support.
I want to add a member variable m_MyList (based on a CListCtrl's derived class CMyListCtrl) to CMyView class.
So i put #include "MyListCtrl.h" in MyView.h (otherwise compler won't know what m_MyList is)
*********************************************
CMyView.h:
#include "MyListCtrl.h"
class CMyView : public CView
{
...
CMyDoc* GetDocument(); //error C2501
...
CMyListCtrl m_MyList;
...
};
*****************************************
In MyListCtrl.cpp I want to get the pointer to CMyView like this:
CMyView *v=(CMyView *)GetParent()
But compiler will complain that it doesn't know what CMyView is. The moment I #include "MyView.h" on the top of MyListCtrl.cpp I'm getting error C2143 and C2501. (Because it it circular refrence). How to solve this problem?
By the way, (assuming I don't have my new class CMyListCtrl yet) why line CMyDoc* GetDocument(); dosn't bomb ????????
How does compiler know what CMyDoc is ?????. There's no #include "MyDoc.h" in CMyView class definition.
error C2143: syntax error : missing ';' before '*'
error C2501: 'CMyDoc' : missing storage-class or type specifiers
Any comments?
Thanks,
Jerzy
|
|
|
|
|
Instead of including "MyListCtrl.h" in MyView.h, put the next line:
class CMyListCtrl; // just to let compiler know about your type
and include "MyListCtrl.h" from the cpp file.
I vote pro drink
|
|
|
|
|
I’m afraid it still doesn’t work.
CMyView.h file:
class CMyListCtrl;
class CMyView : public CView
{
...
CMyListCtrl m_MyList;
...};
I´m getting error C2079: ´m_MyList´ uses undefined class ´CMyListCtrl´
Any ideas?
Thanks,
Jerzy
|
|
|
|
|
The best way is to make the member variable a pointer to the class
class CMyListCtrl; // instead of #include "MyListCtrl.h"
class CMyView : public CView
{
..
..
CMyListCtrl* m_pMyList;
.
.
.
}
In the constructor of the CMyView class, you can use
m_pMyList = new CMyListCtrl;
- Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
The best way is to make the member variable a pointer to the class
class CMyListCtrl; // instead of #include "MyListCtrl.h"
class CMyView : public CView
{
..
..
CMyListCtrl* m_pMyList;
.
.
.
}
In the constructor of the CMyView class, you can use
m_pMyList = new CMyListCtrl;
- Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
It works,
Thanks a lot !!!!!!!!!!!!!!
Jerzy
|
|
|
|
|
Hi,
I was wondering if anyone can tell me if the following is possible and how I
would go about doing it:
I have a CBitmap in memory that is created at start up that is 1750 x 2000
and is just an empty bitmap.
I have a list of corrodinates that I want to create CRgn's for, let's say I
have the following
0, 0, 10, 10
25, 50, 35, 60
I then load the Bitmap into a DC, the question is now, how do I create the
CRgn's on this bitmap? I've decided to try and use regions instead of a
color bitmap mask to do my image hotspots. Does anyone see anything that
I'm missing as to why this wouldn't work?
Thanks for any help you can provide,
Craig
|
|
|
|
|
This looks kind of familiar..
You must be in a hurry, codeguru.com??
|
|
|
|
|
Baafie,
Thanks for your reply, yes I have been stressing out on how I'm going to basically create a bmp/jpg that has hotspots to display tool tips and handle click messages.
One thing though, I'm usin the CRgn so I can find out where the user is pointing, I just noticed though that the PtInRegion is specific to one particular region. If I have 50 different regions does that mean I have to keep an array of CRgn objects and iterate through the array so that I can call PtInRegion on each object? This seems like it would be really slow, do you know of a better way to deal with this problem?
Thanks again,
Craig
|
|
|
|
|
There is a much better way to deal with this. Create a mask bitmap that is the same dimensions and marks out your regions in different colours. Use GetPixel to find out the colour of this second bitmap at your mouse position and viola - you have a match. You could create constant COLORREFs like this
const COLORREF MASK_HELP = RGB(255,0,0);
const COLORREF MASK_ABOUT = RGB(0,255,0);
Then you can grab your colour and do a switch statement that uses meaningful values instead of assorted colours.
Christian
#include "std_disclaimer.h"
The careful application of terror is also a form of communication.
Eagles may soar, but weasels don't get sucked into jet engines.
|
|
|
|