|
Cool, yourwelcome.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
Hi,
I want to convert the VC6 code into VS 2008 but i found that they are many different in UI. Any online material or ebook got these information? I had find in web, but no any website got provide the UI functionality compare between VC6 and VS2008.
|
|
|
|
|
the UI of the IDE ? or the UI of the framework (MFC) ?
VS2008 is based on VS2005 which is base on VS2003.net and VS2002.net; which is based (I think) on the VB IDE.
The major differences are the docking windows, different key mapping, the removal of the class wizard; and integration of all languages under on and unique IDE.
Other than that, more specific questions you have ?
Watched code never compiles.
|
|
|
|
|
If you're doing MFC development the FunctionX[^] site is quite good.
However, it seems that their tutorial with screen shots is now showing VS 2010 rather than VS 2008. One difference is that they've brought back ClassWizard in VS 2010. Other parts of the UI might be the same.
It's possible that they may have archived page content for VS 2008. Maybe try emailing them?
Kevin
|
|
|
|
|
I think there is not many differents ,I now in China and many company still use vs6
|
|
|
|
|
Hello Guys
Is there a way to change the name of the exe that gets built during compilation. I want to define flags based on which the exe name should be generated (I donno where to define the flags as well), for example if i define a flag #define MY_EXE "myexe.exe" then the exe name generated should be myexe.exe. If i define a flag #define YOU_EXE "youexe.exe" then the exe name generated should be youexe.exe
Thanx in advance
|
|
|
|
|
|
Is there a way to find out whether a rectangle or a point (given in screen coordinates) is contained in any monitor currently attached to the system?
The background of my question is this: During shutdown, my dialog based MFC application stores its current screen coordinates in the registry. When I open the application the next time, it fetches the coordinates and moves the window to where it had been during the most recent session.
If I move the dialog to my secondary monitor and close it, then unplug the monitor and restart the application, the dialog displays itself on an invisible part of the desktop . In this case, I'd prefer to use the default location - the center of the primary monitor.
|
|
|
|
|
There are several functions that would work.
MonitorFromPoint /MonitorFromRect will give you a handle to the monitor.
You can then use this handle in the function GetMonitorInfo to get more information.
Here is an example from MSDN on how it could be done -
Positioning Objects on a Multiple Display Setup[^]
|
|
|
|
|
Superman, that was a superfast and supergood answer. It works Thanks!
|
|
|
|
|
|
If say a process creates a semaphore/mutex etc then will this semaphore get created in its address space?
If yes then how an another process which wants to acquire this semaphore(created by the first process) will access the first process address space to acquire the semaphore?
Anybody can pls explain me this?
|
|
|
|
|
Semaphores, Mutexes etc. are kernel objects and memory is allocated in the kernel address space.
The processes that access these kernel objects which open handles to the objects.
The kernel object will be deallocated when the last handle referencing the object is closed.
|
|
|
|
|
superman does this reply my question?
|
|
|
|
|
Each process has its own handle table.
When you create a new mutex, memory is allocated elsewhere, but a handle is held within each process that references this mutex.
|
|
|
|
|
Thanks Superman for the inputs.
Ok so this means that the mutex/semaphore will not be allocated in the process address space but in some other shared address space where it will be shared by multiple process/threads. Am I correct?
So when an another thread/process tries to access a shared resource then it will see that the particular resource is protected by a certain mutex/semaphore and then it will try to get the handle to the mutex/semaphore using some mechanism. Is my thinking ok?
|
|
|
|
|
Process/Thread synchronization has to be handled by the programmer.
What I mean is that, for any shared resource intended to be protected by a mutex or semaphore, the wait functions[^] must be used on the handles of these objects so that these resources remain synchronized.
The wait functions will block access till a mutex or semaphore is release using ReleaseMutex or ReleaseSemaphore respectively.
|
|
|
|
|
Hi,
LoadAccelerators function is returning NULL value. im using the following code:
HACCEL m_hAccelTable1;
m_hAccelTable1 = LoadAccelerators(::AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_ACCELERATOR2));
GetLastError function is returning 1814 error value which states that "The specified resource name cannot be found in the image file". The accelerator table is present in the resource file. Anyone please tell me where i did the mistake?
Thanks,
|
|
|
|
|
Check if IDR_ACCELERATOR2 is the right value to pass.
You could even check if that is the right value by opening the .RC file in text mode.
|
|
|
|
|
It is there in the resource file:
/////////////////////////////////////////////////////////////////////////////
//
// Accelerator
//
IDR_ACCELERATOR2 ACCELERATORS DISCARDABLE
BEGIN
"V", IDC_BMP_VIEW, VIRTKEY, NOINVERT
END
|
|
|
|
|
Is the accelerator table resource part of the EXE project or any other DLL that the EXE loads?
|
|
|
|
|
it is in a dll,but i have added the accelerator table in dll only. Another exe loads it.
|
|
|
|
|
In that case the error is in using the AfxGetInstanceHandle function.
Instead use GetModuleHandle with the name of the DLL as parameter.
|
|
|
|
|
|
Is it posible to create accelerator keys in a dll?
|
|
|
|