|
Hi Kilowatt,
Thanks for ur knid and quick response. Yes Kilowatt I'm using C++ client only and want to see the structure of IDL file. In fact I'm trying to do something similar to
[id(2), helpstring("method GetSeExceptionPtr")] HRESULT GetSeExceptionPtr([out,retval]CSeException *pSe); // Where CSeException is a C++ class in my IDL file but it's giving error code MIDL/2025/2026.
Plz help me and if possible plz send me a block of code too.
Thanks for giving time once again.
Regards;
Uttam Kumar
Regards;
Uttam Kumar
Senior Development Engineer
Omitec Information Services Ltd.
Mobile : +44 (0)77 5494 2930
Direct line : +44 (0)24 7660 8508
Direct Fax : +44 (0)24 7660 8501
e-mail : uttam.kumar@omitec.com
Website : www.omitec.com
|
|
|
|
|
does your class need to have methods? If not, you could make up a IDL structure. If you need methods, make up an interface. I don't think this is a good idea to pass C++ classes betweeen interfaces, even if the client and the server are both in C++.
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
This should be simple.....you would think
I have a listbox with LBS_SORT, and adding item to it with LBS_ADDSTRING.
But the items are *not* sorted!?
Someone got a clue to why this is happening?
The LBS_SORT is set in the dlg editor.
I have verified with spy++ that it is set.
The listbox is NOT ownerdraw.
(and i dont get any WM_COMPAREITEM calls, which i shouldn't get either)
/Magnus
|
|
|
|
|
Hi there,
I'm writing a gdi game ...
I used WM_MOUSEDOWN - WM_MOUSEUP - WM_MOUSEMOVE events for darging and droping ...
I have still problem for solving flickering image
The problem is it, when i drag-drop my bitmap in the dialog, image has flickering problem !!!
I drew the image in OnPaint()
I redraw that by InvalidateRect function ...
Could u help me please !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
There are many solutions to flickering. Likely, your biggest problem is that your WM_ERASEBKGRND is drawing a white rectangle everytime you invalidate, and before you repaint your image. Override WM_ERASEBKGRND and do something more intelligent.
Another option are Memory DC's, which you can draw into and then blit into your physical DC all at once. There are several samples of both here at CP.
--
Where are we going? And why am I in this handbasket?
|
|
|
|
|
Thanks aloooooooot for ur reply
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hello again
I have just one other problem about OnEraseBkgnd event !
Right now, i solved my pervious problem that was about Flickering image in the dialog by returning FALSE in that message !!!
Now, i want to know how could i refresh the image in each movement ?!!!
Because, i can't use Invalidate() or InvalidateRect() functions ...
Could u help me in it, please
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I agree with Erik, the problem is more than likely going to be WM_ERASEBKGRND which you must override and probably just return false. However, I think a better solution completely would be to use the DirectX SDK if your writing your own game. Its much faster than GDI because you can access your graphics hardware to deal with all the drawing, and can eliminate flickering by updating the monitor when the vertical blank occurs (if you wanted to). The drawback is its more complicated to implement than GDI (you need to know about backbuffers, surfaces and flipping), oh, and the version 8 SDK is about 180Mb, if your on a 56k modem you could go days without using the telephone line .
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
Hello
Thanks for ur reply and ur advice about OnEraseBackground message ...
and about DirectX, right now i have an article about it in my homepage ...
But unfortunly i have to write 20 game projects in only TWO months
So, i have to write FAST code
Anyway, thanks !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hello again
I have just one other problem about OnEraseBkgnd event !
Right now, i solved my pervious problem that was about Flickering image in the dialog by returning FALSE in that message !!!
Now, i want to know how could i refresh the image in each movement ?!!!
Because, i can't use Invalidate() or InvalidateRect() functions ...
Could u help me in it, please
(Please reply FAST, ASAP)
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
When you say "refresh the image in each movement" what exactly do you mean? are you trying to create an animation? If you are trying to do something like this with GDI, its probably your best bet to create a memory DC and draw/update that DC to your liking before blitting the final result on to the screen DC (no flickering). This should have the effect of movement (so long as you do it right of course). I'd imagine there would need to be some kind of timer to keep track of when the image is needing refreshment but I'm not sure on that kind of stuff (I've never made a game using GDI). If I've waffled on about the wrong thing feel free to reply. Oh, cheers for your article on DirectX, I'm reading it as we speak, very interesting.
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
ok, let me talking about my game ...
It's a Card game like Solitaire in windows os.
User can drag & drop cards in the game ...
So, i must redraw the image in each movement, ok ?
I mean i have to refresh image in MOUSE MOVE event ...
How ?
How can i do it ?
PS: Thx, i'll write about DirectDraw and D3D
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Right, ok, I have an idea, but since I've never done this it will remain an idea till it gets proven one way or the other. I know there is an event OnMouseMove(UINT flags, CPoint pos) that processes the WM_MOUSEMOVE message and is triggered when you move the mouse - obviously. You can test if the left mouse button is being held down by checking the flags for MK_LBUTTON. The event will give you the (x,y) coordinates of the mouse in a CPoint structure to which you can draw the card (whether these (x,y) coordinates represent the top left, middle, bottom right of the card is up to you - I know you know all this so far, but its just for the benefit of others who may want to do it). Now heres the good part, you need to create a memory DC to work with. Without this you WILL get flickering from a screen that is getting regularly drawn to. Something like this MAY work (I'm very rusty on this ):
CDC dcMem;
dcMem.CreateCompatibleDC(GetDC());
OK so you have a background DC (similar to the DirectDraw backbuffer), select your background bitmap into ANOTHER DC (not screen) and blit to the memDC(start afresh) with SRCCOPY flag. Then select your card bitmap into the extra DC and blit it again with but this time to the (x,y) coordinate of the memory DC. Finally blit the memory DC to the screen and you should find it keeps redrawing the card image as you move the mouse (providing your custom tests are met). I'm not sure how fast or smooth this solution is likely to be, but I'd like to know (if it works or not at all too).
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
How do you call Windiff from with in a program and specify the two files that you want compared.
In the help of WinDiff it tells about
Invoking Windiff from the command line
To compare two files
Windiff path_to_first_file path_to_second_file
How do i implement this?
Thanks
Scott
|
|
|
|
|
Use CreateProcess() and absolute paths to Windiff executable and files to compare.
|
|
|
|
|
Works great, thanks
The only problem is, that it doesn't like the paths passes in the command line if they have spaces. Is there a way to convert them to a DOS style with a tilda or something else?
Scott
|
|
|
|
|
It used to work for me as well, with no problem. Check documentaion again (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/prothred_9dpv.asp) and possibly try to use lpApplicationName only to specify path and parameters.
|
|
|
|
|
It does open up Windiff correctly but the problem is that why i send in the files to compare "C:\My Documents\test.h C:\My Documents\test2.h" it tells me that it can not open the file "C:\My"
It works if the directories don't have spaces in them.
Scott
|
|
|
|
|
I am sorry, I understood you wrong. You can convert path with spaces into its short version with this function:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/filesio_0cyt.asp
|
|
|
|
|
thanks, that's what i needed
Scott
|
|
|
|
|
I think it's better to just quote ("") the two paths than to re-introduce the horrible 8.3 limits again.
|
|
|
|
|
Hello CP,
I'm working on an embedded PC, and the user doesn't have luxury of a keyboard or mouse (only a touchscreen). I have to create a dialog that will allow the user to set the time and date. What is the API call that I can do to take care of this?
TIA!
Mark Donkers
A witty saying proves nothing.
-- Voltaire
|
|
|
|
|
Forget it. I found it.
SetSystemTime()
Mark Donkers
A witty saying proves nothing.
-- Voltaire
|
|
|
|
|
Hi all, I have another b*****d problem with unresolved externals, this one is very strange. OK, I have the following code:
#include fstream.h (in arrow brackets)
bool blah::blah(LPSTR filename)
{
ifstream fin(filename);
return true;
}
This generates the following error:
nafxcwd.lib(thrdcore.obj): error LNK2001: unresolved external symbol _endthreadex
nafxcwd.lib(thrdcore.obj): error LNK2001: unresolved external symbol _beginthreadex
blah...2 unresolved externals.
I've had a look around the website but can't find the answer. I get an error when including the msvcrt.lib or some other lib that was mentioned on the site. WTF is going on? I'd be greatful if someone could save my PC's from destruction, cos thats what they're heading for!
Many Thanks,
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
"Linking code compiled with /MT with the library LIBC.LIB causes LNK2001 on _beginthread, _beginthreadex, _endthread, and _endthreadex" - MSDN
Bye,
Orbital^
...the night is long ... but not long enought to do some real coding ...
|
|
|
|