|
No, it will not work, and you've quite mistracked.
I suggest quickly renaming the interface back or you will corrupt your DirectX SDK installation for certain. If you rename the interfaces in the header files, and compile the code, then during execution, when you call the DirectX methods, you'll most likely cause serious errors. Or at least, your application will not do what it is supposed to. This includes crashing/damaging the OS and/or DirectX run-time.
Each COM object, and each interface they expose is considered unique. The Globally Unique Identifier (GUID) is used to identify these interfaces and objects on a global, around-the-world scale. If you created an interface that had the same GUID as DirectX's IAMTVTuner , then you'd be breaking a major rule of COM programming. In plain english, do not do this. Give your interface a new GUID, period. You can use the GUIDGEN.EXE to generate new GUIDs to use with your NEW interfaces.
If you need to extend the functionality offered by the IAMTVTuner interface, I suggest creating a standard C++ class that queries and uses the interface, while providing public functions that allow the user of class to do the "flunky things" you describe.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
What method do you think is best to control a view from another class, say for instance, a modeless dialog:
A: Let the dialog control the view directly.
B: Let the dialog talk directly to the view and have the view do all the work.
C: Route messages from the dialog to the view and let the view interpret the messages and do the work.
~Nitron.
ññòòïðïðB A start
|
|
|
|
|
In keeping with the MVC pattern and the philosophy of abstraction, I would offer a public method in the view class that exposes the appropriate functionality. This minimizes the contract between the view and its clients.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
In the spirit of weak-coupling, I see option C as the way to go.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
If you don't mind the time of execution (e.g. the delay because of the message qeue) the option C would be my solution.
If you do need to control the time of execution (e.g. when you would send a message, you really want the view to process it imediately), option B would be the choice for me.
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Hai,
I want to know how to set the size of the dialog box dynamically in VC++ win32. Is there any specific function ? Thanks for help.
|
|
|
|
|
CDialog::MoveWindow(x,y,cx,cy);
~Nitron.
ññòòïðïðB A start
|
|
|
|
|
Also SetWindowPos() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Is there any way by which i can get some sort of notifications whenever a new web page is added in IE Favorites
|
|
|
|
|
You could check for file changes to the IE favorites directory. See this[^] article for instructions.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi everyone,
I dramatically need to handle double click messages on toolbar items, and couldn't find a single clue in CP articles.
If someone knows the trick or knows a place where I can find it, i would appreciate his/her help.
Thanks in advance
-MyttO
|
|
|
|
|
Why not add a WM_LBUTTONDBLCLK handler to the toolbar window? In the message handler function, you could detect which toolbar button was double-clicked by translating the mouse position to an item on the toolbar.
One word of warning: if you want to handle a double click and a regular click, then you will need to add some logic to the single click handler to wait and see if the user does a double-click. This is because the messages generated from a double-click look something like this:
WM_LBUTTONDOWN
WM_LBUTTONUP
(so now the command handler for the toolbar button will be invoked)
WM_LBUTTONDBLCLK
(now your double click handler will be invoked)
WM_LBUTTONUP
Hope that helps!
Sincerely,
Alexander Wiseman
Est melior esse quam videri
It is better to be than to seem
|
|
|
|
|
Hi, All
I have two RadioButton and two Editbox, i set one radio button as a default set(Checked)(.) and disable two editbox disable. And other is not checked,
Now if i checked another radio button then the two edit box enable. I am doing SDK programming(Win32 application).
|
|
|
|
|
Send the edit box a WM_ENABLE message with the WPARAM parameter set to either TRUE or FALSE .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Or see the EnableWindow() SDK function
Bikram Singh
|
|
|
|
|
Hello,
I'm working on Visual Studio 7.0 (.NET). I wanted to add a menu and OK; VS adds a menu with ID IDR_MENU3. I've tried about everything to change this id to something representative, but no luck so far.
Has anybody any idea on how to change the id?
(maybe I should add it manually in the rc file, but I do not like that option).
Tnx in advance!
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Hi,
There seems to be something wierd with menu resources and Visual Studio .NET. I noticed that when you right click on the menu resource in the Resource Editor window, the resulting context menu does not list a "Properties" option. I think it should, but you can get around this by doing the following:
1) Make sure the IDR_MENU3 is highlighted in the Resource Editor.
2) Go to the "View" menu in VS.NET
3) Click "Properties Window"
Somewhere in the VS.NET program a properties window should appear. One of the items listed in the properties window says "ID". Its corresponding value should read "IDR_MENU3". Click on the text to get a cursor in order to change it. Hit Enter when finished and it should work.
Hope that helps!
Sincerely,
Alexander Wiseman
Est melior esse quam videri
It is better to be than to seem
|
|
|
|
|
It worked !! tnx a lot!!
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
#define _WIN32_WINNT 0x0500
#include <windows.h>
Lib:kernel32.lib
when I compile my codes,compiler shows a link error:
error LNK2001: unresolved external symbol __imp__CreateTimerQueueTimer@28
and My OS is windows 2000 server,how two resovle this link error,thanks a lot
|
|
|
|
|
Try including windows.h.
Kuphryn
|
|
|
|
|
#define _WIN32_WINNT 0x0500
#define WINVER 0x0500
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
it doesn't work,it is a link error,I think maybe I miss some .lib file,what to do next?
|
|
|
|
|
I have done all that you said,but failured
|
|
|
|
|
Do you have the latest Platform SDK? If not download it from msdn.microsoft.com[^]
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
I downloaded it only two months ago and include directory is set correctly(new directory is on the top of all .h files path)
|
|
|
|