|
CodingLover wrote: ...by referring the MPLAB documentation.
Keep that under your hat.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Currently I am notifying all the open documents like below.
for(POSITION pos = pDocMgr->GetFirstDocTemplatePosition();pos;)
{
pDocTemp = pDocMgr->GetNextDocTemplate(pos);
for(POSITION postemp = pDocTemp->GetFirstDocPosition();postemp;)
{
pDoc = (CMDITabsDemoDoc*)pDocTemp->GetNextDoc(postemp);
pDoc->Notify(somedata);
}
}
But now I only want to notify to the active document. Which function is available to get the active document?
Note : If there are 4 tabs and tab2 is open and I am having focus on some other dialog then also it should return tab2 as active tab. However if application is minimized then it should return NULL or some other indicator.
|
|
|
|
|
You can use CFrameWnd::GetActiveDocument .
This returns the document attached to the currently active view.
|
|
|
|
|
I'm still having trouble writing a Mime list to the Metadata file for IIS on 5.5 and 6.0. My Default Documents was working, but stopped, not sure when I broke it.
I can write the Virtual Path, the asp.net Script Maps, Read write permissions.
The default Docs is the LPWSTR pszDefaultDocs[], and the Mime is pszMimes[].
If anybody with Metadata experience can just take a look at it, perhaps it just something real small I missed.
The last time I worked on it, the Mime array write said I did not submit a safe array. The metedata element type for Mimes is a string array. The element type for default docs is just a string.
LPWSTR pszMimes[] = {
L".application, application/x-ms-application",
L".deploy, application/octet-stream",
L".flv, video/x-flv",
L".manifest, application/x-ms-manifest",
L".msp, application/octet-stream",
L".msu, application/octet-stream",
};
dwNumber = sizeof(pszMimes)/sizeof(LPWSTR);
VariantInit(&var);
hr = ADsBuildVarArrayStr(pszMimes, dwNumber, &var);
if (FAILED(hr)) goto CLEANUP;
if ( SUCCEEDED (hr )) {
hr = pADs->PutEx(ADS_PROPERTY_UPDATE, bstr_MimeMap, CComVariant(var) );
}
VariantClear(&var);
LPSAFEARRAY psaMimes;
psaMimes = _create_W3SVC_MimeMap_Array();
VariantInit(&var);
LPWSTR pszDefaultDocs[] = {
L"index.aspx",
L"Default.aspx",
};
dwNumber = sizeof(pszDefaultDocs)/sizeof(LPWSTR);
VariantInit(&var);
hr = ADsBuildVarArrayStr(pszDefaultDocs, dwNumber, &var);
if (SUCCEEDED(hr)) {
hr = pADs->PutEx(ADS_PROPERTY_UPDATE, bstr_DefaultDoc, var);
}
VariantClear(&var);
|
|
|
|
|
Well I fixed the DefaultDocs, had the keyname wrong, and I reformatted the pszDefaultDocs
So thanks Fixed.
LPWSTR pszDefaultDocs[] = {
L"index.aspx, default.aspx"
};
dwNumber = sizeof(pszDefaultDocs)/sizeof(LPWSTR);
VariantInit(&var);
hr = ADsBuildVarArrayStr(pszDefaultDocs, dwNumber, &var);
if (SUCCEEDED(hr)) {
hr = pADs->PutEx(ADS_PROPERTY_UPDATE, bstr_DefaultDoc, var);
}
VariantClear(&var);
|
|
|
|
|
Well after a day and a half, I can get the pointer, pull the values from the key if there is a key, I can create a new key, and populate the data,
but I can't figure out how to put my data in the safe array.
the PutEx will write the safe array, I just need to get data in it.
My Data
L".application, application/x-ms-application",
L".deploy, application/octet-stream",
L".flv, video/x-flv",
L".manifest, application/x-ms-manifest",
L".msp, application/octet-stream",
L".msu, application/octet-stream",
VariantArray va(cVariants + 1);
SAFEARRAYBOUND saBound = {cVariants, 0};
SafeArray sa(VT_VARIANT, 1, &saBound);
VARIANT varArray;
VariantInit(&varArray);
V_VT(&varArray) = (VT_VARIANT | VT_ARRAY);
V_ARRAY(&varArray) = sa.psa;
for (i = 0; i < cVariants; ++i) {
hr = SafeArrayPutElement(sa.psa, &i, &va.pa[i]);
RETURN_ON_FAILURE(hr);
}
hr = pApp->PutEx(ADS_PROPERTY_UPDATE, bstr_MimeMap, varArray);
hr = pADs->SetInfo();
|
|
|
|
|
Hello,
Im using Win7 64 bit,visual studio 2008.
When i build my application i chosse the Win32 option at the top of the vs2008 menu and i compile the project and what i get is:
I can run the application from the vs2008 environment but at the build directory i dont get the exe file.
But when i try to build under x64 option the buld procces doesnt work.
Any body knows what is the problem?
Thanks.
|
|
|
|
|
columbos14927 wrote: I can run the application from the vs2008 environment but at the build directory i dont get the exe file.
You cannot run the application in the build environment unless the exe file exists. Take another look in your directory tree.
columbos14927 wrote: But when i try to build under x64 option the buld procces doesnt work.
We need more details to be able to offer a suggestion.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Please check the project settings.
Under the project properties>Configuration Properties>General>Output Directory option you will see where the output file is getting created. This setting just might not be there when you are trying to run the project with the X64 option.
Can you please provide more details or fire a search based on the filename on the directory where you expect the exe to be present?
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
Thanks,
The output directory was messed up...
Thanks again
|
|
|
|
|
Hi All,
How can I extract the properties of Visio XML files .VSX ?
|
|
|
|
|
See here[^] for some suggested options.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Additionally to what Richard said, if you are working under windows, MSXML[^] might help you to parse XML files.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
|
hi all,
i get the information about the any file using IShellFolder2::GetDetailsOf Method
means i get file name,size,and other info
but i want info with its column title like Title =Name
Size =..
,but here i dont get the column title so please help me to get it,
please help me for this
thanks in advance.
|
|
|
|
|
|
Seem to be experiencing a bit of weirdness with a static library:
I have two #defines inside of the .lib (hex constants):
#define VAL_ONE 0x14fc
#define VAL_TWO 0x0050
Now, if I execute everything from the .lib as inline function from within the executable source (pretty much make it part of that compilation versus a static library), it works fine, but when it executes within the lib, somehow these values aren't getting assigned correctly to the structure that passes these values on to another function.
MY_STRUCT tmp;
tmp.value1 = VAL_ONE;
tmp.value2 = VAL_TWO;
Am I missing/forgetting something??
|
|
|
|
|
Remember that it is all about substitution at compile time. The values you use when compiling the lib will be used there, and the values you use when compiling the exe will be used there. This means you will have to be careful when changing the values between compilations.
Are you saying that you have the same values in both projects and still experiencing problems?
|
|
|
|
|
The #defines are in the header that gets used in the exe code for pulling in the functions in the static library... so it should be exactly the same. I've used this static library before and never had this issue before, which is even more odd.
The static library is a very plain/small library with only two small functions. There's no MFC, ATL, or anything like that in the static lib.
|
|
|
|
|
Albert Holguin wrote: The #defines are in the header that gets used in the exe code for pulling in the functions in the static library
That is not correct, both the include file and the #define s within it are processed by the compiler, there is no reference to them in the exe or lib file. The actual #define directives are seen and converted to their 'real' values by the preprocessor. If you have different versions of the same directives within your project then you can end up with the situation you are seeing. Alternatively you could have a different set of values in the pre-compiled header file which conflict with the ones you are seeing in your .h file. Without seeing a bit more of your source it's difficult to speculate further as to why this is happening.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I was referring to where the defines are located within the projects. The source isn't that expansive and like I said, if I just move the functions into the header and make them inline so they aren't a separate compilation, it works fine, so there's nothing wrong with the source.
|
|
|
|
|
Albert Holguin wrote: there's nothing wrong with the source.
There obviously is something wrong with the source otherwise this problem would not exist. However without more details it's not easy to guess what.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I think we need to see a bit more of your code. Take a look at the actual values that are generated within the library build for the MY_STRUCT tmp; .
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Do you have the defines in the header you have the funciton deffinition in, and that is included into the exe you are building?
==============================
Nothing to say.
|
|
|
|
|