|
Is there any other way except changing the function prototype ?
Thanks for your reply.
Nikhs
Nikhil Trivedi
|
|
|
|
|
Oh yes, a bit contrived yet. If you function returns a 32-bit integer then you can interpeter it as a pointer (at least on 32-bit systems...). That stated, you may arrange the two buffer pointers in a struct and return the struct address to the caller.
However, IMHO it's better to change the function prototype.
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.
|
|
|
|
|
Hi
All
i can change font of menu item but the font of Top menu items like File,Edit,Help etc is unchanged.So is there any function in which we can set font of Top menu.
Thanks and Regards
Atul Mahajan
|
|
|
|
|
Does someone nows something about how to run a program in Cygwin?
I need to study a program, but i can run it only from cygwin.
|
|
|
|
|
AFAIK Cygwin is a Unix-like env where you can run standard windows executables.
What is you doubt about?
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.
|
|
|
|
|
I dont know how to run it. I have c files and headers and i dont know how to compile and make executable files.
|
|
|
|
|
Well, if you have the development tools installed, then you can use gcc (or g++ for c++ projects) to create the executable for simple projects. If the project is complex, probably you have to create a makefile. AFAIK there are also some IDE's that can be used with Cygwin, for instance DEV-C++ [^].
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.
|
|
|
|
|
Unfortunately I have a complex project and I dont know how to start. Is there a chance to make my program work only under windows?
|
|
|
|
|
If it's a complex project, probably Maximilien reply [^]
applies.
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.
|
|
|
|
|
There should be an existing makefile ( "makefile" ) or even better, a configure thingy somewhere.
if there is a makefile, just type make in the directory where the makefile resides.
if there is a configure thingy, just type configure in the directory where the configure is.
|
|
|
|
|
This program has many subfolders and I found a makefile.in in the folder, but there are a lot of makefile.in in others subfolders too. And in the folder Include, who contains the header files I found a config.h.in and a Makefile.common.in
|
|
|
|
|
There should be a README (or some other file that explain how to build that ) file somewhere that you can read to help you.
or maybe, if memory serves me well, you could do a "make makefile " where there is a makefile.in; and it should generate the makefiles for the project.
|
|
|
|
|
There should be a script called "configure" in the source directory, and running it creates the Makefile.
|
|
|
|
|
I will be very greatfull if you could tell me how to run it, because I dont know anything about cygwin
|
|
|
|
|
You could try compiling under windows, just select WIN32 Console application, add all your c files to the project, and compile.
It may work of the program has no unix specific calls. If not, you need to install the GCC compiler. Google cygwin to get the files.
|
|
|
|
|
Hi, I still haven't seen a super-quick/easy (and I'm sure there must be one based on subject matter) example of using a timer to have a time/date static text control updating, say once per second. Can anyone point me in the right direction. I'm sure it's just a case of using some timer class (though where to put it/set it up?), and having a function that's called by that which can access your static controls.
thanks in advance
|
|
|
|
|
Use CWnd::SetTimer to start a timer say for per minute and within its handler call CTime::GetCurrentTime and set the returned date onto your static control.
--
======
Arman
|
|
|
|
|
Hi,
i try to help you...
In your view/dialog/frame class you declare a
<br />
UINT_PTR MyTimer
and a Handler to the Event :
afx_msg void OnTimer(UINT_PTR nIDEvent);
in the .cpp
you link the Event with the handler in the MESSAGE_MAP :
ON_WM_TIMER()
your code for the handler :
<br />
void xxx::OnTimer(UINT_PTR nIDEvent)<br />
{<br />
if(nIDEvent == 5)<br />
{<br />
KillTimer(MyTimer);
}<br />
}
and a function which starts/initializes your timer :
void xxx::InitMyTimer(void)<br />
{<br />
MyTimer = SetTimer(5,100,NULL);<br />
}
Good luck
|
|
|
|
|
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
ho i am getting crash often in DoDataExchange(CDataExchange* pDX); i declared as DDX_Control(pDX, IDC_DOWNLOAD_PROGRESS, m_Prog); whats wrong with this code.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Hi,
the code seems correct.
Check if your control on the Dialog has the ID "IDC_DOWNLOAD_PROGRESS"
And you have a valid CProgress variable m_Prog in your Dialog/View class.
Greetings
|
|
|
|
|
yes i checked both are correct. i am getting crash in release mode.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
and in Debug-Mode all is okay?
is your CProgress a member or a pointer to CProgress?
|
|
|
|
|
its pointer to CProgress
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
I suppose that the pointer is allocated before the OnInitialUpdate(before the DDX_Control is executed)
I think you need to debug and step into the functions and look where the error occurs.
you have already a long code? If not so, you can post some pieces
|
|
|
|