|
How can you change the text color based upon a variable, in a Statusbar pane?? I still new at this. The identifiers of the statusbox are private and not reconized by the onctlcolor function. What can I do??? Need help??? Thanks in advance.
Thank-you
Sincerely,
RAH
|
|
|
|
|
i have an owner drawn CListCtrl with a subclassed ownerdrawn CHeaderCtrl.
i can successfully detect the item(s) i want to hide in both the CListCtrl::DrawItem() and
CHeaderCtrl::DrawItem() functions. i simply do not draw then. this is fine except that the
header control still draws the button like appearance of the column that i don't want.
does anyone know how to catch the message that is drawing this before DrawItem() is
called. and if so, what message is it?
am i even doing this right?
scott.
|
|
|
|
|
How I can paste a bitmap which is contain in the clipboard to a file? I really don't know how to do it. Could someone help me? Thank You.
Yours sincerely,
Raymond
Visual C++
|
|
|
|
|
Check out the bitmap saving class added to Code Project last week.
Christian
Secrets of a happy marriage #27:
Never go to bed if you are mad at each other. It's more fun to stay up and fight.
|
|
|
|
|
How I can paste a bitmap which is contain in the clipboard to a file? I really don't know how to do it. Could someone help me? Thank You.
Yours sincerely,
Raymond
Visual C++
|
|
|
|
|
Does any one have an example of exporting records/tables in an access.mdb file to a ascii text file in MFC.
Any help will be greatly appreciated.
ojacksonw@yahoo.com
ojacksonw@yahoo.com
|
|
|
|
|
I've been playing with ADO and it's pretty easy to read them out using ADO and access the records. It would be trivial to then write them to disk.
There are some ADO classes on this site ( not that I used them, but they should explain it better than I can )
Christian
Secrets of a happy marriage #27:
Never go to bed if you are mad at each other. It's more fun to stay up and fight.
|
|
|
|
|
Thanks for the response. Iwould appreciate any help with the code. I am able to add and delete records using DAO and I need a comma delimited text file to use with another program upon exporting.
thanks
|
|
|
|
|
someone can help me to implement a function that allows users to select a region of the screen with mouse ?
Thank
Leo.
|
|
|
|
|
Hi,
I've got a Dr Watson eachtime I want to print with a program generated on a Win200 machine.
(The programm is created with Windows Installer 1.1)
It use a CPrintDialog.
In the Dr Watson file, there is a Kernel32!RaiseException with a return code = c06D007e
Can someone help me ???
Guitch
|
|
|
|
|
You, or someone else, create a program with Windows Installer that has printing capabilities. I must have missed that day of the class. I think you mean that you are using a program installed via a Windows Installer package. Do other programs have similar errors? Do you have the code for this program?
|
|
|
|
|
Hi,
I'm trying to implement a drag drop within my MFC, MDI based app.
I have a CTreeView derived view, and I've implemented drag drop with it. I want the user to be able to drag treeview items and drop them on another window in my application.
I haven't implemented everything yet, but I'm taking it step by step. Here's what I've done
1. Handled the TreeView notification TVN_BEGINDRAG. Used the TreeCtrl to create a drag image list, done a BeginDrag and a DragEnter, set a member pointer to this window (m_p_wndDragSrc) in my main frame, and then SetCapture() in the main frame, my CMDIFrame derived window...
2. The CMDIFrame window handles WM_MOUSEMOVE to update the imagelist/pointer location.
That much all works fine.
What I want to happen is that when a drag starts, if the cursor is moved over a different child window in the main frame, that window should be brought to the front.
I've tryed code like this in the CMainFrame::OnMouseMove function:
CWnd *p_wndUnderPoint=ChildWindowFromPoint(point);
if (p_wndUnderPoint && (p_wndUnderPoint != this))
p_wndUnderPoint->SetFocus();
Unfortunately, this doesn't do anything. I've tryed all sorts of possible CWnd:: functions, like SetFOcus, BringWindowToTop and so on. But none of them have the desired effect.
Can anyone give me some pointers? (pun. bad one. sorry)
Thanks in advance for your help
Jon
|
|
|
|
|
If you get any answer,Please E-mail to me.
datablader@263.net
Thank you!
|
|
|
|
|
In my formview I've placed a flexgrid. I've also rezised it to fit the window by using WM_SIZE. Because the flex grid is placed on a formview you can see a small border around the flex grid when you run the application. I don't want to see this border. Can anyone please give me an example in how I remove it. I've read that WM_NCPAINT maybe can be useful but I don't know how to use it.
|
|
|
|
|
Hi,
I'm trying to put large text files in rich edit controls but a rich edit only accepts 4K standard.
Somebody able to help me?
Thanks.
|
|
|
|
|
|
I am modifying a project that uses Shell_NotifyIcon to add an application to the system tray. What I want is to prevent the same application running more than once. The project is not using MFC and I would prefer to keep it that way. Is there any way to detect the applications running in the System Tray using the API?
|
|
|
|
|
You could use the ::FindWindow(..)
hope that helps
|
|
|
|
|
You can enumerate the processes on the system, but this works differently for Win 9x and NT systems.
I can dig out some sample code if you need it, as I've used it to detect if a program was running, and if so to wait for it to finish.
Giles
|
|
|
|
|
I to all.
I've a little problem on trying to intercept the WM_QUIT message on an MFC based application.
I want to display a message on user which allow select to exit application or not.
I'm not using Document/View architecture so I don't need to mark any document to dirty.
Thanks to anyone.
|
|
|
|
|
Try to put this code in OnAppExit of your CMainFrame class
if (AfxMessageBox("Do you really want to exit?",MB_YESNO) == IDYES)
{
CMainFrame::OnClose();
}
Lio.
|
|
|
|
|
Thank you for this code Lio, now another question: and if I have a CListCtrl Document?
Thanks a lot.
|
|
|
|
|
I created a dll (Win32- Dynamic Link Library)
and I'm having a trouble loading that DLL ( using 'LoadLibrary' / 'GetModuleHandle')
*** I keep getting a NULL or the handle is invalid. (GetLastError() returns 6 or 126) ***
PLEASE, I've been on then about 6 hours straight.
Is there anything I'm missing ????
NOTES:
1: Could it be that functions can not be importable?
2: Could it be that the released .dll file is damaged?
please H E L P ! ! !
Name: STR
|
|
|
|
|
Hi,
The GetLastError() function of yr's says "Handle invalid"(6) and "Module can't be found"(126).So, I hope problem with the Dll path u have given.First find out in which path yr Dll is present and give that path in the LoadLibrary()/GetModuleHandle() function.Then check for the handle.This could be the only problem I hope.Let me know if it works.
Regards,
yamini.
|
|
|
|
|
Thanks for your quick answer
But...
That is not the problem.
I could this function like this:
1: 'LoadLibrary("c:\\MyDLL2.DLL")'
or
2: 'LoadLibrary(_T("c:\\MyDLL2.DLL"))'
or
3: 'LoadLibrary((LPCTSTR)"c:\\MyDLL2.DLL")'
*) I added 'C:\MyDLL2.lib' in Project->Settings...
*) I added 'C:\' to the system path
*) I added 'C:\' to the project path (in Project->Settings)
I don't know what to do
Name: STR
|
|
|
|