|
Have a look at http://www.codeproject.com/tools/imageviewer.asp[^]. It is a tool I wrote to help me figure out these sorts of problems.
Have you selected a bitmap (drawing surface) into the pDC device context? If not, then the bitmap in the pDC will be the default 1 X 1 pixel monochrome bitmap.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
i have this error :
: error C2664: 'SendMessageA' : cannot convert parameter 1 from 'char' to 'struct HWND__ *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
[code]
// Simple Sub Call
void __declspec(dllexport) TestSubb
(char& A, char& B, char& C, char& D)
{
A*= A; // handle of destination window
B*= B; // message to send
C*= C; // first message parameter
D*= D; // second message parameter
::SendMessage (A, B, C, D);
return;
}
[/code]
Why ? im missing somthing ?
i cant get this to work
help p:
jeroen
|
|
|
|
|
The prototype of SendMessage is the following:
LRESULT SendMessage(<br />
HWND hWnd,
UINT Msg,
WPARAM wParam,
LPARAM lParam
);
you use wrong data types.
Greetings,
D.
|
|
|
|
|
Deian :
you use wrong data types.
Do need other data types ?
Can you be more Specific (more detailed)
im programming visual basic, im new with C++
Thanks for help
Jeroen
|
|
|
|
|
you pass 4 char* to SendMessage
but it does not take such parameters..(check the declaration Deian sent..
As you work in VB..imagin passing a string parameter "ABC" to a function that takes Long or integer..
An error will occur.
|
|
|
|
|
Whats the best way to store data against custom controls such as the font in use? Should I reserve extra bytes when registering the class or allocate a block of memory when I receive the WM_CREATE message and attach it to the window using SetProp()? Any suggestions will be gratefully received.
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
I'd suggest SetProp. I recently had to deal with a custom control that I tried to wrap into a .NET control using subclassing. Nothing worked till I realized that it used the extra bytes in the window class. Since I wasn't using it's windows class, but subclassing an existing window, it worked best by changing the code to use SetProp.
That's my 2 cents, anyways.
--
Joel Lucsy
|
|
|
|
|
how do i create a dll file for compatability with either Java or Visual Basic
|
|
|
|
|
Search: C++ visual basic Dll
|
|
|
|
|
Yea thanks but none of them told me dow to get started
|
|
|
|
|
|
|
|
how do i create a exe file Visual C++ that detects the name of a file that is draged over it
Clint
|
|
|
|
|
Have a look at IDropTarget. There is a sample program on MSDN somewhere.
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
|
thanks i ment your first option and how do you do this is the an example some where
|
|
|
|
|
Hi
I am plotting on the ClientDC.
Now at the end of function i want to copy the content of the ClientDc to MemDC, so that it can be used for saving image as BMP or JPG.
How to do this?
Leave your mark wherever you go
|
|
|
|
|
what the hell is a MemDC?
Don't try it, just do it!
|
|
|
|
|
A simple BitBlt will do the trick. Just be sure your MemDC has a bitmap selected into it that is the same size and bit depth as your ClientDC.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks Arends
Well what my doubt with bitblt was that it copies from the bitmap to the DC(correct me if i am wrong)
So the main problem is that can the bitblt will work for ClientDC.
Leave your mark wherever you go
|
|
|
|
|
BitBlt copies data from one device context's drawing surface to another device context's drawing surface. CClientDC's drawing surface is the portion of the screen contained in your window, and your MemDC's drawing surface is the bitmap you select into it. A drawing surface can be anything: a memory bitmap, the monitor, a printer, a plotter, etc.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Customize Find and Replace in MSHTML Page at runtime
senmah
|
|
|
|
|
Hi,
I'm trying to obtain the text within CStatic control, but I can't achieve this using the WM_GETTEXT message. It returns the caption of the control, but not the actual text inside it (I'm trying to retrieve the text from external app). Anyone had the same problem?
Thanks,
D.
|
|
|
|
|
hi Dear...
Hint is use...Function: GetDlgItemText()
How to use this: THIS is your duty to find out..My duty is to show you direction...
OK! Good Bye..Have a Nice Life...
---Sumit Kapoor---
|
|
|
|