|
Hi,
I'm new to Win32 programming, and I have to add dialog resource and management in a static lib in order to be used by other application.
I've added dialog resource in lib project and include all ATL stuff inside lib.
Everything compile ok but ATL create dialog function failed with 1812 error, complaining that no resource are present in exe image.
The base application is a classic win32 project without MFC.
What should I check ?
Thanks
Fabrice
|
|
|
|
|
Resources go into Dynamic Link Libraies or executables. They do not go into static link libraries.
|
|
|
|
|
Hi everyone.
I would like to connect to an sql database using MDAC. Can anyone give me a piece of code that shows how to create the connection object and what headers/other file I have to use ?
THANKZ.
|
|
|
|
|
|
Thankz ... I have found there the clues I needed
|
|
|
|
|
How do you open another form when you click on a command button.
I tried looking up the information using the forum search etc but it comes up with no results.
Thank you
|
|
|
|
|
BritishEmpire wrote:
How do you open another form when you click on a command button.
This sounds like VB syntax, or have the terms "form" and "command button" been moved into VC++ .Net also? What exactly is it that you are trying to do?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I am trying to open another dialog when you click on a button. For example when a user clicks on a button called eg Payment I want it to open the dialog called payment.
Thanks
|
|
|
|
|
See here for an example of a modal dialog.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hiho@ll
i'm using the Visual Studio .Net 2003 Setup Wizard Project
to create a Install Shield for my Application
during creation of the setup files i get an error and a warning:
Error: urlmon.dll must be excluded because the source file c:\windows\system32\urlmon.dll is under the windows system file protection.
Warning: iphlpapi.dll must be excluded because the source file c:\windows\system32\iphlpapi.dll is under the windows system file protection.
i'm running WinXP service pack 2 using the Administration account
for MFC71D.DLL it works, but it's also in the windows\system32 directory!
what's the difference between mfc71d.dll and urlmon.dll, iphlpapi.dll
(excuse for my bad english)
thx@ll
|
|
|
|
|
MFC71D.DLL is the Debug version of the MFC runtime. The redist.txt file supplied with VS.NET 2003, which lists the files you're allowed to redistribute, does not list this file. You should build a Release version of your project and include the vc_user_mfc71_rtl_x86_---.msm merge module in your package. If you have not yet built and tested a release version read Surviving the Release Version[^].
urlmon.dll is part of Internet Explorer and must not be redistributed. If you require a particular version of this component you should ask your users to install that version of IE.
iphlpapi.dll is part of Windows and must not be redistributed separately.
Redistributing components that are part of Windows is a major cause of "DLL Hell"[^]. This was precisely why Windows File Protection was added to Windows: to prevent this kind of erroneous redistribution of OS components.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
wow
thx for your reply!
didn't know this
thx
|
|
|
|
|
Does anyone know how to create an icon in a program? I would like to create a icon that has dynamic text to be displayed in the systray or elsewhere. I've found examples of how to draw text on bitmaps, but I can't seem to find an example of how to do this with an icon.
Thanks in advance for the help.
|
|
|
|
|
Lookup CreateIconIndirect in MSDN.
You have to draw your text onto two bitmaps, The first on is the colour bitmap that has the icon as you want to see it, and the second is a black and white mask bitmap that is used for the outline of the opaque and transparent parts of the icon, black being opaque and white being transparent. Use CreateIconIndirect to combine these two bitmaps into an icon.
[plug]
Check out http://www.codeproject.com/tools/imageviewer.asp[^] for a tool that makes it very easy to debug bitmaps and icons.
[/plug]
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
PJ Arends wrote:
Lookup CreateIconIndirect in MSDN.
Wow! Now why couldn't I find this on my own? Must have been having a blond moment.
Also, thanks for the explanation and the plug. This should give me enough to keep me at the keyboard and away from the family for a while
Thanks!
|
|
|
|
|
Need to know how to handle mouse single & double click events for a dynamically created list on a dialogbar.
Can anyone also tell me if a dialog can be docked at the bottom of a window in an SDI application.
laiju
|
|
|
|
|
hello,
Sir,
firstly thanks for your great work related this artical
becoz this artical has help me very nuch!.
But still i have a Que -how can i get image into memory.
i mean to say that i want to transer current desktop image to
another Pc so how can collect current desktop image.I have alredy tried it by creating bitmap file(.bmp) and then sending
that file to another PC.But problem is that becoz of file r/w
there is too long delay so that at another end cant get current image.If anybody has idies or solN then help me.
|
|
|
|
|
Anybody know how to make small size enums (less than an integer)?
|
|
|
|
|
An int is 4 bytes, whereas char and short are 2 bytes. Does that help?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Yes...But how to make enums small like it?
|
|
|
|
|
Good question, that may not be so easy to answer.
- Some compilers make the size of enumerated types variable, and enough to store the values they store (signed/unsigned 8,16,32 bits).
- Some compilers allow to set the size of enum types via compiler flags (I did not see any correspondign flag VC that does this)
- C and C++ have a different interpretation of enum values.
- VC uses a fixed value of 4 bytes for storing enum types.(As David said before)
IMHO, don't use enum types if you want to 'store' values that their size is important.(Even if these values are 'constants')
Just wanted to help.
-- Ricky Marek (AKA: rbid)
-- "Things are only impossible until they are not" --- Jean-Luc Picard
My articles
|
|
|
|
|
I'd like to read the text in a couple of richedit controls. This should be done by hooks.
I have installed a syswide hook written in a DLL, with source taken from a project here.
There seems to be alot of helpfull "angels" here, and I'd like som help to understand what's wrong with my app.
The Winspector Spy program receives the EM_REPLACESEL wich contains the newly added line to the control. They can also display the text, so winspector spy can hook messages syswide, and display the text I'm looking for.
But how do I implement it? I havn't seen any projects here that can do what I'm asking for. But I think that some of you know more about winspector, and maybe know how to be able to read the EM_REPLACESEL messages.
|
|
|
|
|
The hook is installed like this:
g_hHook = SetWindowsHookEx(WH_GETMESSAGE, (HOOKPROC)msghook, g_hInstance, 0);
The msghook function is located in a DLL (as the other hook handling functions).
With this code, should my program receive all messages in the system?
The msghook function it looks like this:
...
...
if( msg->hwnd == g_hSpyWnd ){
PostMessage( g_hServerWnd, g_uSrvMsg , EM_REPLACESEL, msg->lParam );
}
...
...
The problem is that my program only receives messages if I the window I spy on has focus....any ideas why?
|
|
|
|
|
Correct line:
PostMessage( g_hServerWnd, g_uSrvMsg , msg->message, msg->lParam );
And the only message my hook registers is WM_PAINT. Why is that? Do I have to install the hook in another way to get messages posted in the richedits messagequeue?
|
|
|
|
|
HI ,
I have a Data in ListBox in a Dialog .. build in VC++.
I want to Copy this data to MS Excel .. columns and rows
How can i Do it , / wt is the way to do it .
any Example etc.
thanx
Regards.
|
|
|
|