|
Its just like the paintbrush program in WINDOWS.... There are no layers... as soon as I erase on an area it will be erased, the area will show a white color which is the color of my drawing area...
I'm using FreeImage....
thank you for looking into this...
|
|
|
|
|
Too easy - you just want a drawing tool that always draws in white. Where are you stuck ?
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
Can you give me a code for the eraser tool coz i really need it and i am quite new using MFC.... thanks
|
|
|
|
|
What paint tools have you written, any ? What is the architecture of your program ?
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
Hi,
I have written a SDI based MFC Application.In that i have
((CMyAppApp*)AfxGetApp())->m_pMainWnd ->EnableWindow(FALSE);//I want to disable all the keyboard & mouse inputs for my main window.
After this
If i write
if(((CMyAppApp*)AfxGetApp())->m_pMainWnd ->IsWindowEnabled())
It returns me TRUE;//ie window is enabled.
Could any one pl tell me why it is failing to disable the window?
Thanks
Neha
|
|
|
|
|
I've just created a fresh SDI app and added a command handler where I inserted your very line of code, and everything works as expected (i.e. the main window is disabled and IsWindowEnabled returns FALSE ). Are you doing something bizzare in the processing of the WM_ENABLE message?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Neha wrote:
((CMyAppApp*)AfxGetApp())->m_pMainWnd ->EnableWindow(FALSE);//I want to disable all the keyboard & mouse inputs for my main window.
Could you tell us, where you have put this code.
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
I had written that in a OnButtonClick()..
|
|
|
|
|
The frame window's OnButtonClick???
Or the view window's OnButtonClick???
Remember that the button messages go to the view and are not handled by the frame window, unless there is no view window.
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
Thanks for the reply.
It was in View Window.
I got the problem fixed,i had just removed (CMyAppApp*).
It worked fine.
Thanks again..
Neha
|
|
|
|
|
Hi,
I have an instance of Ms Word automated, and I would like to go iterating through all the ActiveX that the doc contains, it´s that possible ?
( I have some ActiveX of my own in that doc, so my idea is to iterate through all the controls and ask if they have my interface implemented, to handle them or not).
Thanks, Bye !
Braulio
|
|
|
|
|
HI
I will have to develope a new telephony service provider. I want Outlook can choose my new tsp from the dial options and also it appears in the modems advanced tab as ne telephony service.
Can someone tell me where I can download a source code to see it and use it as a guide??
Thank you
|
|
|
|
|
|
I think the platform sdk has some TSPI samples. Do a search for TSPI on MSDN.
Are you developing a TSP for some new hardware?
This site is also very useful when it comes to TAPI. http://www.julmar.com/
Michael
|
|
|
|
|
Yes it is a new TSP for an aplication. I want the tsp comunicates with TCPIP with an Envox aplication. Have you heard about Envox?. The purpose is that a company may call without having a modem each maching instead of that it will be a server doing that purpose with envox software and Dialogic boards.
|
|
|
|
|
I've never heard on Envox before. I've just looked at the web-site and I'm still none the wiser.
In the past I've used Remote TAPI to allow client machines to dial from a PBX attached to a server. If your server already has a TSP then it's worth a look.
A TSP is basically just a C DLL with it's extension renamed. You have to write each of the TAPI functions that you will be calling. It's fairly straight forward thing to do, but TAPI has a lot of interesting "quirks" that you'll run into. (Especially with the variable length structures)
Windows Telephony Programming by Chris Sells is a good book for getting to know TAPI and TSPI. http://www.sellsbrothers.com/writing/telprog/
Michael
|
|
|
|
|
I'm a PowerBuilder developer and I have a question about the common controls. From my applications there are some macro's I can use, but others aren't recognized (actually, the only one are those for the imagelist control).
When using Quick View these and the ones starting with FlatSB_ are the only macros shown in the export table. My question is: why are these the only ones shown and is there a way to use them anyway.
Thanks in advance,
Aart
|
|
|
|
|
|
Hi,All
I am looking for API which will find a file for me,i have file name only.
File can be in any drive.I want to find complete path of that file.
Can anybody help on this?
Thanx and Regards
Tushar
|
|
|
|
|
I dont' know if there is a super function to do all of the work for you, but you can recursively scan all of the files in a directory with FindFirstFile and FindNextFile.
FindFirstFile will return a file search handle and a file info structure. You can analyze this structure to see if it is the file that you are looking for, if not move to the next file by calling FindNextFile with your search handle. If the files flags indicate that it is a directory, you can recursively search that directory as well.
When you are done you will need to call FindClose in order to free all of the memory that was allocated by your searching.
|
|
|
|
|
Or in MFC use CFileFind
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Here is some code that will find find a file given the file name and a starting directory.
CString *FindFile(LPCTSTR szFileFind, LPCTSTR szStartPath)
{
HANDLE hFind;
WIN32_FIND_DATA fd;
CString strPathName;
CString strFileSpec;
CString *pstrReturn = NULL;
strPathName = szStartPath;
if(strPathName.Right(1) != "\\")
strPathName += "\\";
TRACE("Looking in: %s\n", (LPCTSTR)strPathName);
strFileSpec = strPathName;
strFileSpec += "*.*";
if((hFind = ::FindFirstFile((LPCTSTR)strFileSpec, &fd)) != INVALID_HANDLE_VALUE)
{
do
{
CString strFileName = fd.cFileName;
if((strFileName != ".") && (strFileName != ".."))
{
if(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
strFileName = strPathName + strFileName;
pstrReturn = FindFile(szFileFind, strFileName);
if(pstrReturn)
break;
}
else
{
if(strFileName.CompareNoCase(szFileFind) == 0)
{
pstrReturn = new CString(strPathName + strFileName);
TRACE("FOUND!!! - %s\n", (LPCTSTR)*pstrReturn);
break;
}
}
}
} while(::FindNextFile(hFind, &fd));
::FindClose(hFind);
}
return pstrReturn;
}
Note that this is a recurvie function, but since it only pushes 3 pointers on the stack it can call itself a lot of times with out causing a stack overflow.
Note also it is returning a pointer to an allocated CString object. So if it doesn't return NULL (could not find the file), then you must delete the CString object when done with it.
Call it like this:
CString *pstr = FindFile("Win.ini", "C:\\");
if(pstr)
{
delete pstr;
}
I hope this helps.
Jonathan Craig
www.mcw-tech.com
|
|
|
|
|
how long does it take on average until a person switching from Win32 API to MFC starts getting the hang of MFC. I ask this because I've been working with MFC now for about two weeks or so, doing examples from books and web sites, looking at code generated by the AppWizard, etc., and have only been able to firmly grasp the most basic of MFC concepts. Thanks.
-AJ
P.S. If anyone here knows of a straightforward tutorial on getting into MFC programming, it'd be a great help to me. Thanks.
I code, therefore I am
|
|
|
|
|
How long is a piece of string ? I got pointers right away, other people struggle. I reckon I took longer to get the hang of ATL than most people. Everyone is different, and IMO how long other people take does not matter. What matters is just that you stick with it and do your best to learn to the best of YOUR ability.
I believe the Jeff Prosise book on MFC is a good one. Personally I used about 6 other books in tandem ( can't remember any of them now ), and the MSDN a LOT. I also downloaded heaps of code from CP and experimented with it. Also, don't feel you need to understand everything the wizard generates in one go. Ultimately, MFC is just a wrapper on Win32, in fact a lot of MFC classes, such as CDC, are a thin wrapper around the functions that deal with a resource such as a HDC.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
There are some excellent free books online at InformIT. Sign up and click on Free Library, and look for the books on Visual C++ 6... I think there are two of them. They're how I got my feet wet with MFC, and they're basically a collection of tutorials, with one chapter set to show you one separate aspect of MFC by example.
- Jason
Do you have a Pulse?
SonorkID: 100.611
[kritz] and if my os was any more up to date it would be made in the future
|
|
|
|