|
I keep getting the following error
Cannot find import;Dll may be missing, corrupt, or wrong version file "MFC42.DLL", ordinal 6467(error 127)
Can anyone help me with this.
Meena
|
|
|
|
|
What are you doing when this error appears? Does the file exist on the machine? Is there more than one occurrence?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi,
I am trying to make Nishant Sivakumar - "Using global hotkeys" start hidden:
http://www.codeproject.com/system/nishhotkeys01.asp
I have added the hidden modal code from Nishant Sivakumar - "Some handy dialog box tricks, tips and workarounds ":
http://www.codeproject.com/dialog/dlgboxtricks.asp
It compiles, but it doesn't become hidden.
Changes to the "Using global hotkeys" project I made:
In "HotKeyTestDlg.cpp" I added:
void CHotKeyTestDlg::OnWindowPosChanging(WINDOWPOS * pos)
{
if(!visible)
pos->flags &= ~SWP_SHOWWINDOW;
CDialog::OnWindowPosChanging(pos);
}
and added "visible = FALSE;" to:
CHotKeyTestDlg::CHotKeyTestDlg(CWnd* pParent /*=NULL*/)
: CDialog(CHotKeyTestDlg::IDD, pParent)
In "HotKeyTestDlg.h" I added "BOOL visible;" to protected under:
class CHotKeyTestDlg : public CDialog
This wouldn't compile "error C2509: 'OnWindowPosChanging' : member function not declared in 'CHotKeyTestDlg'" till I added "void OnWindowPosChanging(WINDOWPOS * pos);" to public under:
class CHotKeyTestDlg : public CDialog
So it now compiles and runs, but it doesn't start hidden.
|
|
|
|
|
balaclavabob wrote:
This wouldn't compile...
You could have avoided all of this hassle by letting ClassWizard add the method for you. It would have updated both the .cpp and .h files.
balaclavabob wrote:
So it now compiles and runs, but it doesn't start hidden.
Cab you confirm that the pos->flags &= ~SWP_SHOWWINDOW statement is actually executed? If not, is visible being changed to TRUE somewhere?
Do you have any calls to ShowWindow() ?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
DavidCrow wrote:
You could have avoided all of this hassle by letting ClassWizard add the method for you. It would have updated both the .cpp and .h files.
MFC is something I have been told to avoid at all costs and just go and learn .Net, so my knowledge of MFC is quite limited.
DavidCrow wrote:
Cab you confirm that the pos->flags &= ~SWP_SHOWWINDOW statement is actually executed? If not, is visible being changed to TRUE somewhere?
It is not executing, I tried both:
void CHotKeyTestDlg::OnWindowPosChanging(WINDOWPOS * pos)
{
if(!visible)
{
pos->flags &= ~SWP_SHOWWINDOW;
MessageBox("This executed");
}
CDialog::OnWindowPosChanging(pos);
}
void CHotKeyTestDlg::OnWindowPosChanging(WINDOWPOS * pos)
{
pos->flags &= ~SWP_SHOWWINDOW;
MessageBox("This executed");
CDialog::OnWindowPosChanging(pos);
}
both didn't bring up the message box.
visible is always false for the entire length of the program, I haven't modified it anywhere and it isn't being modified by anything.
DavidCrow wrote:
Do you have any calls to ShowWindow()?
I have no calls to ShowWindow() at all.
|
|
|
|
|
You failed to add ON_WM_WINDOWPOSCHANGING() to the dialog's message map. This is something that ClassWizard would have handled for you!
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I added it manually and it worked.
I was looking thru the ClassWizard and unless I added in ON_WM_WINDOWPOSCHANGING() manually it wouldn't have appeared....
For future reference how should I use ClassWizard todo something like this....
Thanks for your help.
|
|
|
|
|
balaclavabob wrote:
I was looking thru the ClassWizard and unless I added in ON_WM_WINDOWPOSCHANGING() manually it wouldn't have appeared....
Wrong again. ClassWizard has somehow been set to only show dialog-related messages. Click the Class Info tab and select Window in the Message filter: combobox. Back on the Message Maps tab, you should see WM_WINDOWPOSCHANGING in the list of messages.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
DavidCrow wrote:
Wrong again. ClassWizard has somehow been set to only show dialog-related messages. Click the Class Info tab and select Window in the Message filter: combobox. Back on the Message Maps tab, you should see WM_WINDOWPOSCHANGING in the list of messages.
Thanks it worked.
|
|
|
|
|
Im working on a Window program written in Visual C,
and I need to display a png file in a window, but
AFAIK the window GDI has no such possibility,
anyone has a clue how to do this ?
(and please dont come with an answer like: libpng.. )
|
|
|
|
|
Hello
libpng just arised in my mind, but ...
grep2 wrote:
(and please dont come with an answer like: libpng.. )
What is the problem with it ? Why don't you like it ?
Maybe you should try GDI+ ?
Andrew
|
|
|
|
|
If it is a Visual C++ 6.0 program you should try cximage here on CP. (Do a search)
|
|
|
|
|
Hi all;
I have a Mail server project that i have to submit in 2 months and i would like to code it using VC++, and I thought if any one could provide help...:->
SS
|
|
|
|
|
saood swar wrote:
I thought if any one could provide help...
What type of help do you need ?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
ANY KIND OF HELP; LIKE SOURCE CODES, HINTS, WEB SITES, OR EVEN SAMPLE PROJECTS..
MANY THNX..
SS
|
|
|
|
|
It appears you're trying to get someone to do your homework for you. You'll be doing yourself a disservice by not tackling the problem yourself.
If you're looking for ideas, here's[^] a list of open source mail systems you may want to explore.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
How Can I add this statement using MSXML in C++
Please Help me
Regards
|
|
|
|
|
Hi All,
I have an C++ application
The results obtained from this application are written into a CSV file.
Format of CSV file : Fixed length file with 5 fields. Key is an integer value which can be duplicated.
So for a particular key value, i can have more than one record.
Inorder to get the records for a particular key, i need to traverse the whole CSV file and get all the results.
One method that can be implemented is first sort the whole CSV file and then traverse all the records.
Is there any efficient method to do the same?
Thanks and Regards,
Sree
|
|
|
|
|
I would tend to iterate through the file once, and put all the values into a multimap, using a struct for the value. Then you can look up any key you like.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello,
i am currently trying to call a C++ function from inline assembler code. This works fine. But I habe a problem with getting the return value of the called function.
Here my code:
float func(float h)<br />
{<br />
std::cout << h;<br />
return 78.0f;<br />
}<br />
<br />
int _tmain(int argc, _TCHAR* argv[])<br />
{<br />
float par = 67.5f;<br />
int adr = reinterpret_cast<int>(&func);<br />
_asm<br />
{<br />
push par;
call adr;
add esp, 4;
mov par, eax;
}<br />
<br />
std::cout << par;<br />
std::cin.get();<br />
return 0;<br />
}<br />
Normally par should store 78.0f now. But that's not the case.
Somebody is seeing my fault?
Thanks
Georg
|
|
|
|
|
I haven't done a lot with floating point assembler but you have a push and no corresponding pop.
Elaine
The tigress is here
|
|
|
|
|
I have found the error now. The "mov" command is ok, but only for integers. If i'm using floats, i must use "fstp":
_asm<br />
{<br />
push par;
call adr;
add esp, 4;
fstp par;<br />
}
Georg
|
|
|
|
|
Hello all,
I have a simple DLL is built by VB like this:
Public Function SayStatement(sSta as String) as String
SayStatement = sSta
End Function
Now I don't know how to use that DLL in VC++ environment (I meant that a message will be showed up when user click a button that used SayStatement function).
Thank you very much.
Regards,
|
|
|
|
|
If you mean an ActiveX DLL, then this is a COM dll. So you can use whatever your favoured C++ method for accessing COM objects.
I prefer #import as that generates a nice C++ wrapper, but you can use the old fashioned CoCreateInstance as well. Have a read on MSDN for more details.
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
I am facing a problem with a small application that I have recently developed. The application runs well for a few days and at a moment there is an error message like “User Breakpoint called from code” … when I debug the application it stops at a line where in assembly the code looks like “int 3” . Anyone has any suggestion about how to track this in my code.
Thank you.
|
|
|
|