Typically, calling DrawFocusRect a second time with the same coordinates erases the rectangle.
What version of Visual C++ are you using? 2003 and later have a hyperlink control (CLinkCtrl) that is not very well documented until VS2008, but still usable. If you want to use it, it is a little tricky to set up since there is no item in the toolbox for it, but if you drop a custom control on the dialog and set the window class to "SysLink" and give it a non IDC_STATIC ID, all the goodies for it come alive and you can add event handlers, etc. It will do all the visited, focused, etc. on its own.
I just jumped into this project, for years the rule was "never delete a line of code". You can imagine the mess and how hard it can be to find the "right" function actually called for a task.
Does anyone know of a tool that will list me all classes, members, functions, struct, etc... that are NOT called or used by anyone else? Something like a linker option perhaps? Project is compiled under Visual Studio 2003.
I tried a few code mapping tools, but with 600K+ lines of code, thousands of classes and fucntions in hundreds of libraries, I need a black-list not a withe-list to compare too.
When I try to create a new project (c#,c++ etc.) on Microsoft Visual Studio Professional edition, I got this error message "Requested registry access is not allowed!" and creation of new project fails.
My OS is Windows Vista Home Basic. This problem appeared recently but I cannot fix it.
Thanks for putting up with my many queries.
I have reached this stage:
// wn = the handle of the current window
#define OUCH MB_ICONEXCLAMATION
HDC dc=GetDC(wn); HDC dc2=CreateCompatibleDC(dc);
char t; BITMAP bm;
.... // Here I set the elements of bm
sprintf(t,"%d: %d * %d, width = %d, %d planes, bpp = %d, pixels at %d",
MessageBox(0,t,"set up hbm",OUCH);
// This displays 0, 600, 600, 1800, 1, 24, 28180544 :: all correct as far as I can see;
// here 28180544 pointed to the pixel array of a valid image (a CGI image of two frogmen)
BITMAP bm3; GetObject(hbm,sizeof(BITMAP),(void*)(&bm3));
sprintf(t,"bm3 is type %d, %d * %d, each row %d bytes, %d planes, bpp=%d, pixels at %d",
// This displays 0, 600, 600, 1800, 1, 24, 0
Please, what happened to my image's pixel array or its address?
I am trying to cache icons but when I store the HICON, the second time around, I get no icon. I think I need to copy the data referred to by the HICON into my cache rather than store the actual handle. How would I copy the data?
Last Visit: 31-Dec-99 18:00 Last Update: 14-Apr-21 18:44