|
If you're able to convert the .gif image to a .bmp , you can use this[^] button class if you add the .bmp to your app's resource.
/ravi
|
|
|
|
|
Thanks for your help, I had downloaded and tested, it's a really good button class, but it's like all the other classes, it's too many function, but I just want my button can act like a CBitmapButton and can use a bmp which make it transparent by myself, so if I want to fetch some codes that I really need, then insert into my project, it would cost too much time, because I still not familiar with MFC, and the time I have is too less, so, I need a component which simply for single subject for me to use, otherwise, override maybe my best choice, if there is any one can tell me the way, but thanks for you help anyway
|
|
|
|
|
af14001 wrote: it's too many function,
Actually it's easier to use than a standard bitmap button. All you need to do is add a single line of code in your OnInitDialog() method to set the FooButton instance's bitmap. The demo program source illustrates this.
btnBitmapButton.setBitmapId (IDB_MY_BITMAP);
/ravi
|
|
|
|
|
i am having three check boxes in a dialog. when the dialog opens the three check boxes should be in check also user could not make it uncheck. how to do this
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
deeps_cute wrote: check boxes should be in check
Call CheckDlgButton() in your dialog's OnInitDialog() method.
deeps_cute wrote: user could not make it uncheck.
Call EnableWindow() to disable the check box(es).
/ravi
|
|
|
|
|
but i should not disable the check box
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
But you said "user could not make it uncheck"
|
|
|
|
|
uncheck the auto optio in the properties of check box
|
|
|
|
|
i am having an exe to unzip a file ,i have to pass file name(To be unzipped) as argument to this exe.How to this in mfc.
|
|
|
|
|
// You could use one of the many versions of spawn to pass arguments to an executable that you spawn.
#include <process.h>
_spawnlp(_P_WAIT,"notepad.exe"," c:\\temp\\SomeTextFile.txt",NULL);
// Or, you could get fancy and use ShellExecuteEx
SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = "notepad.exe";
ShExecInfo.lpParameters = "c:\\temp\\SomeTextFile.txt";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
|
|
|
|
|
i tried as
SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = "c:\\pkunzip.exe";
ShExecInfo.lpParameters = "-d NewFolder.zip";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
but it didnt work
|
|
|
|
|
Don't forget to include the path to NewFolder.zip
|
|
|
|
|
When I run my application, the output window give me:
'zw_gui2.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded.
'zw_gui2.exe': Unloaded 'C:\WINDOWS\system32\version.dll'
'zw_gui2.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded.
'zw_gui2.exe': Unloaded 'C:\WINDOWS\system32\version.dll'
...
'zw_gui2.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded.
'zw_gui2.exe': Unloaded 'C:\WINDOWS\system32\version.dll'
Well, I know that, please just tell me once, don't say so many times! What are these messages? Can I turn it off? Thanks for your help.
hsu
|
|
|
|
|
the messages tell u the specific module is being loaded, no symbol file means u couldn't switch in that module's code, and debug step by step.
life is like a box of chocolate,you never know what you r going to get.
|
|
|
|
|
Hi all,
Would you help me to change the default sound device with an api or something else...
I do not need the entire application, only the api if possible.
Thanks...
|
|
|
|
|
AFAIK it's not possible. There was a registry hack in XP but I can't remember it (Google
it maybe).
From what I've read, Microsoft states this is intentional - so software can't override user
hardware settings.
Also, Multimedia APIs and DirectSound let you pick devices anyway, so I suppose it's not
necessary.
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
First of all, please forgive for my english. Here's my problem.
I use Visual C++ 6.0 with MFC. I've 2 independant Dialog based projects. I'd like to re(use) the 2 dialog boxes in a new MFC project, without having to retype all the code and the ressources. Is it possible to integrate existing projects into a new one? Thanks.
|
|
|
|
|
Retyping would be extreme - you could, at the very least, copy/paste the code (that's code
reusablility!).
There's a variety of ways, here's a few:
1) copy/paste (bad - if you fix/change one then you have to remember to change all copies)
2) Keep a separate folder of common code/resources that can be shared by projects
3) Compile common code to a static library
4) Compile common code to a DLL
Resource files allow including other resource files. To share with MFC you'll need to set it
up so resource IDs don't clash anywhere.
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Thanks a lot for your answer. But can you tell me how to use more than 1 ressource file in a MFC project ? Thanks
|
|
|
|
|
|
How to unzip folders through mfc code
|
|
|
|
|
|
Hi all.
I want to scroll the list box contents automatically when user places mouse cursor over scroll bar arrows. The list should keep scrolling its contents as long as user places mouse cursor over the arrows.
OnNcHitTest(CPoint point) is also not that helpful as it is called when mouse is moved. I want an event which will be called by framework even when user just keeps his cursor steady over the arrows of List box scrolls.
How I can do this?
Thanks
Sameer Thakur
|
|
|
|
|
If you can use of CListCtrl it has a property than when you hold cursor on the item it select this item
|
|
|
|
|
U may look up WM_NCHITTEST in MSN, it maybe gives u somehelp.
life is like a box of chocolate,you never know what you r going to get.
|
|
|
|