|
u mean to say by LoadImage i can directly load the my previously built .cpp or input bitmap file. Will you please give me some example code for doing this. It will be agreat help to me.
Thanking you in advance
Binay
|
|
|
|
|
jas - I need to load up the msdn. It's msdn.microsoft.com for your future reference.
HBITMAP MyBitmap = ::LoadImage(
MyhInst, // Assuming you're not using MFC, you'll need to store your instance handle and put it in here, or try NULL
"c:\mybitmap.bmp", // I presume you have this in a variable already....
IMAGE_BITMAP,
0, // These can be set to the x and y values desired if you wish.
0,
LR_CREATEDIBSECTION | LR_LOADFROMFILE);
this will load the bitmap file from disk into a HBITMAP. Now you can create a DC, select it in, and draw it onto the screen.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
Is there a way to set a windows parent window other than using SetParent?
What I want is for the child window to not be clipped inside the parent window, just appear on top of it all the time, and minimise with it etc.
Is it another call I have to make after SetParent?
Thanks in advance.
--
David Wengier
TAC ad gone wrong: "Don't fool yourself, you're a bloody idiot."
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
David Wengier wrote:
What I want is for the child window to not be clipped inside the parent window, just appear on top of it all the time, and minimise with it etc.
Normally it is clipped only if it is an MDI child window.
Is that what you mean?
Nish
Chris,
Can I have a Johnny Bravo icon please?
Please, please, please........
|
|
|
|
|
It appears exactly as you would expect if it was an MDI child window, but its not, and the parent isnt an MDI window!
I was just thinking though, and I was wondering if it might actually be something in the creation of the child, rather than the showing of it. Like maybe it needs a taskbar button to appear outside the main window.
--
David Wengier
TAC ad gone wrong: "Don't fool yourself, you're a bloody idiot."
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
Parent->child relationship always imposes clipping. There's also owner->owned relationship, but AFAIR, you can't change that after creation. For example, dialogs are usually owned by main window.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Tomasz Sowinski wrote:
also owner->owned relationship
That sounds exactly like what I want.
Tomasz Sowinski wrote:
but AFAIR, you can't change that after creation
Thanks for the help
--
David Wengier
TAC ad gone wrong: "Don't fool yourself, you're a bloody idiot."
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
Hi,
I have just recently started a project in MFC/Visual C++. As far as my windows programming experience goes I have done a bit of plain C, as well as a lot of Visual Basic. I'm not having too much trouble grasping the C++ language, but what I do have trouble understanding is MFC and how I extend upon it. For example the app I am developing just has a dialog box, and I want to write code to execute when the user presses the minimise button on the dialog box. I believe this can be done through CMyAppDlg::OnPaint with a check of IsIconic, but where do I find out other things like this? Is there a proper MFC reference that explains things in simpler terms and what they canbe used for? I'm just getting a bit lost, it was a lot easier when each dialog box or window I created in C had its own message loop.
Kind Regards,
Ross Cousens
|
|
|
|
|
You can emulate this by catching the message before MFC gets to it, but the short answer is use the msdn. msdn.microsoft.com if you don't have it on your PC.
And ask here, of course.
By the way, I believe it's better to catch the minimize action somewhere other than OnPaint, I believe there is a message when the window state is changing, I'd go for that.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
Does anybody know where i can get i copy of
cdosyserr.h and cdosysstr.h?
Thanks
Al
|
|
|
|
|
I searched high and low, but could'nt find any way to set system time. Is it true that i must set some system privligies?
Anyone?
Thanxs
|
|
|
|
|
Use <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/time_9xyd.asp">SetSystemTime</a> . In NT/2000/XP, you'll need specific rights.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/time_9n39.asp
Finally managed to find it, for all those who needs this.
found it soon after Joaquín M López Muñoz found it too
Thanxs Joaquín M López Muñoz
|
|
|
|
|
Okiday.. i've been studying these things all day today, got some general quesitons again, plz help a newbie out..
1) After you create a CSplitterWnd in MainFrame and call CreateView() to put in the views, is it impossible to change the views in the splitterwnd? (the documentation in msdn seems to say this -"All panes of a static splitter window must be created before the framework displays the splitter.")
2) Is it a better idea to create my own classes derived from CFrameWnd, and override each of their OnClientCreate() functions? And if so, how do I make put those CFrameWnds into the same spot where the current MainFrame is?
I was hoping to dynamically specify what CFormView to put in the top pane, and which to put in the bottom frame.
I'm not really trying to change the 'view' that is built in tho.. im really trying to display different forms in a split window
thanks in advance for any help
-dz
|
|
|
|
|
|
Very helpful, sorry I didn't find it myself, thanks for the pointer;)
-dz
|
|
|
|
|
Where do I get the image list for the icons associated with each application on a current system?
I have a CListView and would like to display files w/ their associated icons. Do I have to enumerate(???) each exe/dll and extract the resources manually or is there an easier way...?(I hope)
Thanx in advance!
p.s-I Just stumbled upon the CShellList does this class/documentation explain how this id done...? I guess i'll find out.
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Use 'SHGetFileInfo',
look into the MSDN for more info.
|
|
|
|
|
Ok dokie...i'll check it out...Thanx allot!
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I think the WIN32 function SHGetFileInfo should do the work.
David
|
|
|
|
|
Thanx i'll do that...
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hi everyone,
I had to say it out loud. This guy took time to help me out with a major problem that I had since two days. He replies several time and answered all my questions. I`m sure there also a lot other buddies that help other persons, to all of them, Thank for taking this precious time !
|
|
|
|
|
I dunno if this is the appropriate forum for this kinda of comment, but I agree with you...
Joaquín M López Muñoz knowledge of templates saved me hours of reading and made my code half the size it probably would have been. Definetly the most challenging question/problem i've ever encountered.
Kudos Joaquín M López Muñoz.
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Yup, he does a lot of good helping out of people.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
You are gonna make me blush I'm but a newbie among such gurus as Tomasz, Nish, Mr. GDI-man Christian Grauss and the other CP folks we all know and love.
C++ questions are the most interesting to me because Stroustrup's brainchild is such an awesome tool and never stops surprising me. IMHO it is just out of lack of aquaintance with C++ that people consider embracing other toy languages that unfortunately are being given excessive hype lately.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|