|
Hi,
Yes, it was that. If I define my functions inside the DLL as virtual, then the run-time interprets the pointers correctly.
Anyway, I find the same problem as before... just try to store the pointer of your class CMyDLLClass that you pass to your DLL, in a variable that is declared inside another class from your DLL... I cannot do that. I can only store the pointer if the variable is declared globally (outside any class)...
In any case, the code looks much better now, though...
Irene
|
|
|
|
|
Hello,
I'm trying to use the CopyFile function on my XP Pro computer but it keeps returning 5 (a.k.a. ERROR_ACCCESS_DENIED). What do I need to do to make it copy? Do I need to mess with tokens? If so which one?
wWw.KruncherInc.cOm - My cool programs
|
|
|
|
|
|
maybe insufficient access rights?
|
|
|
|
|
Then what do I need to do to have access?
OHHHHHH, I just found out the main problem, XPs not allowing me to copy to the windows directory, so how can I?
wWw.KruncherInc.cOm - My cool programs
|
|
|
|
|
Hi, i want to know how can i connect to different Table in using access DB? I'm using the ODBC method.. As i need to connect to differnet table to get data... plz help me, i want to know how to connect to different table.
Thank you for yr help...
|
|
|
|
|
Are you using MFC? If so, I assume you have a CRecordset object. Its GetDefaultSQL() method contains the name of the table being operated on. Either create another CRecordset that operates on a different table, or change the value being returned by the GetDefaultSQL() method.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I'm making an activex control using VS.Net 2003. The control will probably be used in VB mostly. I want to know how I can have enumerated constants show up (like in VB's MsgBox() function). Also, when I try to put in the return type for a function that would be considered a Boolean in VB, I don't see any data types that would map to VB's Boolean. And the 'Add Method' wizard tells me that I may only specify variant types of variables that are predefined in the list. Any help would be greatly appreciated.
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Hai,
Is there any WM message sent to the main window while displaying another window (eg. a message box) or when that other window moves over the main window?
Thanks a lot.
|
|
|
|
|
When a message box is displayed or any other modal dialog box, then the main window will not be receiving any messages. The main window will receive WM_PAINT messages if there is another window over it (and not as big as it) which moves, because the OS will require the main window to redraw itself if another window on top of it changes position.
In your app, do you create the window which is over the main window? Is it modal or modeless? If it is modal and your app created the sub-window, you should handle the messages sent to that sub-window and then you can send any messages you want to the main window.
Sincerely,
Alexander Wiseman
Est melior esse quam videri
It is better to be than to seem
|
|
|
|
|
Hai,
Thanks a lot for ur reply.
Actually I have a main Dialog where in a particular region I do the drawing.
The problem is I cannot use WM_PAINT to draw. I have a common user defined function that gets the DC for the drawing. My app calls this function at many places and at each time the drawing is different which i manage using flags.
Now if I display a message box which is displayed over the drawing in turn erasing it. Or if I move the message box over my drawing it gets erased.
Since I cannot use WM_PAINT I dont know how to solve this problem.
Is there anyway to get rid of this?
Thanks again.
|
|
|
|
|
You could receive the WM_PAINT message anyway and, when there is a message box over your window, then call your custom drawing function inside the WM_PAINT message handler.
Is the WM_PAINT message being sent at all in your app right now, or are you just discarding it?
Sincerely,
Alexander Wiseman
Est melior esse quam videri
It is better to be than to seem
|
|
|
|
|
Hello,
You can work around this problem of the WM_PAINT message.
Anonymous wrote:
The problem is I cannot use WM_PAINT to draw. I have a common user defined function that gets the DC for the drawing. My app calls this function at many places and at each time the drawing is different which i manage using flags.
You can store the flags in member variables (or if there are not to may as a parameter for a WM_PAINT message).
The thing you do is call your drawing function from OnPaint() or put the drawing code into OnPaint(). Second, at every place you call your custom drawing function, you send a WM_PAINT message with the flags as parameters (or set the flags in member variables).
Good luck.
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Hi,
I'm new to COM programming and in need of a little help. I'm trying to test some DirectX Filters which are COM objects and have done the following:
I took a DirectX interface called IAMTVTuner and renamed it IAMTest. I want to see if it will still work under it's new name because I am going to end up doing some funky things with it. The problem I think is that the GUID is still associated with IAMTVTuner. I'm not sure how to either: associate the GUID with the IAMTest OR give the IAMTest a new GUID.
Is the association of GUIDs with COM objects and interfaces done in .idl files? I tried running Midl.exe on a file that I changed but I get errors. I'm not even sure if I'm on the right track.
Thanks
|
|
|
|
|
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
|
|
|
|