|
What is the exact text of your message? If it really is as above then find a reference to the variable or function xxxxx in your source code.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
As mentioned in the original post, AfxEnableControlContainer() is the identifier that is not found. I tried to get definition, declaration and all the references to it but could not find any.
A messagebox pop ups saying "The symbol AfxEnableControlContainer() is not defined/referenced"
|
|
|
|
|
This MSDN page indicates afxdisp.h has the header containing the symbol definition.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
OHHHHHHH....thank you very much, this worked for me.....i have spent alot of time on it but could not find what the reason was.
|
|
|
|
|
You are welcome.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi there,
I have a C++ application on Windows based machine connecting to another Windows based application within a shared network (both servers connected to same firewall router)via TCP socket but time to time the socket goes up and down many times (80- 90 times a day) for couple of seconds I ran ping from both servers to ping each other and there is no problem with the ping, the two application send and receive many messages per second so there is not a single second with no inactivity between the two app. anybody can tell me what could be done to reduce the socket disconnection? One socket is forced to be server and listen on a specified IP and port and the other one is forced to connect as client to the same IP and port.
Any suggestion is appreciated.
Thanks,
Nahitan
|
|
|
|
|
Check the error codes when you detect a disconnect. Depending on your code, you probably will want to use GetLastError or WSAGetLastError, maybe that will shed some light on the issue, also, try logging outgoing and incoming data, maybe you have a bug somewhere and the stream stalls somewhere. Maybe show some code for us to look at.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world.
Fry: But this is HDTV. It's got better resolution than the real world <
|
|
|
|
|
Thanks for reply, here are some error logs I get:
StoreError API Socket, WSAECONNRESET
Closing socket due to error, Socket index = 0
API Socket, Socket is null. SocketIndex -1 generates invalid socket
Server, socket link not found
API Socket, Connection accepted from 192.168.0.51
all happens in 1-2 seconds
the code is so big can't post in here.
Thanks,
Nahitan
|
|
|
|
|
Which side do you get this? The server or the client? And do you ALWAYS get it on that side?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world.
Fry: But this is HDTV. It's got better resolution than the real world <
|
|
|
|
|
Server, and I get that on server always, For client as I don't have the code don't know what happens!
Thanks,
|
|
|
|
|
Here[^] you can read the description for WSAECONNRESET:
Connection reset by peer.
An existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, the host or remote network interface is disabled, or the remote host uses a hard close (see setsockopt for more information on the SO_LINGER option on the remote socket). This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress. Operations that were in progress fail with WSAENETRESET. Subsequent operations fail with WSAECONNRESET.
My guess is that for some reason the client closes the connection (crashes?), or maybe "something" on the machine of the client closes the connection. Does the client maybe generate any log?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world.
Fry: But this is HDTV. It's got better resolution than the real world <
|
|
|
|
|
On a side note, maybe try experimenting with the socket option SO_KEEPALIVE[^].
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world.
Fry: But this is HDTV. It's got better resolution than the real world <
|
|
|
|
|
HI,
How can I disbale or hide Maximize button from SDI application?
|
|
|
|
|
Adjust the styles[^] in your CreateWindowEx() call so that the WS_MAXIMIZEBOX value is not included. If you are using MFC then I think you may need to do this within your PreCreateWindow() method in your CMainFrame class.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Hello Everybody,
I am trying to do like this.
loading a bitmap using Gdiplus and drawing that to a device context.
Bitmap gbmp(bmpFile);
Graphics g(dc.GetSafeHdc());
g.DrawImage(gbmp, x,y, Width, Height);
this is drawing the bitmap fine.
on the same device context, if i am trying to draw colors over the bitmap, then the colors are going backside of the bitmap and the bitmap is showing front.
in mspaint, if i load an image, and draw colors, its spreading the colors over the bitmap. i want to do like that. is there anyway to do that?
if i use BitBlt and SRCAND, then it is working fine, but i need in gdiplus.
Thanks in advance,
A. Gopinath.
|
|
|
|
|
Hi tagopi,
I would suggest that you have a look at the SetColorMatrix function[^] which can be used for RGBA transformations. Here is an example from one of my personal projects:
if(TRUE == m_bDisabled)
{
Gdiplus::ImageAttributes imageAtt;
Gdiplus::ColorMatrix cm =
{
0.299f, 0.299f, 0.299F, 0, 0,
0.587f, 0.587f, 0.587f, 0, 0,
0.114F, 0.114F, 0.114F, 0, 0,
0.0f, 0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 1.0f
};
cm.m[3][3]+=0.01f;
imageAtt.SetColorMatrix(&cm, Gdiplus::ColorMatrixFlagsDefault,Gdiplus::ColorAdjustTypeBitmap);
gScreenBuffer.DrawImage(&memBitmap,Gdiplus::Rect(0, 0, memBitmap.GetWidth(), memBitmap.GetHeight()),0,0,memBitmap.GetWidth(),memBitmap.GetHeight(),Gdiplus::UnitPixel,&imageAtt);
}
This example is used to paint my bitmap in grayscale when a button is disabled.
Good Luck,
-David Delaune
|
|
|
|
|
Hello David,
Thanks for your reply..
This works fine for me, i changed the values as needed by me.
Thanks again.
A. Gopinath.
|
|
|
|
|
Hello,
Can i able to save this image in disk (with the transparency i changed). i tried to save using bitmap.save, it showing black image.
Thanks,
A. Gopinath.
|
|
|
|
|
Hello,
I am a bit of a newbie with C++ and windows programming so I wonder if someone can help.
I am writing an app that needs to capture raw and then via an IPC pass that information on to another process. I have looked at using Global Hooks but unfortunately that are not going to work for me.
So what I want to know is... how do I go about directly receiving input from a USB keyboard into my Win32 C++ application?
Any help would be greatly appreciated.
Thanks
|
|
|
|
|
If your application must intercept keystrokes intended for another process then you've no alternative to hooks.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi mark8569,
As CPallini hinted you can use a WH_KEYBOARD_LL hook. You may also want to have a look at Raw Input[^] which is also capable of intercepting keyboard input.
Best Wishes,
-David Delaune
|
|
|
|
|
Hello all,
I recently moved from VS6.0 to VS2008.
I am trying to find a way to update an existing CRecordset derived class, from the DB table new structure (I'm using VS2008).
Since I couldn't find how to do this, I also tried adding a new CRecordset derived class, using the MFC class wizard.
Surprisingly, I couldn't find the CRecordset class in the class list to pick it from.
I've tried to find a solution for this over the web, but couldn't find any useful suggestion.
Please help.
Thanks in advance.
Eyal.
|
|
|
|
|
For adding a CRecordset derived in VS2008 you should do as follows.
1. In the Solution Explorer or Class View, right mouse click on the root node and choose Add --> Class.
2. From the Add Class dialog choose "MFC ODBC Consumer" and press Add.
3. Press the "Data Source" button to choose a data source and the required table (just follow the wizard).
4. Press "Finish".
5. Two files will be created CPP and H files.
Enjoy,
Dudi.
|
|
|
|
|
Hi Guys, I want to know the difference between User Mode and Kernel Modes (Drivers).
Can't we create Kernel Mode drivers with latest operating systems?
And what is the risk involved in using Kernel Mode Drivers?
Regards
msr
|
|
|
|
|
In the kernel Mode, all the program can run, it runs on the ring0 and can visit all the I/O port.
In the user Mode. only a part of program can be run. It runs on the ring3. Some operations of the program will be fobidden.
我爸是李刚
|
|
|
|
|