|
a call back function is simply a function that just retreives data inside another function so you dont have to just edit the function all the time to sort out of stuff etc.. crap like that
typedef BOOL(WINAPI *tMyCallBack)(LPCSTR lpszStuff);
BOOL ExampleCallBack(LPCSTR lpszStuff)
{
if(!lstrcmp(lpszStuff, "Stuff"))
return TRUE;
return FALSE;
}
VOID TestingCallBack(tMyCallBack *tCb)
{
...code here
//Data is passed through the callback
while(!bDone)
{
bDone=tCb(lpszStuff);
}
}
Um this is a example of a callback really.. it just to get u started if you was asking on how to make a actual callback function etc??
|
|
|
|
|
I just wanted to know how can i disable a button.
Thank you for ur help
(Im a newbie)
|
|
|
|
|
m_Button.EnableWindow(false);
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
CButton::ShowWindow(SW_HIDE)
|
|
|
|
|
Wrong - that doesn't disable a button, it makes it *disappear*.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Hi,
I am writing a feature that requires me to record the creation time of certain active processes. On NT I can achieve this using GetProcessTimes() but I can seem to figure out how to do it on 9x...since I have to support both platforms.
Any help will be deeply appreciated.
Nas.
Find out what you like doing best and get someone to pay you for doing it.
|
|
|
|
|
Can anyone provide some sample code for the GetHtmlDocument or GetDocument. I am trying to display HTML Code of a specified URL in a edit box or list but I'm unsure how to do this. I have read some documentation that states I should use the GetHtmlDocument or GetDocument function..
Thanks!
Rob Jones
|
|
|
|
|
Here, you have a good example.
http://www.codeproject.com/useritems/chtmlview_search.asp
Good Luck!!!
Carlos Antollini.
|
|
|
|
|
Please explain to me how can i read and write in RTF file by RichEditBox ???
I know, i must use of which function or functions,
Only my problem is in CALLBACK function !!!
If anyone have any example about it please send to hadi_rezaie@hotmail.com
or write E-mail for me ...
Thanks.
My month article: Game programming by DirectX by Lan Mader.
Please visit in: http://www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
In the CD of Instalation of Visual C++ 4.2 and 5.0 you have the source of wordpad.
I don't remember if are in the CD of Visual Studio 6.
Do You Have Some of these?
I have these cds in my house. If you want, I can send you the sample, the next Monday....
A Secret.
The documentation in MSDN about the callbacks for write and read RTF is wrong. I Had the some problem.
Cheers!!!
Carlos Antollini.
|
|
|
|
|
Yeah, so if possible, send to me ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hi!
How can I put a CDialogBar in a CView? I know I'll probably get the answer that I should create it
in the child frame, but I need to have it in the view, because my application uses
multiple views for every document, and the dialog bar should not be visible in all of them.
My application uses MDI.
Any suggestions?
Thanks in advance,
Erik Hammar
|
|
|
|
|
Hi,
I want to build the release version of my program to the RELEASE directory. I can do it successfully in DEBUG directory(normally build to DEBUG first), but don't know why, I got over 100 errors when I built to RELEASE. Some errors are funny(e.g. unidentify variable...)
Do you know why?
Richard
|
|
|
|
|
did you change the project settings at all in the debug build? if so, did you make the same changes in the release build?
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
If I redirect stdout & stderr to a console, is there any way for me to automatically set the colors or prompts for the two files to be different? Or do you think I should just wrap the fprintf function on my own to call SetConsoleTextAttribute based on what file I'm writing to? Thanks in advance
--
Peace,
Amit Jain
|
|
|
|
|
Hi,
I have two points(CPoint), m_pStart, m_pEnd
I like to get all the points between these two points.
anyone knows how to do this?
thanks
Ehsan Behboudi
|
|
|
|
|
Do yourself a favor and buy some good book about graphic programming. In the meantime, play with LineDDA function.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
hi,
Do you know any usefull graphic programming book??
Ehsan Behboudi
|
|
|
|
|
Computer Graphics: Principles & Practice.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Check out Bresenham's alogrithm for finding points on a line. Its simple and fast and works well for discrete space(like the pixels on the screen). Any graphics book worth the paper its written on will address this topic.
Or you could find the midpoint of the line segment, then find the midpoint of each of those line segments, then find the mid point of each of those line segments.........
Josh
josh@schroff.com
|
|
|
|
|
Try this:
CPoint m_ptStart(10, 10);
CPoint m_ptEnd(600, 200);
int nY = 0;
double dLineSlope = ((double)(m_ptStart.y - m_ptEnd.y)) / (double)(m_ptEnd.x - m_ptStart.x);
for(int nX = m_ptStart.x; nX < m_ptEnd.x; nX++)
{
nY = m_ptStart.y - (int)(dLineSlope * nX);
pDC->SetPixel(nX, nY, RGB(255, 0, 0));
}
Hope this works.
|
|
|
|
|
Go and take som beginners course in linear algebra.
|
|
|
|
|
Hello guys
I am new in VC++ and I need help please
1- I want to add some MFC code to my C++ project, do I have to include any *.dll files with my program when I want to run the program in any other PC ?
2- I want to run 2 functions in the same time ,can I ?how?
(note: I saw http://www.codeproject.com/threads/ but it did not help me because its talk about GUI and MFC)
foe example I am working in FTP console and I want to get a file from the ftp server and answer any command from the user (e.g. if he like to ABORT the transfer)
Thank You for your great answer
--------------
http://www.SaudiABM.com
|
|
|
|
|
hey,
> 1- I want to add some MFC code to my C++ project, do I have to include any *.dll files with my program when I want
> to run the program in any other PC ?
You can link staticaly with MFC, this will allow you to ship you application with no extra DLL's (MFC ones anyway) -- though your finall exe will be a whole lot bigger.
> 2- I want to run 2 functions in the same time ,can I ?how? (note: I saw http://www.codeproject.com/threads/ but
> it did not help me because its talk about GUI and MFC) foe example I am working in FTP console and I want to get
> a file from the ftp server and answer any command from the user (e.g. if he like to ABORT the transfer)
If your planing on using MFC, then check you docs for CWinThread. If your not using MFC, take a look at CreateThread ().
-Ben
"Its funny when you stop doing things not because they’re wrong, but because you might get caught." - Unknown
|
|
|
|
|
Hi,
In my application, I can display Bitmaps.. but i like to get a blank document when i click on
the sub-menu "New".
Does anyone know how?
Thanks
Ehsan Behboudi
|
|
|
|