|
Did you link MFC statically or dynamically? It looks like it could not find the MFC DLLs, but it's just a guess. Try the Dependency Walker tool to check your executable for runtime dependencies, and verify if the machine has all the appropriates DLLs, or link everything statically.
I see dead pixels
Yes, even I am blogging now!
|
|
|
|
|
My application use MFC linked dinamically.
Dependency walker did not report problems, and as I said, the application run normally, if I move it from startup programs. The problem, as you point, could be that MFC is not available (loaded) at the particular time when application start. But for me this is really weird.
Thanks.
|
|
|
|
|
Hi there!
I want to change the name of a button name seen by the user at run time. Depending on how the user is using my program the name will change. I can use the code below to point to the button object, but I cannot figure out how to change the name of the item.
CButton* p = (CButton*)pVOS->dlg.GetDlgItem(IDC_BUTTON3);
The button name is initially set up in the resource editor.
Thanks,
Jerry
|
|
|
|
|
Use that instead:
pVOS->dlg.GetDlgItem(IDC_BUTTON3)->SetWindowText("Blah");
Hope this helps
|
|
|
|
|
Thanks for the info, have a good day.
Jerry
|
|
|
|
|
Is its possible to check if a new media is being inserted?
like a usb memory and so on. And if yes how?
|
|
|
|
|
WM_DEVICECHANGE
The WM_DEVICECHANGE device message notifies an application of a change to the hardware configuration of a device or the computer.
A window receives this message through its WindowProc function.
<br />
LRESULT CALLBACK WindowProc(<br />
HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam
);
|
|
|
|
|
Ok,
is ther an exemple I can use to see how it works?
|
|
|
|
|
Maybe like these?
1. Intercept the insertion/removal of a CD/DVD shaman74 Updated: 8 Apr 2005
Rating: 3.36 (9 votes)
How to intercept a new media in the drive, using WM_DEVICECHANGE message.
Interacting with the Operating System >> General
... Introduction While working (with Borland C++), I've found myself in the trouble to write an application that react to the insertion/removal of a media (CD/DVD) in one of the PC's drive. The Event After some surf on the web, I found that the best way to do this is to use a handler to a specific Windows message, WM_DEVICECHANGE , that is sent by the system when a media is inserted or removed, as specified in an MSDN page .> General
... Introduction This is a short article, written after many hours spent on the problem of refreshing a CD file system after burning. At the end, the solution I've found is very very simple, so I've decided to explain it here. The function I've used a call to the BroadcastSystemMessage function to send a WM_DEVICECHANGE message to Windows (XP in my case). The function is defined as follows (found on MSDN): long BroadcastSystemMessage( DWORD dwFlags, LPDWORD lpdwRecipients, UINT uiMes...
3. XDriveBar - Display drive buttons in a fixed toolbar Hans Dietrich Updated: 12 Aug 2003
Rating: 4.52 (14 votes)
XDriveBar implements a drive bar for the drives in a system. The demo project shows how to keep the drive bar in sync by handling the WM_DEVICECHANGE message.
Toolbar & Docking Window articles >> Toolbars
Download demo project - 61.3 Kb Introduction One of my favorite tools is the free 2xExplorer . It offers a very handy dual pane + tree view that really helps when you are working in several different directories. You can see some of the ways you can use 2xExplorer here . Anyway, one of the interesting things about 2xExplorer is that it has a drive bar next to the tree view...
4. Trapping windows messages Rui Reis Updated: 12 Apr 2003
Rating: 4.35 (15 votes)
Trapping windows messages in the .NET framework - a small tutorial
General .NET articles >> General
Download source files - 64.8 Kb Introduction To perform some tasks, we still need to trap unmanaged windows messages, even though we are developing managed code. This is a little tutorial that tries to clarify how to trap those messages using the .NET Framework. The code is written in C#. I believe it will be quite easy for those who are reading this document, and you can use VB.NET™ instead of C#, to port the concepts. Learn by example Now, to clarify...
|
|
|
|
|
|
today, when i open my workspace in vc6.0, i don't find my view class in workspace window. but the .pp and .h files of the view class still exist. other classes also exist. i can use class wizard to edit the view class. how can i get it back?
|
|
|
|
|
Yes sometimes it happens. In general, when you modify the .h file the problem is solved. Just add a blank line in the .h file and save the file, normally it should work.
|
|
|
|
|
Sometimes you might need to delete the temporary files (ncb, opt, aps, clw) and let them get recreated.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I want to edit some of my edit boxes before pasting data, so try to change them in OnEditPaste. This is working very good with Ctrl+V, but there is a problem. When i use right mouse button, there is a menu "copy, paste..." when i use that menus paste. OnEditPaste doesn't called.
is there a solution?
|
|
|
|
|
The right-click menu comes from Windows. You are not handling it. It will only paste what is on the windows clipboard.
Solution (In my opinion):
Subclass the edit control.
Then handle the mouse right-click in some way.
this is this.
|
|
|
|
|
anyway i have to write more code thank you
|
|
|
|
|
Are you handling the EN_CHANGE notification?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
at first i dont want to use EN_CHANGE, but then i found it as last solution and used it. But there is a class i wrote that is inherited form CEdit. I use it for currencies. It doesn't call en_change, so i have to use EN_UPDATE for my CMyEdit, i guess it is not a good solution. But it seems to work.
Also, can i only alter the pasted data in Dialog's with EN_CHANGE?
|
|
|
|
|
ugur_basak wrote:
But there is a class i wrote that is inherited form CEdit...It doesn't call en_change
Nor should it.
ugur_basak wrote:
...so i have to use EN_UPDATE...
This notification is sent when an edit control is about to redraw itself (after the control has formatted the text, but before it displays the text).
ugur_basak wrote:
Also, can i only alter the pasted data in Dialog's with EN_CHANGE?
This notification message is sent after the user has taken an action that may have altered text in an edit control. In other words, it's not a message that your code would send.
To change the text in an edit control, send it a WM_SETTEXT or EM_SETTEXTEX message.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi first of all: Is it possible to use my MFC DLL in a regular Win32 app?
If yes, how?
Does my MFC DLL have to meet any requirements? How do I for example handle an exported function that returns a CString in my Win32 app.
All tips are welcomed!
_____________________________
...and justice for all
APe
|
|
|
|
|
Certainly, is possible, like using any function exposed by a dll,
through LoadLibrary api.
But... what is the point? Why should you you make such a complicated thing, when you could use it normally???
|
|
|
|
|
I'm going to write a quite small dll for one of my customers and he says he don't use MFC. To accomplish my mission I like to write an MFC DLL. Isn't it only to check the dependencies on my MFC dll and distribute them to him too?
_____________________________
...and justice for all
APe
|
|
|
|
|
Yes, provided your MFC DLL was built with static or dynamic linking to mfc*.dll and possibly other standard dlls. It cannot be an MFC extension library.
|
|
|
|
|
hello, well I have the following problem...in my MFC project I am using atlbase.h, because I am working with CRegKey class. On my computer the .exe works just fine, but on a friend's of mine, it doesn't...and I created this project as a statically linked project...
this is the error
after the first error, this is what appears
|
|
|
|
|
maybe he is not allowed to enter the registry or the key is not found where you are looking for it!?
|
|
|
|