|
A callback function tends to be global, so is defined above the function that calls it in the cpp file.
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.
|
|
|
|
|
For example i want to define callback function for using in the dialog.
So, i must define first in TestDlg.h ????
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
No, that is in fact the opposite of what I said. It will be a global, not part of the class, and therefore at the top of the .cpp file so that it is defined before the function that calls it.
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.
|
|
|
|
|
Ahhh, OK.
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
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.
|
|
|
|