|
I'm going to create a temporary window (::CreateWindow()), and then use that to call ShellExecute(). Can anyone see any problems with this strategy? Is there a better way to do this?
Jon Sagara
If you think of wheat fields as questionable metaphors, you can think of me as the state of Kansas.
-- Mike Blaszczak
|
|
|
|
|
It appears you can just pass in NULL for the HWND.
Jon Sagara
If you think of wheat fields as questionable metaphors, you can think of me as the state of Kansas.
-- Mike Blaszczak
|
|
|
|
|
I've looked at the MSDN example, but the pEnum->Next function returns S_FALSE which means that the number of filters that were requested to be enumerated, wasn't enumerated.
IGraphBuilder *pGraph = NULL;
IEnumFilters *pEnum = NULL;
IBaseFilter *pFilter = NULL;
ULONG cFetched;
HRESULT err;
<br>
CoInitialize(NULL);
err = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder,(void**)&pGraph);
pGraph->EnumFilters(&pEnum);
<br>
while((err = pEnum->Next(1, &pFilter, &cFetched)) == S_OK)
{
FILTER_INFO fiFilterInfo;
char szFilterName[256];
pFilter->QueryFilterInfo(&fiFilterInfo);
WideCharToMultiByte(CP_ACP, 0, fiFilterInfo.achName, -1, szFilterName, 256, 0, 0);
SendMessage(GetDlgItem(ghWnd, IDC_FILTERS), LB_INSERTSTRING, -1, (LPARAM)szFilterName);
fiFilterInfo.pGraph->Release();
pFilter->Release();
}
<br>
pEnum->Release();
pGraph->Release();
CoUninitialize();
}
All help is apprecaited! Thanks all
-Rune Svendsen
|
|
|
|
|
Try calling pEnum->Reset(); before enumerating.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Didn't work thanks anyway man.
-Rune SVendsen
|
|
|
|
|
Wait... Seems you're constructing an IGraphBuilder and then enumerating its filters, but an empty IGraphBuilder won't have any. Try using for instance IGraphBuilder::RenderFile on some .avi prior to enumeration.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thankyou i'll try that. But do you know if there's a way to enumerate all the available filters on the current machine?
-Rune Svendsen
|
|
|
|
|
I am trying to do something and the part that sounds the simplest is turning out to the hardest. I am putting a button on a toolbar. What this button will do is allow a user to set the button up to point to an executable. For instace, if the user wants this button to launch solitaire, it goes through the process of having the user find the .exe file. This is simple. The hard part is I am trying to use the icon from the .exe file as the bitmap for my button. And I cannot figure out how to do it. Any ideas? I have looked on this website but haven't found anything, it might be that I don't know where to look exactly...
|
|
|
|
|
Look for ExtractIcon in the documentation.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
In addition to Joaquín's suggestion, you may also want to look at ExtractAssociatedIcon documentation.
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
I have a dialog app that uses timers. It updates fine at first, but then after running for a while it some times doesn't draw all the objects that are on the page. Also, the drop down arrows becomes 6s and some of the buttons just completely disappear. I thought there maybe the system was too busy, but I?ve looked and there is lots of idle time.
Anybody have any clues as to why this is happening? I?m hoping I don?t have to take over drawing each and every object, but if I have to how?
Thanks all!
|
|
|
|
|
Almost surely you're leaking GDI objects (could be fonts, DCs, brushes, etc.) Follow this trail.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I really haven't done anything with DC or painting or really any kind of handling of drawing.
One think though...I'm using ButtonST from this site...any problems with that?
HELP!!!!!!
|
|
|
|
|
I don't think it is CButtonST , which seems a thoroughly tried control. What exactly are you doing in your OnTimer ? If the code for this handler is short enough maybe you could post it here.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
This is one of the smaller timers that I use. Most of the timers are like this one with the exception that they have many more items to check.
if(nIDEvent == 1122)
{
for(short i = Temp_RX; i<(Perm_DR+1); i++)
{
m_mcontrol[i].m_MouseOnButton = iControlstatus[i];
m_mcontrol[i].Invalidate(TRUE);
m_mcontrol[i].UpdateWindow();
}
}
Thanks for the help, much appriciated.
|
|
|
|
|
This is weird! To make sure the problem does not lie in CButtonST , you might want to replace it (for testing purposes) with standard CButton (you'll have also to comment out the code specifically related to CButtonST ). If the error persists, the problem is elsewhere.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hello
I'm trying to run a program from inside my program. I thought that createprocess would be the best way to go. But i'm having a hard time trying to figure it out please help
|
|
|
|
|
try this:
STARTUPINFO siInfo;
PROCESS_INFORMATION piInfo;
siInfo.cb = sizeof(STARTUPINFO);
siInfo.lpReserved = 0;
siInfo.lpDesktop = NULL;
siInfo.lpTitle = NULL;
siInfo.dwFlags = STARTF_USESHOWWINDOW;
siInfo.cbReserved2 = 0;
siInfo.lpReserved2 = NULL;
CreateProcess("F:\\path\\program.exe", "", NULL, NULL, false, NORMAL_PRIORITY_CLASS, NULL, "F:\\path\\", &siInfo, &piInfo);
|
|
|
|
|
thank you i'll try it. what include statements do i need to show
Richard
|
|
|
|
|
Have you ever tryed:
WinExec ("CMD.EXE /C PROGRAM_NAME.EXE",SW_SHOW);
Much easier
|
|
|
|
|
Sorry if i have bothered you so much, but i'm in deep thought on how to change the cursor when the mouse pointer is on a button or on a notified picture...
here's a part of my code ...
case WM_SETCURSOR:
{
HWND hwndStaticw = (HWND) lParam;
if (hwndStaticw = GetDlgItem(hwnd, IDC_WL))
{
SetCursor(LoadCursor(hInstance, MAKEINTRESOURCE(IDC_CURSOR1)));
break;
}
}
return TRUE;
where IDC_WL is the notified picture,
What am i doing wrong... i thing a lot! Please Help...
I'm trying to be calm....
|
|
|
|
|
Where is this code implemented?
Seems like are you assuming that lParam holds a handle to the control below the cursor and, if my mind serves me right, this is not how this message works..
eperales
|
|
|
|
|
Hello ,
I want to create an application similar to the VC++ Dialog Editor.
Can anyone please point me the location of it.
Thanks in advance
Cheers
|
|
|
|
|
|
Hi
I would like to know how can I enable printing options in my application.
It basically has to print a BMP file and bunch of lines on it.
thanks
Ehsan Behboudi
|
|
|
|