|
That should not even compile.
Ovidiu Cucu
Microsoft MVP - Visual C++
|
|
|
|
|
hello Sir
thank u very Much....
it working
u r great..........
thanx once again.......sir but i'm not getting the solution of my previous problem yet.....
what to do for it.....
My PM will not allowed me to send u a whole project plz sir if possible then send me some solution.
thanx
|
|
|
|
|
- somehow you have alread set the BS_OVNERDRAW style for the button? Remove it from resource editor or to be sure anyway change ModifyStyle function like this
pButton->ModifyStyle(BS_ICON|BS_OWNERDRAW, BS_BITMAP);
- be sure the full-path-and-file-name (pszBitmapFile) is correct. Anyhow, check the returned value of LoadImage. If something goes wrong then it returns NULL:
if(NULL == hBitmap)
{
DWORD dwError = GetLastError();
}
- be sure IDC_BUTTON1 is indeed the ID of your button control; also verify in resource.h file if you have unique IDs.
AFAIK, more like that cannot happen. Well, we'll see...
Ovidiu Cucu
Microsoft MVP - Visual C++
|
|
|
|
|
hello
thanx its working now..
i have one another problem.....when i call a function with in a function it give me a error
"error C2352: 'sipxmngr::handleCallStateEvent' : illegal call of non-static member function"
why is this happenning.
thanx
|
|
|
|
|
hi
it was working with single image but
i want to display two different images in two different buttons.
when i use the code it always showing the same image in both of the buton while the images are different..
i have used follwing code in Oninidialog()
<br />
<br />
LoadButtonBitmapImage(IDC_BUTTON2, _T("D:\\Swaraj Sir PC Data\\SwPhone\\SwPhone\\TeletikPhone\\images\\1.bmp"));<br />
<br />
LoadButtonBitmapImage(IDC_BUTTON3, _T("D:\\Swaraj Sir PC Data\\SwPhone\\SwPhone\\TeletikPhone\\images\\2.bmp"));<br />
and following code use the function;
void sipxmngr::LoadButtonBitmapImage(UINT nButtonResID,LPCTSTR pszBitmapFile)<br />
{ <br />
<br />
CButton* pButton = (CButton*)GetDlgItem(IDC_BUTTON2);
<br />
pButton->ModifyStyle(BS_ICON, BS_BITMAP); <br />
<br />
<br />
HBITMAP hBitmap = (HBITMAP)::LoadImage(NULL,pszBitmapFile,IMAGE_BITMAP, 0, 0,LR_DEFAULTCOLOR|LR_LOADFROMFILE); <br />
<br />
<br />
pButton->SetBitmap(hBitmap);<br />
<br />
CButton* pButton1 = (CButton*)GetDlgItem(IDC_BUTTON3);
<br />
pButton1->ModifyStyle(BS_ICON, BS_BITMAP); <br />
<br />
HBITMAP hBitmap1 = (HBITMAP)::LoadImage(NULL,pszBitmapFile,IMAGE_BITMAP, 0, 0,LR_DEFAULTCOLOR|LR_LOADFROMFILE); <br />
pButton1->SetBitmap(hBitmap1);<br />
<br />
}
it always show me the same image where i'm making mistake..plz tell me
thanx
|
|
|
|
|
hello
thanx
i was making a big mistake inspite of making a different function i was trying to make it in a single funtion.
thanx
|
|
|
|
|
See if this article helps.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello
First, I'd like you to forgive me if the question is a bit irritating - it irritated me personally -.
Now:
I have a program that should read -and only read- Adobe acrobat files -for example-, even if Adobe Acrobat reader wasn't installed on the user's machine.
Important note is that I don't want to use 3rd party COM objects.
Is it possible??
if(Possible)
{
return "How?";
}
else
{
return "Thank you anyway for reading";
}
I'm not that expert in COMand activeX objects. Yet I can do my homework. I just need a push in the right direction. I tried to do it in C# at first. but If it's possible in C++, I got no problem with that.
Any ideas, articles, suggestions, or comments would be appreciated.
Regards.
|
|
|
|
|
Writing an application that "consumes" PDF files would be much more difficult than creating an application that created PDF files. I'm finishing up a program that produces PDF files from GDI style calls and it took about 5 months. Most of the effort was defining the interface, and working out the drawing commands and researching/coding implementations for the various encoding/compression schemes, graphics support etc...
I was able to pick and choose what I used from the PDF 1.6 specification so the effort was feasible with a single programmer. However, writing an application that is prepared to deal with anything in that specification would be a daunting task for even the most dedicated programmer(s). You would be responsible to implement the algorithms for a variety of encoding, encryption, and compression schemes; support numerous color spaces, font embedding, coordinate spaces; and adapt to files that incorporated deprecated and obsolete functionality from the prior specifications (1.2-1.6). You will also need to become an expert in postscript parsing.
The effort to "consume" PDF just isn't worth it. "Producing" PDF is reasonable and satisfying. Give the PDF 1.6 specification a look and decide for yourself though...
PDF Reference, Fifth Edition[^]
Using the free downloadable Adobe Reader is the most efficient solution since it registers itself as an ActiveX component that can be hosted by any application with a few clicks of the mouse. If all you want is to be able to display any arbitrary PDF file in your application, this is the way to go.
Hope all my giberish helps somehow...
|
|
|
|
|
Perfect!!
Really a perfect reply. I'm in your debt.
You've solved me a great problem. My main concern was actually to export to pdf -and various other formats-, but I thought that reading a pdf using a dll library would be easier -specially that I posted an earlier question about exporting, but no one replied!!-. You've clarified many things to me. You see, I'm writing a databse program that should export data to SPSS, table to pdf or word, etc...
So, about other formats? Where do you think I should go to look for their specifications??
Is there a general technique to parse and understand the structure of a specific format -pdf, word, excel, SPSS, etc...-, no matter what effort it involves?
I really appreciate you help so far.
Thank you.
|
|
|
|
|
PDF is the only specification that you mentioned that is openly published that I know of. There were some posts recently questioning the legality of producing PDF's but if you read their specification, they make some fairly explicit statements claiming that they encourage application developers to incorporate the ability to produce PDF output from their apps. The only restriction I could find was they reserve the right to publish and maintain the specification. Fair enough in my eyes.
However, other proprietary formats are usually aggresively defended. MS Office products support rendering of various other document formats that may be openly published. Text files and rich text are two simple formats that Word can consume. You may want to investigate those. However, a document expert, I am not. MS Office supports OLE Automation and so many head spinning embedding technologies that I'd rather write my own PDF reader than try and comprehend the .doc file format.
I apologize that I'm not much help in this arena.
PDF is pretty much a world standard for document interchange, published openly, and free of royalties. I would recommend starting with this and digesting what is needed and go from there.
Nader Elshehabi wrote: Is there a general technique to parse and understand the structure of a specific format
I don't think there is a one size fits all solution, but you will likely find that once you write your own implementation for let's say, the LZW compression algorithm, Base64-Base85 encoder/decoder, Wrapper classes for GDI+ image format support, etc... that you'll probably need them when attempting to digest the other document formats. You will be forced to learn a fair amount of Postscript for PDF export at a minimum.
Good luck!
|
|
|
|
|
Thank you so much Bob.
You've been more helpful than you could imagine.
I appreciate your support
|
|
|
|
|
plz solve my problem i am using mfc
i have made a dialog box now i make a class cfirst of this dialog box
and its base class is CDialog
now i want that same dilaog box which has class cfirst is also inherited from Cbutton
how i can make a Cfirst inherited from both CDialog and CButton
plz tell me with example its request.
how this is possible plz tell me
Ashish Dogra
MCA
Noida
|
|
|
|
|
Why do you want such a thing ? This looks like really bad design. Could you explain more what you try to achieve exactly ? Maybe we can help you to find a better solution.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
sir basically
i made a application now and its class is inherited from cdialog
now i have some buttons on dialog boxes so i want to color them
but as i requires CButton class so i want to inherit it from cbutton
sir is this not a good thing to inherit a class from two classes
plz.... tell me why i want to know it plz..
Ashish Dogra
MCA
Noida
|
|
|
|
|
Why do you want your dialog class inherit from CButton in this particular case ?
Just create a new class that inherits from CButton and use it inside the other class.
You have to make the difference between 'is a kind of' (inheritance) and 'has' (member variable of the class).
I suggest you read some documentation on inheritance to have a better grasp on the mechanism.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
thanks sir
what plz sir tell me how to use in that class in that case
or it simply work by making second class's object and use it in first class
plz sir tell me some example
because with example its easy to understand
plz sir .................
Ashish Dogra
MCA
Noida
|
|
|
|
|
|
This sounds liks a is-a vs. has-a (near bottom) issue.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hey guys,
I was wondering if anyone has any good tutorials on Windows Hooks using C++ (non-MFC)? Specifically dealing with remote hooks using DLL injection. I looked on google and the MSDN, but cant find something specific to hooks in purely win32. MSDN has some good tuts but theres a lot of jargon associated with it that I hate reading. If anyone has some I'd love to see it.
Thanks,
Robbie
-- modified at 4:57 Thursday 29th June, 2006
|
|
|
|
|
|
Yeah I saw that one. I saw all the ones in the code project. I guess the ones I am looking for are using hooks on Windows functions, like hooking OpenProcess, or even Winsock functions like send/recv. Would you know any in that area?
|
|
|
|
|
i think with the sample i shown above u can hook any windows api....
nave
|
|
|
|
|
Hello
In PPC, I will create a button to send pictures as attachments in e-mail.
What fuctions could I program for the target??
Any suggestion is useful!! Thanks!!
|
|
|
|
|
sdhtyjnniutnbjnhbghb wrote: What fuctions could I program for the target??
What's "the target?"
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|