|
Thanks a lot, your time is much appreciated
UndeadHamster
Bye
|
|
|
|
|
can i user dbGrid with CRecordset?
Best Regards
|
|
|
|
|
Now I want to create a vs auto-completion style list to help user typing in the Edit control. First I just want to it popup at caret postion but just can't control it's exact position with GetTextMetrics. Next How can I send key press between edit and popup list?
Thanks.
Sing when we're programming.
|
|
|
|
|
GetCaretPos()
ClientToScreen() use these coordinates for positioning your popup window.
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Christian or Kilowatt...you both seem to be quite aquainted with GDI and graphics so feel free to answer me...please...?
I'm interested in designing a small 3d type app which will not require texture mapping, The whole scene will be generated by the given poly coords and lighting opcodes etc...(I dunno if i'm 100% with terms, but excuse me if i ain't).
I'm also gaining interest in ATL and am considering approaching this with ATL (so it can be used in webpages AND applications).
Given the above how would you suggest I handle this...?
There are hundreds of online 3d lib's I have about 5 books that show me in detail how things work Gourand(speling) shading Phong(spelling) etc...
There there DirectX, OpenGL and how many other API's which are included on most OS's...I would figure anyway.
I've heard great things about DirectX...my fav game uses it and uses it well, but it's really to many bells and whistle. However this wouldn't matter I understand, cuz DirectX is already on most PC's and would probably provide best results because DirectX API (i imagine) uses MMX or 3DNow technology...depending on the PC architecture.
Knowing I won't need anything other than fancy shading, gradients, alpha factoring and anti-alising would it (maybe not make sense) but do any harm to open my books and copy paste...?
Or would you really suggest using DirectX API..?
I'd really like it to be fast, but doesn't require super speed...the scenes are small only about 64x64 pixels (my 286 could render that in the blink of an eye). And I would really like cross platform compatibility...
Is ATL supported in .NET...? Is it any easier...?
Thanx in advance.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
There is so much to learn about 3D graphics, I will try to help you as much as I can.
HockeyDude wrote:
I'd really like it to be fast, but doesn't require super speed...the scenes are small only about 64x64 pixels (my 286 could render that in the blink of an eye). And I would really like cross platform compatibility...
Do you mean UNIX, MAC and PC, or Windows95 - WindowsXP?
DirectX / Direct 3D is a good tool for the PC, but OpenGL is platform independant.
HockeyDude wrote:
I'm also gaining interest in ATL and am considering approaching this with ATL (so it can be used in webpages AND applications).
If you place it in a webpage, it will eihter need to be an ActiveX control, or a JAVA Applet. The activeX contol will lock you down to Win32, and the JAVA Applet will slow you down.
HockeyDude wrote:
Knowing I won't need anything other than fancy shading, gradients, alpha factoring and anti-alising would it (maybe not make sense) but do any harm to open my books and copy paste...?
This would not hurt, but then you do not gain the advantage of your 3D card doing the work for you. Recently I wrote a 3d viewer from scratch (for fun), that handles Flat, Gouraud and Phong shading. Gouraud and Phong really start to bog down my machine because of all of the CPU power that it uses. When possible, you should use a library that takes advantage of your card like OpenGL or DirectX.
HockeyDude wrote:
Is ATL supported in .NET...? Is it any easier...?
The only reason to use directX for this task is to place your renderer in an ActiveX control. For the most part you should be able to create your renderer without ATL. That way you can focus on one task at a time. Then when you want your viewer in a control, it should not be too much work to replace the painting portion of your control with the viewer.
HockeyDude wrote:
uses MMX or 3DNow technology...depending on the PC architecture.
Just for your information, these tools are not too much to get excited about, MMX is basically an extension to allow you to do native 3D operations with integers. Most 3D applications use floats for accuracy. The libraries use their own hardware on the video card to accomplish these tasks, and most tools ignore MMX.
I think I have answered most of your questions. If you have any others feel free to ask. k.
|
|
|
|
|
I want to write a program that can access to the network packets and …
How can I find information and source code about this?
Thanks
|
|
|
|
|
Does anyone have any simple examples for working with DDS images (as used by DirectX)
I've found an assortment of examples in the DirectX SDK, but these assume that the images are loaded as textures for display on a DX device, whereas I just want to get at the pixel data of the image(s) stored within the file.
Can anyone help?
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
Hi
I experience big troubles when trying to implement IDataObject with support for CFSTR_* formats.
I first enumerate my available formats, like
ASSUME0(celt == 1 && !pceltFetched);
if (nFormatsEnumerated == 0)
{
rgelt->cfFormat = ::RegisterClipboardFormat(CFSTR_FILEDESCRIPTOR);
rgelt->dwAspect = DVASPECT_CONTENT;
rgelt->lindex = -1;
rgelt->ptd = NULL;
rgelt->tymed = TYMED_HGLOBAL;
nFormatsEnumerated++;
return NOERROR;
}
else if (nFormatsEnumerated == 1)
{
rgelt->cfFormat = ::RegisterClipboardFormat(CFSTR_FILECONTENTS);
rgelt->dwAspect = DVASPECT_CONTENT;
rgelt->lindex = -1;
rgelt->ptd = NULL;
rgelt->tymed = TYMED_ISTREAM;
nFormatsEnumerated++;
return NOERROR;
}
else
{
return S_FALSE;
}
But when the data is requested, the lindex member of the FORMATETC structure is set to -1. I thought lindex would be set to the index of the file whose content is requested?
Anyone who has implmented this?
|
|
|
|
|
Hi
I have a HINSTANCE, I want to get HWND from it. Can you help me?
Thanks for your reading.
Tran Hoang Chuong
|
|
|
|
|
HINSTANCE is an instance handle to an application and an application can have many or no windows. I don't see how you would retrieve one HWND from any HINSTANCE.
If your using MFC then CWinThread::m_pMainWnd holds the pointer to the application main window and from here you could use EnumChildWindows() to get the others...
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hi HockeyDude
I forgot to tell more detail about my question. It means I have a HINSTANCE from a command ShellExecute(...) and I want to get CWnd of the application I have just exectuted.
Thanks for your reply.
Tran Hoang Chuong
|
|
|
|
|
I think the CWinThread is no good to you then.
I don't know of any function which would return the window handle associated with an HINSTANCE. Except EnumChildWindows which only returns child windows of a parent.
Can you use FindWindow()...?
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hi HockeyDude
Thank you very much
Tran Hoang Chuong
|
|
|
|
|
if you figured it out that's all that matters
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hi,
I would like to make my neat ownerdraw CListBox with underlined text (e.g. on MouseOver). Well, I know how to use CreateFont(), but I would like to use the current selected font and only make it underlined. Is this possible, is GetCurrentFont() the right direction?
My ownerdraw listbox is pretty much like in http://www.codeproject.com/combobox/listboxex.asp
Kinda lost, thx!
Moak
|
|
|
|
|
"Returns a pointer to the currently selected CFont object. This member function may return temporary objects.
" - MSDN
Sounds good to me.
SelectObject() I think would do the trick too, but the above is the better approach.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Okie, I use this code snipped now.
Plz tell me if something is stupid.
<br />
CFont fontUnderline, *pFontOld; <br />
LOGFONT lf;<br />
VERIFY(pDC->GetCurrentFont()->GetLogFont(&lf));<br />
lf.lfUnderline=1;<br />
VERIFY(fontUnderline.CreateFontIndirect(&lf));<br />
<br />
...<br />
<br />
pFontOld = pDC->SelectObject(&fontUnderline);<br />
pDC->DrawText(ptr, nLen, lpRect, nFormat);<br />
pDC->SelectObject(pFontOld);<br />
|
|
|
|
|
I can't see anything wrong...your compiler would do a much better job i'm sure.
Thats how I would do it if that's what you wanted to hear, try it and hopefully things will go as planned.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hi,
I want to create an enhanced metafile that will show an image with differents types of fonts and line styles..., then pass it to the clipboard.
The problem that I have, comes when I try to use that fonts or styles, if I use standard stuff all works fine, if not when it is pasted on another window, it paste a white rectangle.
I make the metafile from a class that has now window associated ( well AfxGetMainWnd()...).
Thanks in advance,
Braulio
|
|
|
|
|
I have a problem with developers sniffing on the network, so i want to create promiscious scanner, that would log off user who is sniffing on network. I know how to found out which card is in promiscious mode, but i dont know how to send custom made ARP packet... can anyone help me?
|
|
|
|
|
RFC 826 I believe defines the layout of an ARP packet. Or is it the sending part you're unsure of? That depends on your OS.
|
|
|
|
|
I know how ARP works, but i am unable to send it (Windows 2k).
|
|
|
|
|
For W2k, didn't Microsoft add some (Winsock2?) functions that let you compose your own IP packets, including TCP/UDP headers and all?
Have you tried searching MSDN? I'm pretty sure there was a sample there some time ago of how to form and send your own formed IP packet. If I'm wrong, perhaps it was on another site (e.g. codeguru)?
|
|
|
|
|
I have a hard time figuring out where ::HTMLHelp looks for the .chm's specified. Path of caller? current folder? Search path? Further adding to the confusion, there's HKLM\Windows\HTML Help in the registry, which seems to contain filename->full path mappings, but only for MS Office help.
TIA
Peter
the programmers just set it so that when in doubt, the women still think they're involved with you. It's much less frustrating that way - BGII Quest Directory
|
|
|
|