To get the active document:
CFrameWnd *pMainFrame = DYNAMIC_DOWNCAST(CFrameWnd, AfxGetMainWnd());
CFrameWnd *pActiveFrame = pMainFrame->GetActiveFrame();
if (pActiveFrame == NULL)
return NULL;
return pActiveFrame->GetActiveDocument();
HTH
Shyan
The SPs does not update the headers, and you will need the newer header from MS.
Go to MSDN and download the latest Platform SDK. In the IDE, select Tools -> Options, slect Directories tab, add the entry of the SDK include directory to the "Include files" category.
HTH
Shyan
In your CWinApp derived class, locate the InitInstance() function definitions. Within the function, look for the lines:
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
Change it to:
CCommandLineInfo cmdInfo;
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing...
Hi,
You have a pointer to some allocated memory in your class. This almost always means you need to provide:
1. A copy constructor,
2. An assignment operator
Because the default copy-constructor and assignment operator only do shallow copy - they copy the pointer, but not the content the...
You're right that you cannot return a local static array because it is lost upon return. You can add a static array to your class as data member but you risk expose the internal of your class, and synchronization and maintaining the integrity of the two data members becomes an issue.
Of...
Something is not right here...Don't reinstall your installation yet.
__declspec() do not support align() in VC6. It only works on VC.NET.
in VC6, you have to use #pragma pack(16), or its variations:
// Save current alignment setting to interanl compiler stack and
// set alignment setting to...
Are you saying that you have a Win32 GUI application, and within that application, you launch a Win32 console program?
If this is the case, run your console program using the CreateProcess() API. One of its arguments is an address of a STARTUPINFO structure. In this structure, you can...
If the IDs of the groups of radio button is consecutive, you can use:
int iCheckedID = GetCheckRadioButton(ID_FIRST_RADIO, ID_LAST_RADIO);
int iCheckedIndex = iCheckedID - ID_FIRST_RADIO;
If the IDs are not consecutive, you have to construct the index using multiple...
AFAIK, addresses are unsigned values starting from 0.
However, not all programming languages support unsigned type. For those languages, some addresses appears to be negative when view as a signed number.
Shyan
The easiest is to rename your function implementation file from .c to .cpp.
If this is not feasible, try enclose the function defintion with:
extern "C"
{
/* put function defintion here */
...
}
HTH
Shyan
I don't have problem with the code fragment of yours. What kind of project are you trying to build?
The doc for C1600 said it could due to "imcomplete installation". May be you should reinstall VC.NET.
Sorry if this is not helpful.
Shyan
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.