|
The idea sounds very cool. Thanks a lot.
Also, rather than having a single File->Open command, what if I have two separate File-Opens and manage the composite document with global flags? I can open a document through "open 1st doc" & then signal the flag as "Opened through 1st file" similarly for 2nd doc. And once the 2nd doc is loaded, the composite doc is built. This way the user will be allowed to view just 1 doc or view both. Sounds feasible? Or something's fundamentally wrong with his idea?
|
|
|
|
|
grassrootkit wrote: manage the composite document with global flags
The word 'global' always rings alarm bells If they're part of the document class, that's probably better.
grassrootkit wrote: I can open a document through "open 1st doc" & then signal the flag as "Opened through 1st file" similarly for 2nd doc. And once the 2nd doc is loaded, the composite doc is built. This way the user will be allowed to view just 1 doc or view both. Sounds feasible?
Probably - I had a single document for both the 'single file' and 'two files' cases. The document knew what sort of document it was (one or two files), and managed things appropriately.
It all depends what the requirements are really.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Stuart Dootson wrote: The word 'global' always rings alarm bells
lol yes that would. Actually I planned to bring it in into the design. But to quickly explain you about what I thought I meant them as global. Anyway thanks a lot.. let me get into the lab .
|
|
|
|
|
I want to remove the character '=' and substring "%%&&**" from an input string s. The code below work fine, but if there are multiple substring, the code will only remove the substring once.
#include <stdio.h>
#include <string.h>
char *Mystrcpy1(char *s, const char *cs);
void func1(char *src, char *sub);
int main(void)
{
char s[32], *substr = "cc";
Mystrcpy1(s,"aabbccdd");
printf("From the string: \"%s\"\n",s);
printf("We will attempt to remove substring \"%s\"\n",substr);
func1(s,substr);
printf("Using function Mystrcpy1. The result: \"%s\"\n\n",s);
return 0;
}
char *Mystrcpy1(char *s, const char *cs)
{ /* Copy from beginning of string cs to the end */
char *s1;
const char *cs1;
for(s1 = s,cs1 = cs; '\0' != (*s1 = *cs1); s1++,cs1++) ;
return s;
}
void func1(char *src, char *sub)
{ /* Using function Mystrcpy1 */
char *p;
if ((p=strstr(src,sub)) != NULL)
Mystrcpy1(p,p+strlen(sub));
return;
}
|
|
|
|
|
nyc_680 wrote: The code below work fine, but if there are multiple substring, the code will only remove the substring once.
Repeating the process (until there is no match found) will help you.
- ns ami -
|
|
|
|
|
where should I put the repeting function at?
|
|
|
|
|
void func1(char *src, char *sub)
{ /* Using function Mystrcpy1 */
char *p;
if ((p=strstr(src,sub)) != NULL)
Mystrcpy1(p,p+strlen(sub));
return;
}
instate of this use
while((p=strstr(src,sub)) != NULL)
Mystrcpy1(p,p+strlen(sub));
|
|
|
|
|
Hi i am creating a SAFEARRAY of User define datatype i.e a structure which i described in my .idl file .
Now while creating a SAFEARRAY i have done this ..
IRecordInfo *pRecInfo = NULL;
//CIHPCRInjectorBarcodeData - is my structure
const GUID UUID_CIHPCRInjectorBarcodeDataStruct = __uuidof(CIHPCRInjectorBarcodeData);
shr = ::GetRecordInfoFromGuids (LIBID_HPCRInjectorSetupGTIS45Lib ,
1,0,0 ,UUID_CIHPCRInjectorBarcodeDataStruct ,
&pRecInfo );
SAFEARRAYBOUND rgsBound[1]; //This is one dimensional array.
long *pData;
long lValue , lIndex ;
rgsBound[0].lLbound = 0;
rgsBound[0].cElements = 8 ;
//Now Create SAFEARRAY
SAFEARRAY *psa = 0;
psa = ::SafeArrayCreateEx (VT_RECORD ,1,rgsBound,pRecInfo);
while debugging i found that elements are not getting initiallized ..
Please help
|
|
|
|
|
pandit84 wrote: while debugging i found that elements are not getting initiallized
Define initialised. If you're expecting SafeArrayCreateEx to copy elements into the array for you, I think you're expecting too much. I think you'll find it just uses the IRecordInfo interface to determine how much storage the SAFEARRAY needs.
Have you seen this example[^]?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks...
i have created and used succesfully...
Thanks a lot
|
|
|
|
|
I am using VC++ 6.0 for developement.
I want to know how to find audio file advance properties like "Album","genre" etc
Please let me how to do this in vc++ 6.0
|
|
|
|
|
Different audio files like MP3, WAV, WMA, RA etc. etc. have different file formats.
The properties that you mentioned will be stored in different locations in different file formats.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I need to read a MP3 file.
Please let me know how to do this task
modified on Monday, March 2, 2009 1:05 AM
|
|
|
|
|
I'm pretty sure most audio files store properties like this in id3 tags....
I think id3lib [^] is an opensource C++ api.
|
|
|
|
|
|
Hi all,
I have SDI type application.I want to handle Show Desktop from all options.
like from Quick Launch option,Wnd+D,Show the Desktopn From TaskBar menu, etc.
please can u tell me solution for this.
how can handle all options of show desktop.
please explain me with example.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
What do you mean by "Show Desktop from all options." ?
|
|
|
|
|
I mean all options those are use in Window to show desktop.
Like Wnd+D,Show desktop shortcut,Show desktop shortuct in Quick launch,Show desktop option of Taskbar Menu.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: Like Wnd+D,Show desktop shortcut,Show desktop shortuct in Quick launch,Show desktop option of Taskbar Menu.
All these functions are going to call the same function that iterates through every window handle & minimize them right? Just a ShowWindow(MIN) would do that right? What extra functionality do you think a "show desktop" is doing other than minimizing all windows?
|
|
|
|
|
Ok,Please tell me how can i know when any one of this is called.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
|
Please tell me how can i use it in VC++.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
#define MIN_ALL 419
#define MIN_ALL_UNDO 416 //the other option.
void minAll()
{
HWND lHwnd = FindWindow(L"Shell_TrayWnd",NULL);
SendMessage(lHwnd,WM_COMMAND,MIN_ALL,0);
}
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
Please can u explain me this code and tell me where i can use this,and how can know the all windows are minimzed or not in my application.
please help me for this.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
VuNic wrote: #define MIN_ALL 419#define MIN_ALL_UNDO 416 //the other option.void minAll(){HWND lHwnd = FindWindow(L"Shell_TrayWnd",NULL);SendMessage(lHwnd,WM_COMMAND,MIN_ALL,0);}
i have try this code,this use to minimize all windows.
but i want if all windows are minimized than i do sumthing like Show messagebox.
my aim not to minimize all windows,i want to catch the message when all windows are minimized.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|