|
Hi All,
I need to know how to download CxImage class. I came across this only today, so you can guess I am a new programmer. Please tell me where to get this class from. The link provided in this FAQ opened thi class but I couldn't download the complete class.
Please help.
Awasthy
|
|
|
|
|
|
I don't think he is active here any more try his website:-
http://www.xdp.it/cximage.htm
"An education isn't how much you have committed to memory, or even how much you know. It's being able to differentiate between what you do know and what you don't." - Anatole France
|
|
|
|
|
Thank you both.
Awasthy
Any work that is worth doing is worth doing well.
|
|
|
|
|
Hi all,
I am a new VC++ programmer. I need to acess a bmp file and read its pixels but urgently I need to know how to display an image on the screen whose path is chosen by browsing throgh the file system.
Please Help
Awasthy
|
|
|
|
|
Use ::LoadImage() ... look it up in MSDN. Hope this helps.
- tareq
|
|
|
|
|
Hi
I have the path of the image and its handle using LoadImage() but how do I display it?
No picture is being displayed.
Awasthy
Any work worth doing is worth doing well.
|
|
|
|
|
Assuming youre using MFC ... use the following code...
HBITMAP bmp = (HBITMAP)::LoadImage(::GetModuleHandle(0), _T("Coffee.bmp"), IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
CBitmap* pBitmap = CBitmap::FromHandle(bmp);
CPaintDC dc(this);
CDC memDc;
memDc.CreateCompatibleDC(&dc);
CBitmap* pMemBmp = memDc.SelectObject(pBitmap);
dc.BitBlt(0,0,200,200,&memDc,0,0,SRCCOPY);
memDc.SelectObject(pMemBmp);
::DeleteObject(bmp);
- tareq
|
|
|
|
|
Hello friends, I can't to resolve this problem, I sent my questions and I can't to resolve. Please, somebody know how I have to work with the messages??? :
WS_CLIPCHILDREN and/or WS_CLIPSIBLINGS
I don't know how work that. I set with both styles (WS_CLIPCHILDREN and/or WS_CLIPSIBLINGS) but it's continuing with the gray shade
Because my problem is:
How i can to repaint my dialog or update, because I open a dialog2 over dialog1 but when I close this dialog2, the dialog1 and his controls is cover with a gray shade, Why???. How I can to repaint the dialog???.
All my dialogs are open in form modal. The dialog1 is Child over the main Application, the dialog2 is a child opened over the dialog1 (popup)
I've saw a similar problem in this link:
http://www.codeproject.com/script/comments/forums.asp?msg=1035892&forumid=1647&XtraIDs=1647&searchkw=repaint+dialog&sd=1%2F1%2F2005&ed=4%2F1%2F2005#xx1035892xx[^]
I hope that somebody help me, .
The best regards
NiponWare
|
|
|
|
|
Keep it Simple Stupid...
The Famous Golden Rule in Programming... Why Stress yourself to make your Program so complex that no one cares? Dont stress your mind, get fustrated, irritated, and even alittle insane over your program. Most of the time you dont understand your problem is because you dont understand your program, Keep it Simple Stupid... Thats the most Professional Advice you will ever get when your Programming...
When you begin to get stressed, turn ur monitor off, walk away, walk down the street and think, Keep it Simple Stupid.
Enjoy!
/* Just a Human Trying to Live in a Computers World. */
|
|
|
|
|
NewbieStats wrote:
When you begin to get stressed, play a game
Don't try it, just do it!
|
|
|
|
|
|
My dad says the same thing... He sits there and blows people up... Seems to help... Just thought id share my thoughts
|
|
|
|
|
Serious Sam? works for me...
- tareq
|
|
|
|
|
I am trying to derive a CTreeCtrl, part of which to allow the user to press the space bar to toggle the check boxes. (Basically making an MFC version of Carlos Quintero's TriStateTree, with several other enhancements, since I cannot seem to find anything similiar already out there)
I did setup and write a message handler to trap the WM_KEYUP message and check if the spacebar was pressed, and toggle the checkboxes accordingly (which indeed works as tested thus far).
However, Windows has an annoying tendency to want to keep playing that stupid chime sound when pressing the space bar on a CTreeCtrl.
I've searched both here, MSDN, and the 'Net at large, and could not find anything to tell me how to disable the chiming sound.
How do I "shut-up" that chime sound programmatically in MFC?
Thanks
Steven Konopa
|
|
|
|
|
I would handle TVN_KEYDOWN instead of WM_KEYUP . The docs say "Return nonzero to exclude the character from the incremental search, or zero to include the character in the search" so you can probably return nonzero and the tree will ignore the keypress, which means no beep.
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
Thanks - that was the ticket! I went and changed my program to trap the TVN_KEYDOWN notification instead of the WM_KEYUP message, and it works perfectly!
Again, Thanks for your help!
Steven Konopa
|
|
|
|
|
How does one substitute a string for a comparison in an if statement?
Example-Normally I would do this:
if( sTitle.Find(sStr) != -1 )
But it could be:
if( sPhone.Find(sStr) != -1 ) or maybe,
if( sTitle.Find(sStr) != -1 || sPhone.Find(sStr) != -1 )
I can easily build a string for the criteria, but I can't seem to figure out how to get that actual value put in the if statement.
If I do this:
CString myString = "sPhone.Find(sStr) != -1"
use if( *myString ), It doesn't work...
Probably because it's only the first char pointed to.
I think I've been looking at this far too long to make any objective sense out of it anymore, and my brain pointer is NULL!
Help...
|
|
|
|
|
CString::Find returns the index of the start of the substring in the string, if it finds the substring; otherwise, -1.
if the substring is found, then, you don't have anything else to do, you already have it; you used it to search the string.
int iIndex = sTitle.Find(sStr);
if ( iIndex >= 0 )
{
// substring found.
}
else
{
// substring not found.
}
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I appreciate the input Max, but what I really need to do is replace what goes inside the "if" statement programmatically.
I don't know what the "if" statement will look like until after the user has chosen their options for what to look for in what fields, so I need to build that query string based on their input, and then have "if" evaluate it.
I can't figure out how to substitute what goes inside the ( ) of the "if" statement with something I put together in a string...
It could be a short one liner like above, or a long query with multiple OR's and ANDs. At runtime, the variable in the "if" statement needs to be replaced with the actual query string I built.
|
|
|
|
|
Now that we all understand. That does not happen in C or C++.
You will have to develop some kind of parser/analyzer yourself, or find one already available as source code or as a library.
Maybe you make a class that represents each part of a query, evaluate each one and then evaluate the sum total of those results and end up with your answer, but there is no single 'runtime' query like what you are seeking built into the language.
|
|
|
|
|
Cpt Rick wrote:
CString myString = "sPhone.Find(sStr) != -1"
use if( *myString ), It doesn't work...
That's because C++ is a compiled language, you can't substitute code at runtime like you can in, for example, Perl.
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
I get the following Memory Leaks warning when my Dialog MCF program ends.
Detected memory leaks!
Dumping objects ->
c:\hctsemu\emulation\exampledlg.cpp(1648) : {644378} client block at 0x013A0A70, subtype c0, 404 bytes long.
a CSigDlg object at $013A0A70, 404 bytes long
Object dump complete.
The program '[3732] Example.exe: Native' has exited with code 20 (0x14).
This is using the following code to provide details:-
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#include ".\ssic_exampledlg.h"
Can any experts out there help me to home in on the memory leak please.
Graham.
grahamfff
|
|
|
|
|
Find out where this CSigDlg object was created and where it should have been destroyed.
The easiest way is to set breakpoints to the constructor and destructor of CSigDlg.
Don't try it, just do it!
|
|
|
|
|
Grahamfff wrote:
c:\hctsemu\emulation\exampledlg.cpp(1648) : {644378} client block at 0x013A0A70, subtype c0, 404 bytes long.
what is the code at that line ?
is there a malloc or new or something else there ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|