|
Is it possible to have a base item in a menu have an ID and function associated with it?
ex. File, Edit, View, SayWoop
is it possible to click on SayWoop and have it do something, or do i need to look into putting a CButton into the Menu?
thanks!
-dz
|
|
|
|
|
This is a rather bad solution, but it works (if you use MFC)
Just register a windows message in the system message range with
#define IDM_MYMESSAGE 0x0011 in resource.h)
Then add this to your menu
pMenu->AppendMenu(MF_STRING, IDM_MYMESSAGE, "SayWoop");
Put this in your Message Map (in MyDlg.cpp, where MyDlg is your dialog)
ON_MESSAGE(IDM_MYMESSAGE, OnSayWoop)
and this in your MyDlg.h
afx_msg void OnSayWoop();
and then declare your function
void MyDlg::OnSayWoop()
{
blah blah
}
and then OnSayWoop() is done each time you choose OnSayWoop in the menu.
Well, i´m not pretty proud of this one, but it should work
~RaGE();
|
|
|
|
|
Hello everybody:
I have something weird happening when in a CFileDialog object that I create. From a menu, I choose a command that brings up a Open File dialog. The weird thing is happening when I click the File Type pull down where it says Executable Files (*.exe)|*.exe I able to see in the list the Executable Files (*.exe)|*.exe and under that some garbage. I just want that Open File dialog to have just 1 option (Executable Files (*.exe)|*.exe). This is the code that I have so far:
////////////////////////////////////////////////////////
static char szFilter[] = "Executable Files (*.exe)|*.exe";
CFileDialog openDialog(TRUE,NULL, NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, szFilter);
//Set the title of the dialog.
CString sTitle;
VERIFY(sTitle.LoadString(IDS_OPEN_WITH));
openDialog.m_ofn.lpstrTitle = sTitle;
int nResult = openDialog.DoModal();
if(IDCANCEL==nResult) return;
////////////////////////////////////////////////////////
Is there something that I need to do to correct this problem? I have a screenshot with the problem but I didn't saw anything in this forum that I can post images. Any answer is more than welcome.
Best regards,
Luis E.
Luis E. Cuadrado
)
|
|
|
|
|
You forgot to append two '|' characters at the end of the string
static char szFilter[] = "Executable Files (*.exe)|*.exe||";
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
Ooppsss, I didn't notice that. I put the two "||" and it works. Thank you very much Tomasz for all your help.
Have a nice day,
Luis E. Cuadrado
)
|
|
|
|
|
I use graphics.DrawImage to display a bitmap of 12000 * 8000 pixels (aerial photo).
It is painfully slow on a Pentium 700 Mhz with 512 MB.
But the real problem is : when I zoom on a portion of the bitmap (by setting the parameters of DrawImage to expand for example a portion of 500 * 500 pixels on the whole screen), DrawImage doesn't display anything and immediately returns a status OutOfMemory. Including virtual memory, more than 1 GB is available, but GDI+ doesn't seem to use it (no disk activity). It seems that GDI+ try to allocate memory as if it had to draw the whole bitmap with the same expansion factor, although I just want to display 500 * 500 pixels !
Is there a way to use GDI+ for REAL work ?
JPG
|
|
|
|
|
Anyone knows how the MultiFile Source Filter is replaced in DirectShow 8.1?
I want to merge 2 mediafiles together BEFORE they are decompressed. I've already done this a while ago, in an old dx version (possible 6), but exploring the dx8 docs returns nothing on multiple sources.
Is it left out, or is it replaced by something else (and perhaps better)?
Tnx...
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
If you are talking about compressed AVI then I believe you could use the AVI Mux on compressed streams.
I'm not sure about other media types.
HTH,
Pete
|
|
|
|
|
That's not the problem.
If you add some sourcefilters to that mux, and write it to a file, you get 2 videowindows when trying to watch it. That's nice, 2 windows, but not what I need
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
afaik you have to manually build a graph.
For playback, open with file reader, connect to AVI Splitter, then chose the correct vid stream pin. connect that to a colour space converter(optional), then to a video renderer.
< LAME ASCII DIAGRAM >
| AVI |---o wrong vid stream
|FILE|-->|SPLITTER|---o--------------------->|CLR CoNV|--->|RENDERER|
| |---o wrong vid stream
</LAME ASCII DIAGRAM>
HTH,
Pete
|
|
|
|
|
And what if the 2 clips have the same type, use the same filters? Can I disconnect the first filesource-filter after completion and connect another one to the same avi-splitter?
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
I'm confused. Are you talking about two streams in the same file, or two streams in two files (e.g. standard AVI)?
If you're talking about 1 stream per file, yes I believe you can disconnect then reconnect, but I think it's a bit involved. the microsoft.public.win32.programmer.directx.video newsgroup had a couple of threads about it a while ago, I suggest groups.google.com and searching that ng for "reconnect" or something.
If you are talking about 2 streams in 1 file, you would use 1 filesource and chose a pin from the avi splitter depending on which file you wanted.
HTH,
Pete
|
|
|
|
|
I have noticed that most ADO examples including all MSDN examples use an import to import msado15.dll..
Although importing simplifies the task and gives much more easier to use methods, I was wondering whether this method is robust enough? is the ado dll available on all Windows operating system guaranteed to be msado15.dll or does the name change depending on the version?
|
|
|
|
|
In fact, this is the stupid #import clause in VC 6.0 that needs a file and then gets its typelibrary and then gets th GUIDs. Is it robust ? Well, at runtime, yes, becase what's used is the typelibrary, but at compile time you can have problems, like the "Program Files" folder, in the Portuguese version of Windows is the "Arquivos de Programas"
Crivo
Automated Credit Assessment
|
|
|
|
|
Hi, I want to get an idea on how to create the Slide that is similar to the Power Point.
I believe it uses the ole object for each slide. I am also looking for the solution on how to display the slide in full blown(Full Screen) like power point. Is there any particular API called? For the text fields in the Power point ( where you type the text for display) is that also the ole object? Please let me know. I have been looking for the solution to this feature for a while. If there is a good suggestion or code sample will be helpful. What I am trying to acomplish is to create an apps similar to Power Point. Instead of running the slide automatically or by pussing the down button, I try to let the user to have the whole control and they can jump and display from slide to slide by clicking just the slide. In other word the user insterface will be a slide like you see in the power point slide window.
Thanks for your help
DLEo
|
|
|
|
|
Displaying the slide in Full screen is not really hard. Just create a special window class without border and frames that displays full screen, and you got it. If you want a source code for this, just look the code for the screensaver app sample in the MSDN.
I do not know enough to help you on the other topics (BTW, it _IS_ possible to pass to next slide in Power Point just by clicking on it (I know some of my professor used to take their mouse to get a "remote controled Power Point" before the system which allows to do it through infrared begun to appear)).
~RaGE();
|
|
|
|
|
This may be something simple, but I can't seem to find it anywhere. Does anyone know of a way to get a handle to a process if I know the process ID? What I am trying to do is see if the process is still active by calling GetExitCodeProcess. I am getting the PID by enumerating the processes that are running at a certain time. Technically I could just run through all the running processes everytime I wanted to know if the process was running and compare PIDs, but that seems like overkill. It would be much simpler just to get the handle once, and check at anytime in the future using GetExitCodeProcess.
Thanks,
Mike
|
|
|
|
|
Try
HANDLE OpenProcess(DWORD dwDesiredAccess, // access flag
BOOL bInheritHandle, // handle inheritance option
DWORD dwProcessId // process identifier
);
Crivo
Automated Credit Assessment
|
|
|
|
|
Thanks. I don't know how I missed it. It was right in front of me the whole time. Having my 7 month old son (who is teething) yelling in my ear probably had something to do with it.
Thanks again,
Mike
|
|
|
|
|
How can my app know that D: is my CD-ROM??
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C# and C++!
|
|
|
|
|
Take a look at GetLogicalDriveStrings .
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
After getting the drives from GetLogicalDriveStrings, you need to use GetDriveType and test if the return value = DRIVE_CDROM.
Like it or not, I'm right.
|
|
|
|
|
Jason Henderson wrote:
After getting the drives from GetLogicalDriveStrings, you need to use GetDriveType and test if the return value = DRIVE_CDROM.
Yes,you're right.
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Aah!
That wasn't too much difficult!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C# and C++!
|
|
|
|
|
You can use GetVolumeInformation as an alternative!
Best regards,
Alexandru Savescu
|
|
|
|