|
Hi,
In my client area I have some text. During selection, my text color is inverted that is implemented by ::invertRect() API. This api just invert the bits of the area specifed in the invertRect parameter.
I want my back color during selection should be of different color which I will select. Iam not getting how and what raster operation to do... ..
So plz let me know how I can do it using any Raster Operation.
Umesh
Its ATTITUDE not APTITUDE that help One to achieve ALTITUDE.
|
|
|
|
|
Hi All
I want to ask question about MSAgent character editor.
1. Can i create my own "STATE" in MSAgent character editor. There are pre-defined "state" in MSAgent character editor,so i want to add more. Can i do it.
2. What is the meaning of one state with multiple animation.
|
|
|
|
|
I'm quite confused!
Writing a simple win32 console application using sockets, I get an unexpected "Win32 Thread" in my application.
The following sample application has two thread (the main thread, and the unexpected win32 thread".
Has anyone noticed this, and what is this extra thread used for?
#include "winsock2.h"<br />
<br />
void main()<br />
{<br />
WSADATA info;<br />
<br />
if(WSAStartup(MAKEWORD( 2, 0 ),&info))<br />
return;<br />
<br />
char name[1000];<br />
int len=1000;<br />
<br />
gethostname(name,len);
<br />
Sleep(10000);<br />
<br />
WSACleanup();<br />
}
PS: I link to ws2_32.lib
// Niklas
|
|
|
|
|
It's ok, it's part of the WinSock system.
When you call WSAStartup it does a bunch of stuff, create pipes, initialize structures, create monitor thread.
I would expect it to go away when you call WSACleanup.
There is a port of WinSock, with source, as part of Wine (? i think).
If you look at their source you will see what the other thread is/can be used for.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
I cannot remove a blank directory in Windows 2000 using RemoveDirectory whilst I can do the same with same code in windows 98 - Please Help
boby
|
|
|
|
|
removedirectory surely works in 2000. check what's the error occured while removedirectory() thru getlasterror(). for details refer MSDN. otherwise you can try _rmdir() function.
Murali.M
there is always one more bug.........
|
|
|
|
|
bochan wrote:
how a
Here! Another one for you! But probably :grass: would be more appropriate?!
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
//A.h
Class A
{
A(int i, int j);
int GetIJ();
int K,L;
}
//A.cpp
{
A::A(int i, int j)
{
K=i;
L=j;
}
A::GetIJ()
{
int M=K+L;
return M;
}
}
//B.cpp
A *ATemp;
{
void B::FirstFunction()
{
int a=5;
int b=6;
A aTest(a,b); //Create a A Instance "aTest"
ATemp=&aTest; //assign aTest to ATemp
}
void B::SecondFunction()
{
int XYZ=ATemp->GetIJ();
//Is this correct? If this is wrong please tell me why
}
}
**************
Can I Create a Object in one function and using the object at another function?
|
|
|
|
|
Not this way. You have created the object on the stack in the first function and so the object is destroyed when the function returns. Therefore, your pointer to this object is no longer valid outside the
scope of the first function. There are lots of ways to approach this
problem, but one is to return an object of type A by value from the first
function and assign it to another object of type A which is declared outside
the function. The best method depends on the cost of creating and assigning the object.
|
|
|
|
|
I need get a button in the system taskbar,now I have got a pointer of the taskbar,but I can't catch a specific button in this taskbar,Please help me,thanks.
|
|
|
|
|
How do I programatically add a "Direct Connection between to Computers" assigned to COM5 ?
Just start the "Add Modem Dialog" is not a solution for me.
WinExec("rundll32.exe shell32.dll,Control_RunDLL Modem.cpl,,add",1);
Adding a Phonebook entry to this device with RasEnumDevices and manipulate the entries for SLIP is no Problem.
|
|
|
|
|
I created a dialog without title bar,so it has not a combine button in system taskbar,I used "ModifyStyleEx" Func to add a button in taskbar,then I used "LoadIcon" and "SetIcon" add a icon to this dialog.
The Question occured: when I pressed "ALT"+"TAB" two keys,this Application icon show in window is a system icon!!The icon in taskbar is mine only!
Why??Thanks.
------------------------------------------------------
Jerry Wong
Http://www.alphastudio.org
MSN:hotalpha@hotmail.com
|
|
|
|
|
Even if your dialog does not have a title bar, still you should set the Icon property for that form, to a valid Icon object.
|
|
|
|
|
Do you have the proper permissions to do it? Win2000/XP requires permissions, whereas Win98 doesn't, so this is the most likely cause.
|
|
|
|
|
|
Hello ppl
following is the code snippet
if(!AfxSocketInit())
AfxMessageBox("Socket Init Error");
if(mysocket.Create(6000,SOCK_STREAM) == TRUE)
AfxMessageBox("Socket Created");
if(server.Create(3000,SOCK_STREAM) == TRUE)
AfxMessageBox("Server Socket Created");
if(server.Connect("172.16.65.122",6000) == TRUE)
AfxMessageBox("Connected to client");
else
{
int a = server.GetLastError();
AfxMessageBox((CString)a);
}
what i am trying to do here is that i need to connect to the same machine using socks for that reason i have created two sockets one that actually should act as a client and other as a server now both the sockets are created successfully but server is unable to connect to the client (remember client is the same machine as server) the error no that is returned is 3 and i dont know what it means please help me out i am a socket newbie
thanks
|
|
|
|
|
if i read well ur server is connecting to a client???
this is odd
try that the client connects to the server
the server must be listening to its socket
(look at Listen and Bind)
i recomand you to look for NDK on CP
anyway the error code 3 means "The system cannot find the path specified. ERROR_PATH_NOT_FOUND"
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
i want to have a lable with arabic font but the studio does'nt support arabic fonts how could i have a lable or menue with arabic fonts?
|
|
|
|
|
|
Have you got "wWinMainCRTStartup" as your "Entry-point symbol" ("Output" category of "Link" tab on project settings dialog) ? I had some linker errors when first building for unicode and I found that fixed it.
|
|
|
|
|
I just got Visual C++ .NET tonight and I started messing around with it. I'm a java developer and have been kind of curious of the .NET I'm really stuck i've search google.com but the word .NET brings up alot of junk. I'm stuck on declaring a function not sure how. I keep getting an error (error C3602: 'String': a __gc type object cannot be passed by value) It's right when I pass it to the function that will make the string to uppercase. Not sure what it means a __gc could someone help me out or show me where i can look at some online docs for newbies thanks.
<br />
private: System::Void button1_Click(System::Object * sender, System::EventArgs * e)<br />
{ <br />
this->label1->Text = this->textBox1->Text;<br />
this->strBox = this->textBox1->Text;<br />
this->upperCase = this->makeUpperCase(strBox); <br />
this->daString(upperCase);<br />
}<br />
<br />
public: System::Void daString(System::String * blah)<br />
{<br />
MessageBox::Show(blah,S"Testing Function daString", MessageBoxButtons::OK, MessageBoxIcon::Information);<br />
}<br />
<br />
String makeUpperCase(System::String * upper)<br />
{<br />
return upper->ToUpper();<br />
}<br />
<br />
private: System::Void Form1_Load(System::Object * sender, System::EventArgs * e)<br />
{<br />
MessageBox::Show(S"Message Box Demo",S"My Application", MessageBoxButtons::OK, MessageBoxIcon::Asterisk);<br />
}<br />
<br />
};<br />
}<br />
<br />
<br />
|
|
|
|
|
If you look closely, the String::ToUpper function returns a String*, whereas you are using a String return type.
Try
String* makeUpperCase( String* inString )
{
return inString->ToUpper();
}
There are minor differences between C++ and C++ .Net. C++ .Net compiles to MSIL code, and it has introduced the concept of garbage-collectable (__gc) classes. Since System::String is a __gc class, and not a value type like an int, so you can only use pointers to it in your code.
|
|
|
|
|
As an accomplished Java programmer you should consider C# as an option. You would have a much easier time learning it than managed C++. But everything depends on what you want to do.
Lorenz Prem
Microsoft Corporation
|
|
|
|
|
Hi all,
Need some help with an MFC dll I have.
I'm connecting/disconnecting to a database using two simple functions.
__declspec(dllexport) void Connect()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
database.Open( "EmployeeManager" );
}
__declspec(dllexport) void Disconnect()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
database.Close();
}
database is declared as global so I can access it all through the dll.
The problem is coming when I exit from the program using the dll. It throws a memory exception. I can't figure out why. I know its a problem with the connection because I tested just opening and connecting, then quitting and the error only occurs if I'm connected. I get an error regardless of whether or not I call disconnect on exit. Any ideas?
Mike
|
|
|
|
|
Did some more testing. The actual error I'm getting is "Exception Breakpoint A breakpoint has been reached."
This occurs only in debug mode. The release has no errors. I can't find any breakpoints anywhere so I still have no idea what's going on in debug mode.
Mike
|
|
|
|