|
Thanks for replying to my disparate plea for help. For some reason I didn't get my regular email notification, so I just saw your reply late last night and I have been doing testing off and on thru out the day, in my spare time.
Chris Richardson wrote:
You are drawing all that to an edit control? I don't know if you need to use an edit for some specific reason
When I was doing research on the subject I found this link:
http://www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/Q_20403906.html[^]
My user clicks on the menu "Open Virtual Game Cast" which then opens a dialogbox(CDialog(CJoeBroadCastDlg) it must be a dialog box because the user must tell the program which simulation number they would like to watch, and the dialog has stop and cancel button etc. In this dlg is a picturebox which has the Baseball diamond and baserunners running around , plus I use text to speech engine so the user also hears playby play.
But take a look and the link and tell me what you think, if you wish . I know I could have used a better approach but I am short on time and need to implement a fix ASAP, because the goal is to release by baseball season.
Thanks again.
Later, JoeSox www.joeswammi.com Killing In The Name[^]
|
|
|
|
|
If it wouldn't be too much of a problem, could you send me the bitmaps you use? I'll write up an example program, showing the proper way to get this type of thing done. Then it should be pretty straightforward to integrate it into your code
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
I just figured it out!!! woo hoo. I needed to add RedrawWindow() , in XP it did it automaticlly, I think.
I didn't get the notification email, so I don't have your email address but I posted the .bmps and the class that handles this here http://joeswammi.com/downloads/RES.zip[^]. It is not the best code in the world, I am self taught and have been programming for speed since I need to get the basic features done by baseball season. I appreciate your help. I think I understand what your saying, but I would have to redesign my whole class, which I would lose at least a week or two and that's when the real baseball season starts. That's nice of you to offer, if's it's not that much trouble, I would like to see the correct way of doing it, I tried researching this before designing the class but I couldn't find the correct material, but don't spend too much time on it, if you don't want to. Thanks I better goto bed
Later, JoeSox www.joeswammi.com Killing In The Name[^]
|
|
|
|
|
Joe, i followed ur "rant" into here
your really missing the whole "window" paradigm. i have never tried to do what you are doing since it is so non-standard.
typically you don't draw into a device context of a child window from a parent window.
the standard approach for your situation would be to derive a class from CWnd that represents your drawing canvas, let's call it CDiamond. The parent window can handle placement and sizing of the child window if you desire. then when CDiamond class receives a WM_PAINT message you do your drawing to the device context at that time.
hope this helps
-pete
"No matter where you go, there your are..." - Buckaoo Banzi
-pete
|
|
|
|
|
|
um, not to overstate the obvious, but does RedrawWindow() not work?
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
|
I tried you suggestion again but in a different spot in my code and it works Thanks!!
Later, JoeSox www.joeswammi.com Killing In The Name[^]
|
|
|
|
|
Cool. NP.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Hi,
How do you retreive the path and filename of the running program?
It's so I can create self-extracting modules.
Thanks in advance.
|
|
|
|
|
|
DWORD GetModuleFileName(
HMODULE hModule,
LPTSTR lpFilename,
DWORD nSize
);
for the hModule , just pass the HISNTANCE of the program, usually a variable named hInst in WIN32 APIs or returned by AfxGetInstanceHandle() in MFC
|
|
|
|
|
Well yeah, I know that .... I think you meant to reply to the other guy
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
Sorry for that, I did meant to reply to the other guy.
|
|
|
|
|
|
I am currently tring to include the library Netapi32.lib
|
|
|
|
|
In VC6: Go to Project, Settings, Link tab. Select the General category from the dropdown. Add NETAPI32.LIB to the Object/library modules field.
In VS.NET: Go to Project, Properties, Linker, Input. Add NETAPI32.LIB to the Additional Dependencies field.
Software Zen: delete this;
|
|
|
|
|
#pragma comment(lib, "Netapi32.lib") somewhere in your source...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I dont know if this is the right place for my Question, but i've got now solution by posting this question to many boards ;-(
I've the following situation, i'am running Windows XP with a networkcard and a 56k modem as internetconnection. there is a problem when i hangup the modem connection, the statistic counter are getting lower than before.
i can check that with "netstat -e"
This one is before i hangup my modem
Received Sent
Bytes 1602015 1158327
Unicastpakete 8346 8196
Nicht-Unicastpakete 140 118
Verworfen 0 0
Fehler 0 0
Unbekannte Protok. 0
This one is after i closed my modem connection
Received Sent
Bytes 858279 1122709
Unicastpakete 7283 7397
Nicht-Unicastpakete 144 103
Verworfen 0 0
Fehler 0 0
Unbekannte Protok. 0
Has anyone an idea? I currently make programm witch checks
this things by using GetIfEntry, but doesnt get the right
values, is this a XP bug ?
{
*pReceived += mib.dwInOctets;
*pSent += mib.dwOutOctets;
}
http://www.pmasoft.net/englisch/onlineeye_prof.htm
Thank You
|
|
|
|
|
I'm playing video with IGraphBuilder interface. But i want to draw on this video (client area of ActiveX wnd [IVideoWindow]) some GDI objects ( line, circle, text) - only playing, stepping, pausing.It may be done with filters, but i don't know, plzplzplz help
thnx
J.
|
|
|
|
|
DirectShow ==
But yeah, it can be done with a filter. Take a look at the EZRGB24 sample that comes with the SDK. It would have to be modified quite a bit, but it could be done.
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
|
With help of this forum (thanks to good peaople) I learned how to use MSLU with MFC apps (http://www.trigeminal.com/usenet/usenet.asp?1033)
The only thing I need to do to complete my task is to override OleUIPasteSpecialW, changing properly some members of LPOLEUIPASTESPECIALW structure, making LPOLEUIPASTESPECIALA from it and then calling OleUIPasteSpecialA. The problem is in displayng FormatName(s) in listbox. How to get them to translate from Unicode to ANSI using WideCharToMultiByte?
All this required to let the OLE stuff to work correctly in MFC apps in Edit menu->Paste Special.
|
|
|
|
|
Valera241176 wrote:
How to get them to translate from Unicode to ANSI using WideCharToMultiByte?
You have to use WideCharToMultiByte twice, one to know the size needed and one to do the transformation.
LPWSTR lpszMsg;<br />
[...].br />
int iCharSize = WideCharToMultiByte(CODE_PAGE, 0, lpszMsg, -1, NULL, 0, NULL, NULL);<br />
LPSTR formatANSI = (LPSTR) HeapAlloc(GetProcessHeap(), 0, sizeof(char) * iCharSize);<br />
WideCharToMultiByte(CODE_PAGE, 0, lpszMsg, -1, formatANSI, iCharSize, NULL, NULL);<br />
HeapFree(GetProcessHeap(), 0, formatANSI);
HTH,
K.
Angels banished from heaven have no choice but to become demons
Cowboy Bebop
|
|
|
|
|
I have run into a small problem. I have an application (two of them really, but who is counting) that is trying to send a file across a socket. The code is working great and is in production. Now, we need to be able to send large files ( 50-60 Gb ). When I call TransmitFile with a handle to a large file, I get a 10022 error ("unexpected parameter"). The file that I am trying to send is 4.8 Gb in size. Does anybody know if this call is limited to a file that is less then a 32 bit integer size? I did find TransmitPackets, but that requires Windows XP and that is not acceptable. I am sort of stumpted on this one. For what it is worth, I am doing this in the context of IO completion ports if that matters. Any help would be great.
Thanks
James Rivord
JRivord@RegalCineMedia.com
|
|
|
|