|
Try checking the dependencies of your dll (try Depends.exe). You may have included the lib and compiled it, but the compiled dll might not be able to find the win dll containing the sdk functions which you used.
|
|
|
|
|
Anonymous wrote:
Try checking the dependencies of your dll (try Depends.exe). You may have included the lib and compiled it, but the compiled dll might not be able to find the win dll containing the sdk functions which you used.
Hi Anonymous
Thanks for your mail
i think u r correct in your suggestion but how can i check the dependencies of my dll
i am new in this dll world
please tell me how to check the dependencies.....
thanks
vishal
|
|
|
|
|
Hi everybody,
I'm trying to show an icon in one of the status bar's panes. The status bar is the CStatusBarCtrl and the problem is that I can only show 32x32 icons in the pane. When I load a 16x16 icon and call SetIcon() the icon on the statusbar becomes stretched to 32x32 in size, thus loses visibility of the most parts because the statusbar itself is about 18 or 19 pixels high. The workaround I've found is to create a 32x32 icon and place my 16x16 icon in the middle of that space and everything's fine. What am I doing wrong? Or is it that the 32x32 icons are the only ones one can display in a status bar pane? Any help would be greatly appreciated...
P.S: The icons that I'm using are for the WindowsXP platform and thus 32bit icons, 24 bit colour and 8 bit transparency, maybe that's a problem?
|
|
|
|
|
When a 16x16 gets stretched to 32x32 it's usually caused by calling LoadIcon() instead of LoadImage() , or using incorrect size parameters in LoadImage() .
--Mike--
"So where does that leave us? Well, it leaves us right back where we started, only more confused than before." -- Matt Gullett
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
LoadImage() worked, thank you very much. I thought I tried LoadImage() without success before, but then I must have given incorrect parameters to it. And I didn't know that LoadIcon() stretches the bitmap to system metrics, thanks again.
|
|
|
|
|
Hi all,
Bit of a problem with CBitmap's LoadBitmap() function. If I make a bitmap a resource and do
BitmapObj.LoadBitmap(IDB_MYBITMAP);
The image is loaded fine, but if I do
BitmapObj.LoadBitmap("MyBitmap.bmp");
it returns 0 (failed). I've tried moving the location of the file around the local directory (debug, res, etc.) but no luck.
What do I need to do?
Obseve everything, remember more...
|
|
|
|
|
You can't load a bitmap file like that. To load a bitmap image from a file, use LoadImage() :
HBITMAP hbm = (HBITMAP)LoadImage(NULL, "MyBitmap.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); Hope this helps,
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Okay, but there is a function LoadBitmap() that takes an LPCTSTR string of the name of the bitmap. How does one use it?
Obseve everything, remember more...
|
|
|
|
|
It loads a bitmap from a resource. If you look at the MFC source code, you'll find that the one that takes a UINT actually calls the one that takes a LPCTSTR to do the work.
All resources are loaded via strings. The UINTs have to be coerced into looking like strings so that Windows can load them.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Hi All:
Now I am writing a CD-ROM test program on Windows platform. This test program have three item:
1) data read test
2) Audio Track Play
3) Tray in/out test
I don't know how to access cd-rom in windows, and I don't know what is Audio Track Play Test and Tray in/out test. So I want to know that. Can you help me? Thanks
welcome to meet you!
|
|
|
|
|
hello,
You know if it is posible to know where are stored in memory the pixels of a
web page ? and if yes how ?
thx in advance
|
|
|
|
|
I think you'll need to be a bit clerer on this question...
jeremysay wrote:
hello,
You know if it is posible to know where are stored in memory the pixels of a
web page ? and if yes how ?
thx in advance
Obseve everything, remember more...
|
|
|
|
|
tom76 wrote:
I think you'll need to be a bit clerer on this question...
yes sorry
In fact i'm working with CHtmlView, and i want to know if it is possible to get all pixels state of web page from memory (RAM), i don't want to use GetPixel or....
I hope you understand
PS : excuse for bad english
|
|
|
|
|
I assume you are trying to dynamically change the HTMLView window (the Internet Explorer activeX object you drop onto a dialog in Visual Studio's editor), am I right?
Look at how you set the pixels (width and height) and maybe attach a global variable to it, and getting the address of the variable and use it that way...
I don't really know, usually I stick to variables and don't bother getting it from RAM in the way I think you want.
Obseve everything, remember more...
|
|
|
|
|
You probably can't. I assume the HTML view simply stores the HTML data which it renders as it needs to. It wouldn't store the individual pixel states.
If you want to get an "image" in a device context, you can try getting the HTML view to print itself. Send it a WM_PRINTCLIENT message with the wParam holding the handle of the device context to print into. Using MFC:
CWnd *pWndHTML;
CDC dc;
pwndHTML->SendMessage(WM_PRINTCLIENT, (WPARAM)dc.GetSafeHdc(), PRF_ERASEBKGND | PRF_CLIENT);
Keep in mind that this will only get the visible part of the view, not the whole document (unless it fits completely in the window).
Hope this helps,
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Thx for you answer !
I thought to this solution but i can't get all pixel state od the page only those there are display. So for me it is a problem
|
|
|
|
|
What do you need to get the pixel state for? There may be another way to solve your problem (without getting the pixel state).
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
I am trying to make a dll for the images in my project. In the dll's project I add the resources (bitmaps) and I have functions to return HICONs, HBITMAPs, etc.
But I can't create any image resources in my dll.
In my resource.h I have
#define IDB_02 5001
but when I do
CBitmap dd;
BOOL ret = dd.LoadBitmap(IDB_02));
"ret" is false. Do I have to include something else in a dll to make it work with images?
Thanks
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|
|
Before you call this, call AfxSetResourceHandle() to set the location of the resource, remembering to save the old one using AfxGetResourceHandle()
HINSTANCE hOldRes = AfxGetResourceHandle();
AfxSetResourceHandle(hinstDLL);
CBitmap dd;
BOOL ret = dd.LoadBitmap(IDB_02);
AfxSetResourceHandle(hOldRes); Hope this helps,
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
I performed format function by calling the following function in shell32.dll:
(* dl_SHFormatDrive)(hWnd,cDrive-'A',SHFMT_ID_DEFAULT, bQuickFormat?:SHFMT_OPT_FULL);
My project can pop up a format dialog to format the floppy disk.
Now I want to hide the format dialog and let my floppy disk be formated automatically, in addition, I want to know the real-time value of ProgressBar's position. How can I handle this problem?
Please help me!
Thank you!
|
|
|
|
|
Have a look at the book "Visual C++ Windows Shell Programming" by Dino Esposito (Wrox Press). It's probably out of print but you should be able to get it still. Chapter 10 covers exactly this.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Do you know where I can download those contents?
Thank you!
|
|
|
|
|
You can't legally download the book - it's copyrighted.
You can download the code examples that go with the book from http://www.wrox.com/dynamic/books/download.aspx[^]. Scroll to the bottom of the page and choose the book title.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
You are so kind!
I appreciate your help very much!
Thanks
|
|
|
|
|
Hi all,
I have a problem with an acknowledged MSDN Bug - being... using sockets in a multithread program. SP5 supposedly fixed the bug (?) but I still get asserts when using either version of the VC++ Debug libraries.
Is there new Debug libraries available or can I just modify the sockcore.cpp file and rebuild it ?
cheers
Will Beattie
whybotha69@hotmail.com
|
|
|
|