Advertisement

stupid VC++ 6 compiler

Started by May 30, 2000 10:17 PM
24 comments, last by Theses 24 years, 7 months ago
A few things to try when MSVC screws up, before you trash it and start a new project:

Rebuild all (duh)
Delete all object files. Rebuild all. (Don''t ask me why, but sometimes this works when the above doesn''t.)
If you are having problems with class wizard or something connected to it, go into your folder and delete the projectname.clw file. This is your class wizard information file. It will regenerate itself if you click view->class wizard and add all files in your project to it in the resulting dialog.
If you are having resource-related problems, go into your folder and delete the projectname.aps file. This is the compiled version of your .res, and when it gets out of synch really nutty things can happen. This will also regenerate itself.
If you are using the resource editor and controls act a bit oddly, open your resource.h and make sure that two control ID numbers did not map to the same number simultaneously. This happens sometimes. Move the number to an open number (preferably the end of the numerical group that you''re in...) and be sure to change the "next valid number" settings at the bottom of the resource.h file. NOTE: messing with your resource.h can be hazardous to your health... only do this if you really have to.

-fel
~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~
Any of you ever get the Linker.exe: linker failed to link incrementally error?

wtf, does it mean? Rebuild all fixed it tho.
There's always something smaller and something bigger. Don't sweat the small stuff and don't piss off the big stuff :)
Advertisement
You should see some of the cryptic borland errors. One time I got a linker error from misspelling a function Name!
a.h{text-decoration:none;color:blue;};a.h:hover{text-decoration:underline;background:red;};

Why is it called a hot water heater? Isn't it cold when it goes in the tank?

[email=jtaylor@gtemail.net" class="h]-=CF=-[/email]
this is pissing me off
ok the whole reason i''m trying to use SCROLLBARINFO is that i want the coordinates of the thumb and if you bother to look at the doc for the structure SCROLLBARINFO one of them is a RECT structure for the thumb coordinates now i could probably avoid all this problem if there were another way to obtain that but i don''t know any other reasonable way
i hope someone knows something to solve this problem besides trying to calculate the coordinates based on everything else
This is not MSVC fault,
because SCROLLBARINFO needs Win98 or NT4, so be sure to define WINVER >= 0x0500

If you want to get the position of the thumb use SCROLLBARINFO to get the position.
The Use GetSystemMetrics() to get the size of the
scroolbar and thumb.

Hope you could use this answer..

PS: You don´t have to include winuser.h manually, because it´s included in windows.h.

Damn, the last structure should have been SCROLLINFO not SCROLLBARINFO.

And use GetScrollInfo() to fill the SCROLLINFO structure.

- Sorry I´m tirred -
Advertisement
i don''t think people are understanding my dilemma
i want the thumb coordinates as in x and y
I DO NOT WANT THE THUMB POSITION
try this code out for size. also you should visit the Microsoft Developer Network regularly.

void CMyWnd::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
if(nSBCode == SB_THUMBTRACK // nSBCode == SB_THUMBPOSITION){
// First determine if the user scrolled a scroll bar control
// on the window or scrolled the window itself
HWND hWndScroll;
if ( pScrollBar == NULL ) hWndScroll = m_hWnd;
else hWndScroll = pScrollBar->m_hWnd;
SCROLLINFO info;
info.cbSize = sizeof(SCROLLINFO);
info.fMask = SIF_TRACKPOS;
::GetScrollInfo(hWndScroll, SB_HORZ, &info);
nPos = info.nTrackPos;
}
//......
//......
}
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
Another thing to check when Visual Studio barfs in the weirdest of ways:
Open your resource.h file, and check for negative(!!!) resource IDs.

I''ve seen this happen, and NOBODY could explain why, but it sure gives weird bugs.


#pragma DWIM // Do What I Mean!
~ Mad Keith ~
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
Wow, VCC sure sounds crappy. Glad I don''t use it! Ooh, and it''s so "visual" too.

This topic is closed to new replies.

Advertisement