|
The above pgm will not work in linux. Because it uses many windows function, such as functions in winsocket.h. Those function are windows api. Linux will not be having such function.
dorbeck wrote: I thought that C++ worked the same under every platform
C++ works.. but not vc++
nave
|
|
|
|
|
There are differences.
I would solve them like this:
VS defines WIN32 by default.
So i you use
#ifdef WIN32
// Win32 code
#else
// Linux code
#endif
Then you can easily code for the differences.
Many of the errors here depends on the fact that 'byte' isn't defined in linux.
Try this:
#ifdef WIN32
#else
#define byte unsigned char
#endif
The you can go on with the rest of the differences/errors. It shouldn't be too hard IMO.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
This helped a lot, I will try to do this on a few more errors. and some things i probebly have to solve by writing them down on a complete diferend way.
Thanx a lot
Dorbeck
|
|
|
|
|
Hi, I need to implement a checkbox control in Visual c++ that able/disable an other control.
Some one can hlp me please
|
|
|
|
|
Uuh ? And what's the problem ? Where are you stuck ? Why don't you simply drop a check box on your window with the resource editor ?
|
|
|
|
|
Hi,
To checkbox add BN_CLICKED handler. If GetCheck() == BST_CHECKED, checkbox is checked and EnableWindow disables or enables selected controls.
-----------
Mila
|
|
|
|
|
how can i get the address of a Clist Control and translate to another Class & using it
a beginner
|
|
|
|
|
So you have CList in a func, or in a header?
Just use the & operator to get the address, then cast that adress to another class.
You can store the address in any pointer or 4byte variable (on a 32 bit PC).
DWORD myaddress = (DWORD)&myListCtl;
((CWind*)myListCtl)->someCWindFunc();
Truth is the subjection of reality to an individuals perception
|
|
|
|
|
Hi,
Can somebody help me,how to fix the above the error ?
I am getting this error when i tried to build a vc6 project.
Thanks in advance.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
u need to install microsoft platform SDK to get this header file.
nave
|
|
|
|
|
Are you sure you have this file
|
|
|
|
|
Hi all,
I'm sorry this is the last silly question of the day
To disable tabstop i do
ModifyStyle(WS_TABSTOP,0,0);
What should i do to enable tabstop again ?
Thanx,
Desmo16.
|
|
|
|
|
ModifyStyle(0, WS_TABSTOP, 0);
it is this easy
|
|
|
|
|
Hi all
do you know a macro to understand during compiling if I'm using the Visual C++6.0 compiler or the latest Visual Studio.Net compilers instead of another compiler like TASKING or BORLAND CPP?
I need to make difference for them to use in some of my #ifdef #endif definitions.
Reagards
MAnu
|
|
|
|
|
Yes, you can use the _MSC_VER macro. Search it on this page[^] for more details.
|
|
|
|
|
Hi Cèdric
Many Thanks and have a nice day!
Manu
|
|
|
|
|
#if _MSC_VER <= 1200 // Visual C++ 6 or less
|
|
|
|
|
There is a message box window and I need to find it among the other Win windows, should bi FindWindow to search for its specfic "title" and then it has 2 buttons in it "Cancel" and "Ok" I need to send a message button_click to one of them.
How to find that message box window by its title, find the handles of the "Ok" and "Cancel" buttons and send a message to one of them? I dont remember all the windows API for this
9ine
|
|
|
|
|
HWND hwndParent = FindWindow(NULL, "title");
HWND hwndOK = FindWindowEx(hwndParent , NULL, NULL, "OK");
SendMessage(hwndOK, BM_CLICK , 0,0);
|
|
|
|
|
Or post/send message to hwndParent, WM_COMMAND, IDOK, or IDCANCEL.
Truth is the subjection of reality to an individuals perception
|
|
|
|
|
I have created a function display a dialog. When I try to show a previously selected window, it causes error. :(What seems to be the problem? Here’s my code:
void CProjectView::SetSelectedDialog(CDialog* dialog)
{
if(m_pSelectedDialog)
{ //Hide previously selected window
m_pSelectedDialog->ShowWindow(SW_HIDE);
}
if(dialog)
{ // show Selected Window
CRect rect;
GetClientRect( &rect );
m_pSelectedDialog = dialog;
m_pSelectedDialog->MoveWindow(rect, TRUE);
m_pSelectedDialog->ShowWindow(SW_SHOW);
}
}
|
|
|
|
|
romuzu wrote: it causes error
What error ? Be more specific.
|
|
|
|
|
|
|
That depends on how receive collour 7x . Also library in mapped dynamically or equivalent may play part...
Now if you would make your question a bit more comprehensible, the answer you receive might be more comprehensible too...
|
|
|
|