|
I understand your sarcasm But this is a wrong way to use only ONE library. I'm not saying that MFC is bad. Otherwise, it is really good work done on it, and it is very useful. But you always have to use the best from all you know, to combine libraries, techniks, etc. And your code will be the best.
Show me another QUICK way to tell to another application to do something? Or simple to pass an integer
Yes, yes, I know, there are many. File mappings, shared variables, hard disks.... But this one is the simplest
So never say NO to old technologies (BTW, who said that Win API is an old technology?)
Philip Patrick
"Two beer or not two beer?" <shakesbeer>
Web-site: www.saintopatrick.com
|
|
|
|
|
We will never be in the same step of Micro$oft technology.And one day U would suddenly find that a simplest but most efficiently method provided by M$.They ALWAYS do this with a reasonable pretence,just for M$ own benefit but really for convenience of developers.
U know there are two major team in CHINA:RAD and NON-RAD.They fight for an appellation that "Which is the best".I do think it is fastidium to discuss such an issue.
Different method fits for Different Area.WM_ or MFC or WM_+MFC......
|
|
|
|
|
Well, you are right Have nothing to add to your words
Philip Patrick
"Two beer or not two beer?" <shakesbeer>
Web-site: www.saintopatrick.com
|
|
|
|
|
I started learning VC++ in 1999 and followed the microsoft curriculum for certifications. At that time I was a good C++ programmer on DOS and then I started using C++ for windows utilizing MFC platform. I didn't waste my time on writing Windows Programs using WinMain approach and I like MFC very much.
I gave the certification papers on VC++ in the year 2000 and since then I've been programming in VC++ regularly.
Now the problem with me is that I don't know the art of creating custom controls and Custom User Interfaces in VC++/MFC. We can see very good source code at codeproject regularly on the concerned topics. So my question to all of you is that "What is the "step-by-step" approach of learning how to create custom userinterfaces in VC++/MFC" ??
Plz help me in this regard. Suggest me good books or resources etc...
Jahnn Lee
|
|
|
|
|
If you're not sure how MFC does things MFC Internals is a good book, so is 'The MFC Answer Book'. But overall, you've probably already answered the question, this site is full of such custom controls, your best bet is really to look for well written articles that explan how some of those were created, download the source and start changing it to see what happens.
It probably wouldn't hurt to learn some Win32 so you get a better appreciation of what MFC is doing for you, but the MFC Internals book will give you that also.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Hi,
Does anyone know how to add spanish\french\italian or any other language support to the Microsoft's Speech API engine?
thanks
|
|
|
|
|
At the sapi website download page, it gives you the opertunity to download language packs.
==================================================
The Eclypse
|
|
|
|
|
FORGET IT MAN,impossible!!
|
|
|
|
|
Hey,
Anyone knows how to convert a CImage to an HBITMAP ?
Thanks.
|
|
|
|
|
What is a CImage ? If it's a bitmap of some sort, unless it's a DIB, it surely has operator HBITMAP defined ?
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
CImage is available when using Microsoft Forms Image 2.0 control.
and it doesn't have HBITMAP operator.
I think it has something to do with IPictureDisp and IPicture.
Hope it helps.
|
|
|
|
|
It's not mentioned in the latest MSDN. If it's a COM object, it may support an IStream, in which case you can get it via a GDI+ Image object. Beyond that I do not know.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
I don't know about CImage too... but if you have access to IPicture , it is easy. This interface has get_Handle(OLE_HANDLE* pHandle) function. After return, the pointer inside pHandle is actually HBITMAP
Hope this will help you
Philip Patrick
"Two beer or not two beer?" <shakesbeer>
Web-site: www.saintopatrick.com
|
|
|
|
|
Question 1:
I have a bitmap on a dialog (using MFC) and I have a CStatic control variable for it. I need how to get IDB_BITMAP specified into a HBITMAP so I can use SetBitmap to change the bitmap. IDB_BITMAP is a resouce in the project.
-----------------------------------------------------
Question 2:
I need to launch a file in it's default App when the user clicks a button. It doesn't really need to be that elaborate. Does WinExec work or will that only do apps?
Thanks if you can help me.
- Matt Newman
- Matt Newman
-Sonork ID: 100.11179:BestSnowman
|
|
|
|
|
1. CBitmap::LoadBitmap() to load it from the resources, then just pass the CBitmap object to SetBitmap() - that'll automagically call CBitmap::operator HBITMAP().
2. ShellExecute() [more info in the VC forum FAQ].
--Mike--
My really out-of-date homepage
Buffy's on. Gotta go, bye!
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
I was working on what was a small project and all of a sudden I was hearing you know what would be cool... and if would be really nice if....
Thanks alot for the help
- Matt Newman
- Matt Newman
-Sonork ID: 100.11179:BestSnowman
|
|
|
|
|
Michael Dunn wrote:
CBitmap::LoadBitmap() to load it from the resources, then just pass the CBitmap object to SetBitmap() - that'll automagically call CBitmap::operator HBITMAP().
This is what I tried:
CBitmap bmpBitmap;
bmpBitmap.LoadBitmap(IDB_2000INDY340);
m_ctlBmp.SetBitmap(bmpBitmap);
m_ctlBmp is a CStatic control variable pointing to a Picture control the Picture control is set as a bitmap. IDB_2000INDY340 is a valid bitmap resouce ID but nothing shows up. Am I skipping something?
- Matt Newman
- Matt Newman
-Sonork ID: 100.11179:BestSnowman
|
|
|
|
|
... The CBitmap object is destroyed after this function ends, and the HBITMAP inside it released too. Maybe this is the problem.
I found this somewhere in the samples of Platform SDK:
m_cPic is the CStatic here
HBITMAP hbm = (HBITMAP)::LoadImage(AfxGetApp()->m_hInstance,
MAKEINTRESOURCE(IDB_MAP),
IMAGE_BITMAP, 0, 0, LR_LOADTRANSPARENT);
m_cPic.SetBitmap(hbm);
This works fine in my test project and loads the bitmap as transparent (pixel 1,1 is the trans color)
Also. I noticed that you have to make size of your CStatic on the dialog same or greater than the size of that bitmap.
Philip Patrick
"Two beer or not two beer?" <shakesbeer>
Web-site: www.saintopatrick.com
|
|
|
|
|
That's wheat I was looking for. Thanks.
- Matt Newman
- Matt Newman
-Sonork ID: 100.11179:BestSnowman
|
|
|
|
|
bmpBitmap is created on the stack, so whenever that function returns, bmpBitmap is destructed and it destroys the bitmap GDI object along with it. Make the CBitmap object a member of the dialog class, and the load/set calls in OnInitDialog() .
--Mike--
My really out-of-date homepage
Buffy's on. Gotta go, bye!
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
I have made a small utility app that loading a DLL with LoadLibrary((LPCSTR) "TheDLL.dll");
But, when I tested this on two computers that doesn't have VC++ or VisualStudio installed it cant find the DLL!?... The return value from LoadLibrary(...) is NULL but on my two computers with VC++ installed it works fine!
The DLL is a keyboard hook DLL.
Is there something that has to be installed on the system?
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
Does the target DLL exist anywhere on these PCs? If so, try putting a copy in the same folder as the app. If not, get a copy from one of your VC++ PCs. If this doesn't work, does this DLL have any dependencies that are missing? And lastly, there might be a permissions problem... though it doesn't really sound like one...
|
|
|
|
|
Sounds like it is a dependency problem. Make sure the non-VC systems have all the required support dll's. Did you build the app and dll in release or debug? Could be you are missing the debug dll's on the target system.
|
|
|
|
|
Could you be nice to tell me how to compile the DLL then in debug mode or release mode?
I think I have compile it in debug, because when I look on the Project -> Settings then "Settings For" and Win32 Debug is selected in the combo box. But when I try to change it then nothing happens when I recompile it!
HEEELP!!
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
Try. . .
from the MSDev menu
Build->Batch Build...
Yours Truly
|
|
|
|