|
I guess that I have you guys stumpped!
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
It's easy to cause an internal compiler in VC6! Just add this class to your project:
class CFoo
{
public:
CFoo();
virtual ~CFoo();
};
CFoo::CFoo() {};
CFoo::~CFoo() {}
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Every programmer has been generating compiler errors since their "Hello world", what's your point?
|
|
|
|
|
I was just pointing out another instance of how to generate an internal compiler error in VC6. Sorry if my post upset you.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I was not upset at all, actually I was a little confused by your purpose about generating internal compiler errors.
|
|
|
|
|
Yeah I saw this in April of 2001. I saved it in a file "Crash The Compiler.txt":
CTextView::CTextView
: CCtrlView( "GC_EditClass", 0 )
{
}
I've spent a lot of time working on various compilers, so I can understand how these cases slip through. I was however, quite proud when I found this one, for some reason.
Chris Richardson
|
|
|
|
|
Having spent a while building an audio app, I decided to bastardise some SDK code examples to speed up development, however the classes I have created rely upon "dsutil" and the "dxutil", headers and Cpp files. The Cpp files throw C1010 errors when being complied, claiming "unexpected end of fle while looking for precompiled header directive".
I have experimented with changing the settings on these files to not using precompiled headers, but this is new ground for me and I don't really know whats causing this. Any help much appreciated!!!
|
|
|
|
|
The very first line in those .CPP files should be a #include "stdafx.h" statement.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Thanks for that, I'll go give it a try in a mo. This is a new area for me, I've never needed to include stdafx.h in cpp files in previous projects, whats caused these cpp files to need it?
If this requires a detailed answer, could you point me in the direction of some notes on header directives etc? Thanks again!
|
|
|
|
|
Mad doc`s hairy belly wrote:
...whats caused these cpp files to need it?
Precompiled headers compiler option.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hello all
I've a CEdit control which has multiline and vscrollbar properties set. The problem I'm having is whenever the text exceeds the editbox size vertical scroll bar is not scrolling along with the text downwards. Instead I need to scroll the vertical bar manually to see what's there in the edit box.
If anyone knows how to solve this problem, pls help me.
Many thanks for your help.
Hari.
|
|
|
|
|
You mean if you insert text programmatically, right?
If so, then you must scroll the text manually after setting the caret at the
end (no MFC here...):
int textLength = ::GetWindowTextLength(hWndEdit);
::SendMessage(hWndEdit, EM_SETSEL, (WPARAM)textLength, (LPARAM)textLength);
::SendMessage(hWndEdit, EM_SCROLLCARET, (WPARAM)0, (LPARAM)0);
--
Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. (Douglas Adams)
|
|
|
|
|
Hello Johann
Thank you very much for the reply. Your code solved my problem. Thanks a lot.
Hari.
|
|
|
|
|
Hi,
I've been working on a project for a while, but I have run into a speed bump, my query works fine on any SQL connection to my Informix Database, but I just can't get VC++ to run it. It runs as long as I don't add the COUNT(*) and GROUP BY expressions, but as soon as I add that I get the General error.syntax error. Any help or ideas will be appreciated!! Here it is:
INSERT INTO acnd_upc (upc, dist)
SELECT store_upc.upc, count(*) from store_upc, link_link, store, division
WHERE store_upc.linxscd=link_link.linxscd
AND link_link.store_id = store.store_id
AND store.division_id = division.division_id
AND division.channel_id = 'XX'
AND division.first_cycle != '9999-99'
AND dist = 1
AND upc = '99999999999'
AND date_stamp = (SELECT MAX(date_stamp) from store_upc
where upc = '99999999999')
GROUP by store_upc.upc
Thanks!
|
|
|
|
|
What format is the dist field?
In SQL, aggregate fields like COUNT produce NUMBER(38) values.
You might try re-formatting the result.
I try to think but nothing happens.
|
|
|
|
|
I can get a string from a popup menu item i.e. this way:
//---
...
...
menu = GetMenu();
menu->GetMenuString( id, string, MF_BYCOMMAND );
//---
but how can I get the (Windows) Rect of this menu item?
Any ideas?
|
|
|
|
|
If the menu is owner-drawn, then you can call CMenu::MeasureItem(LPMEASUREITEMSTRUCT) which will fill a MEASUREITEMSTRUCT that contains its height & width.
|
|
|
|
|
No, it's not owner-drawn.
Just a simple menu item as 'SaveAs' or 'myfunc'
But it's any idea, I will try this. Thx
|
|
|
|
|
Hey...
I have yet another bitmap question. I used MS Paint to create a bitmap, and I recorded the red, green and blue intensities for each colour I used. In my program, I take these intensities and turn it into COLORREF , using RGB(r,g,b) . Later on, after the user clicks on part of the bitmap, I determine where the click occurred and what the colour is at that point using GetPixel(..) . The COLORREF value returned by GetPixel never matches the original COLORREF value. I have tried re-doing the colours (once again, in ms paint) but it still doesn't work. Are the values that ms paint uses for r g b the same throughout everything?
|
|
|
|
|
Did you save the image as a 24 bit bitmap?
IF yousaved it as 256 color bitmpa it may have messed some of them up.
"It is better to remain silent and be thought a fool than to open one's mouth and remove all doubt." - Abraham Lincoln
|
|
|
|
|
I didn't see that it could be saved as different types. If I save as 24 bit bitmap as opposed to 256 colour bitmap, will end users of this have problems with the colours like I did? Or should that avoid other people having problems with it as well?
|
|
|
|
|
See Terry's post.
I would use windows standard colors if possible. You 256 to choose from.
"It is better to remain silent and be thought a fool than to open one's mouth and remove all doubt." - Abraham Lincoln
|
|
|
|
|
Yeah, I read his post. It was set at 16 before, but I've switched it to 24-bit. I have the colours on my bitmap all sorted out now, it all works just fine. But I'm scared that there will be problems with end users. Are the windows standard colours the 24-bit? Or is it 32-bit or 256? By using 24 bit, and having everything saved in 24 bit, there shouldn't be any problems with people using it who are using more colour right? (just the people using less colour would run into a problem I suppose)
|
|
|
|
|
I would guess that most users would have 16 bit color or higher selected. If you do use a 24bit color bitmap and use a color outside of the windows palete, then that color will not display correctly and your GetPixel will fail.
If you confine you colors to the defaut windows palete, you shouldn't have any problem.
"It is better to remain silent and be thought a fool than to open one's mouth and remove all doubt." - Abraham Lincoln
|
|
|
|
|
what is the default windows palete?
|
|
|
|