|
http://www.codeproject.com/miscctrl/index.asp#Charting%20Controls
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
How can I add a help file in the Tools menu ? Thanks
|
|
|
|
|
Why creating a brush doesn't accept high colors (only pure 16 colors)?
This will create a red brush:
m_rcBackColor=RGB(255,0,0);
Cbrush br(m_rcBackColor); or br.CreateSolidBrush(m_rcBackColor);
But this will create a gray brush:
m_rcBackColor=RGB(254,0,0);
Cbrush br(m_rcBackColor);
A high color is changed to the closest pure color.
I'm trying to put some text (as Static Control) on the main window and I want the text to have the same background as the window. If window has a pure color like white, or gray, or red, there's no problem. But if my window has a background set to, let's say, RGB(255,0,100), the text is displayed in gray background.
Static control uses, by default, color of Dialog's background.
Any ideas?
Jerzy.
|
|
|
|
|
I to all.
Does anyone have a fully functionaly sample on using NetMessgaeBufferSend API call from MFC.
I've tryed more samples but no one give me the success of sending a little message over the LAN.
Thanks.
|
|
|
|
|
Hi,
Try this sample:
http://www.mvps.org/win32/network/nmbs.html
Also, you need some user rights (which I don't know) and some services running to send the message successfully.
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
|
I've tryied your code , but I constantly get an error message like : "ERROR 2273: The user name could not be found or is not logged in.".
I've searched for messanger services and it's started, I've found on some articles that by default all user have rights to send messagges across LAN.
Some other ideas?
Thanks a lot.
Massimo
|
|
|
|
|
Try the sample with:
nmbs.exe \\homer homer paolo "ciao"
Where homer is my computer name, paolo is the sender name (which doesn't need to be a registered message alias) and "ciao" is the message text (quotes are required).
The computer name should be always registered by the system, but I'm not sure. I have no LAN at home, so my user name is not registered, but the computer one is (I just tried).
Hope this helps,
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
Check this out. The NetLib will allow you to marshal an arbitrary C++ object via sockets. A OO way of network communicating so to speak
http://www.codeproject.com/useritems/peer_to_peer_communicator.asp
Happy coding to you,
Marat
|
|
|
|
|
|
Another way to send messages to the Messenger service on NT/2000, or to Winpopup on 9x is using the "messngr " mailslot.
Use CreateFile() with this filename:
\\server-name\mailslot\messngr
Where server-name is "." for local system or a computer name (NetBIOS) in the LAN.
Use WriteFile() to send the message, according to the following format:
from-name\0to-name\0message-text\0\0
You can write what you want in the "from-name" and "to-name" fields, message is delivered to the logged-on user.
The length of the buffer you write to the mailslot must be exact, and must include the 2 trailing zeroes.
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
Hi
I installed MSXML3 parser in replace mode.
When I use ADO26 streams to execute SQL XML I have an error.
ADO26 can't initialize {5D531CB2-E6Ed-11D2-B252-00C04F681B71} object. This is object from msxml2.dll.
What command language dialect (GUID) I have to use with ADO26 and msxml3.dll ?
Thx 4 hlp
|
|
|
|
|
Is there anyone who knows the inner workings of CSplitterWnd cause there are lots of stuff I don't get with the implementaion of the splitter...
|
|
|
|
|
If you're unable to find sufficient docs online, check out the book MFC Internals which covers CSplitterWnd and just about everything else in MFC in great detail.
--Mike--
http://home.inreach.com/mdunn/
A recent survey reports that 1/4 of all internet users in England surf for porn.
The other 3/4 just didn't want to admit it.
|
|
|
|
|
Hi all,
I think I've found a bug in CSplitterWnd which I don't know of how to resolve:
Clicking (NOT moving) on a splitter bar that splits a window in two columns where the left column is a nested splitter window, makes the clicked bar jump ?!?!?! a few pixels to the right!!!
Any one knows why?!? I've prepared a sample project for you to have a look at! Just mail me and I'll send you the code.
Any help would mean a lot!
/Tommy
|
|
|
|
|
Pls help me
HOw can I attach teh new accelerator key to the new menu?
|
|
|
|
|
In the resource editor.
Christian
Secrets of a happy marriage #27:
Never go to bed if you are mad at each other. It's more fun to stay up and fight.
|
|
|
|
|
Create an accelerator resource using resource editor (or manually by editing the resource file). Set the Key combinations you need for your acceleraton (like Ctrl+K etc.).Give ID of this accelerator same as your manu ID. Thats all.
|
|
|
|
|
Hi ! I'm developing a SDI application using CHtmlView. Java applets which contain TextAreas emit beeps although they do accept & relect the characters - this problem does not occur in Win2000 however ! IE too is able to successfully side-step this problem. The underlying MSAWT_Comp_Class seems to be receiving a WM_GETDLGCODE message ! I tried the CMyView::PreTranslateMessage fix suggested by the MS Support site but it hasn't helped ! Has anybody else come across this problem ? Thanks for everything...
|
|
|
|
|
I'm trying to make a game, and every thing works fine! But the keyboard!...
If i press the key, it doesnt act all the time. Like it should in a game. When i move my ship, by pressing the button, my ship only move a litle, then after a second it moves full. But i want to get around this problem.
Like, i want it to move when i hold the key, and stop when i release it.
I think whats wrong is i use the windows keyboard input to Move my ship(The keyboard repeat delay).
Anyone got a theori to my problem, and or a fix?
Thanks
|
|
|
|
|
Are you using DirectX, OpenGL or just GDI ? No matter what, you should be using DirectInput for your keyboard reading.
Christian
Secrets of a happy marriage #27:
Never go to bed if you are mad at each other. It's more fun to stay up and fight.
|
|
|
|
|
One way (in MFC) is to override CWinApp::OnIdle() and use GetKeyState() to check if a key is pressed.
--------------
"Aagh!! I'm a victim of a Random Act of Management!"
|
|
|
|
|
Most games have a "main loop", in conjuction with some timer code to make it run at a constant rate. You can also make a game behaving like a standard application - I mean make it event driven. Of course, you can combine these two...
Here is some pseudocode for the 1st and 2nd type:
Main Loop
do
{
if (is_key_down(LEFT_ARROW_KEY))
player.MoveLeft();
if (is_key_down(RIGHT_ARROW_KEY))
player.MoveRight();
draw_background();
draw_sprites();
draw_info();
timer_sync_code();
}while(!is_key_down(ESCAPE));
Event Driven Here, the main loop is the standard message dispatcher
MyApp::OnTimer()
{
draw_background();
draw_sprites();
draw_info();
}
MyApp::OnKeyPressed(int key)
{
switch(key)
{
case LEFT_ARROW_KEY:
player.MoveLeft();
break;
case RIGHT_ARROW_KEY:
player.MoveRight();
break;
etc, etc, etc
}
}
The reason you have this problem is because windows sends WM_CHAR and WM_KEYDOWN messages using the keyboard delay and repeat rate. If it wasn't like that, it would be impossible to typeeeeeeeeeeeeee;)
- One way would be to use DirectInput (part of DirectX). I haven't used it, but I'm sure it won't be hard.
- If you're using the game loop method, you could replace the pseudo-is_key_down functions with GetKeyState() (or GetAsyncKeyState()). These functions take the virtual key you're interested in as parameter and return the status of that key. If I remember correctly, you should "and" the return value with 0x8000 to get the pressed/unpressed state.
- If you're using the OnTimer() and OnKey() method, you can remove the OnKey() function and use what I wrote above in (2), inside OnTimer().
|
|
|
|
|
I write a component.it's debug vesion runs well,but it's release version cannot run.It popup the box that tips access the ****address.
I use many _bstr_t variable in the program,is there any relation?Or I must use the CComBSTR?
If not ,what is the probelm?
sandos
|
|
|
|
|
There are all sorts of possible reasons for this. What you should do is put some message boxes into the function in question, so by a process of elimination you can figure out where the program is crashing. I have lots of _bstr_t variables, and lots of CComBSTR, and I'm pretty crash free right now, but I've had to use the old message box trick a few times to figure out what line was failing so I could debug it.
Christian
Secrets of a happy marriage #27:
Never go to bed if you are mad at each other. It's more fun to stay up and fight.
|
|
|
|