|
I doubt it. You could write a method that does it by iterating through all the controls and checks their type. Or look, someone else on this site may have done it already.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
good afternoon
I got the problem with memory leak. so I started to debug the code
CB_DBF_NTX* const p = OpenDbfNtxHelper( szDbfName, szIndexName, szIndexKey );
P has the value of 0xccccccc,
CB_DBF_NTX* pDbf = new CB_DBF_NTX( const_cast<char*>( szDbfName ) );
pDbf also has value of 0xccccccc,
but seems like they both have been defined.....would it the problem with CB_DBF_NTX*?
thanks for any info
|
|
|
|
|
valerie99 wrote:
but seems like they both have been defined.....
But did you ever delete them ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi all,
When I call ->EnableWindow(FALSE) on my CListCtrl the control is indeed disabled. But the colors havent changed. I want the user to still see the selected items etc but drawn with greyed out colors like the buttons etc.
Is there any quick way of doing this other than overriding the customdraw stuff?
thanks,
doodlebug
|
|
|
|
|
Hello,
I want to import a c# dll in a vc mfc project. can you help me?
Thanks,
mihai
|
|
|
|
|
|
I have a program that is an SDI. I use much of it just as a menu bar to control other windows on my machine. It would be helpful if I could just attach this menu bar to, say, the top of the screen, or perhaps the top left corner of my screen. Is there a way for me to dock my program to an edge of the screen?
Danny
|
|
|
|
|
Hi folks,
I'm the process of moving the company product from Visual Studio 6 (VC++ / MFC) to studio 2003. Has anyone got any tips they could share with me about pitfalls etc.? Or maybe some website articles on this topic?
It's strange having to get to grips with a new IDE after all this time. There's a few things I can't find (and I've had a good look!). Have MS removed the 'Set active configuration' feature that was in v6? Or have they renamed it? The workspace ("solution"?) I'm upgrading contains 5 projects, each with debug and release configs - can I set which is active, or will I need to close the workspace and open the specific project to achieve the same result?
One more question: can I still use MFC 6 with this version of studio, or will I need to move to MFC 7?
-Dy
|
|
|
|
|
One pitfall I know is this:
In MFC6 the MakeLower and MakeUpper functions of CString make the string object itself lower- or uppercase. In MFC7, the return value is the changed string, the string object itself is untouched.
So, if you are using these functions, keep this in mind...
Geert
Want to spread the newest version of your software automatically for free? Use Updater!
Visit my website: www.gvhsoftware.org
|
|
|
|
|
anything that works on VC6 will also work in VC7 ??
|
|
|
|
|
That depends on your definition of work. Geert has already mentioned that CString::ToUpper() and CString::ToLower() have changed. They still work, but how you use them might have changed.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
For the active configuration, right click in the Solution (the root of the tree in the Solution Explorer) and choose "Configuration Manager". The same option is also in the "Build" menu.
To change the active project, you can right click on a project and select "Set as StartUp Project". It's also in the "Project" menu.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Hi all. I am seen a lot of different sample on the internet and they uses the "::", "." and "->" operators differently even in the same situation. For example, some of them use
ServiceAccount.LocalSystem, and when I compile mine under VC.Net 2003, i must use ServiceAccount::LocalSystem to refer to the Account Type. Can anyone tell me why is it?
|
|
|
|
|
|
In C++, :: refers to a static or namespace member, . refers to a member of a variable and -> refers to a member of a pointer. In C#, it's . all the way.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
HI,
below is a piece of code.
HWND hVWnd;
RECT rRect;
GetWindowRect(hVWnd,&rRect); //I have checked that it returns non zero value
diff_val = rRect.bottom-rRect.top;
If on starting a application if my window is minimized then value of rRect.top and
rRect.bottom is -32000.
Is it a garbage value or any valid error code?
Once my window get normal size it gives me a valid wondow cordinates. (such as 405, 395 ..)
my question is,
when a window is minimize then GetwindowRect's top propery is always -32000.
or it could be any other garbage value.
Waiting for your reply
Many thanks
dipak mistry
|
|
|
|
|
You got your answer here[^] didn't you?
Just use ::IsIconic(..) to determine if a window is minimized. If not, get the client rect.
Geert
Want to spread the newest version of your software automatically for free? Use Updater!
Visit my website: www.gvhsoftware.org
|
|
|
|
|
Thank u very much for quick reply
|
|
|
|
|
I had noticed that the values ALWAYS seem to be the -32000 if it is minimized into the taskbar. I was using GetWindowPlacement, and I don't do that if the window IsIconic any more.
|
|
|
|
|
|
if it is a dll, use regsvr32
Geert
Want to spread the newest version of your software automatically for free? Use Updater!
Visit my website: www.gvhsoftware.org
|
|
|
|
|
that is only good for installing in proc COM servers, not device drivers.
Nunc est bibendum!
|
|
|
|
|
Setupdi functions.
Nunc est bibendum!
|
|
|
|
|
hi,
using my program, i want to start an application, let's say internet explorer, or outlook. afterwards i want to set the focus to this application, move it, and maximize it. i need some help, and here are my questions:
1. to start the program i have tried this function, but it crashes.
_wexeclp((wchar_t*)("C:/Program Files/Internet Explorer/iexplore.exe"),NULL);
It says the arguement list cannot be NULL, but i do not know what to put there as argument.
how can run another application?
2. what function can i use to get the path of the program files "C:\program files"? There is a function called "GetWindowsDirectory", but could not find one for program files.
3. after running the application, i am thinking of capturing it with a hook to set the focus on it, to move and change the size of it. is it right? is there a simpler solution? it won't not only internet explorer that needs to be started. i might need to start another program on some other user event.
Thanks in advance
caykahve
|
|
|
|
|
1. Check out the ShellExecuteEx() function
2.
SHGetSpecialFolderPath(NULL, sTemp.GetBuffer(_MAX_PATH), CSIDL_PROGRAM_FILES, FALSE);
3. See 1
Geert
Want to spread the newest version of your software automatically for free? Use Updater!
Visit my website: www.gvhsoftware.org
|
|
|
|