|
mcsherry wrote:
...to create this arrowed line.
Is LineTo() what you are looking for?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
LineTo() is this using a device context? if so I can't use that (I don't think so anyway ) as I need to actual draw it on the bitmap before saving it all to a file.
cheers,
|
|
|
|
|
Understood, but I think you can still use LineTo() to modify the bitmap, and then display the final result. You need to select the bitmap into a compatible DC, add to it using LineTo() , and then draw it using BitBlt() . Something like:
CDC dcCompatible;
dcCompatible.CreateCompatibleDC(pDC);
CBitmap *pBitmap = dcCompatible.SelectObject(pointer_to_CBitmap_object);
dcCompatible.LineTo(...);
pDC->BitBlt(0, 0, width_of_bmp, height_of_bmp, &dcCompatible, 0, 0, SRCCOPY);
dcCompatible.SelectObject(pBitmap);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
thanks, I'll give that a go.
Andy,
|
|
|
|
|
Where can i find source code?
|
|
|
|
|
Rassul Yunussov wrote:
Where can i find source code?
Google shows a few implementations. But nothing really drop-in ready.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Hey!
how do I make a multi-column popup menu using e.g. cmenu' popup features ?
Thanks !
- Karmafx
|
|
|
|
|
figured it out...using MF_MENUBARBREAK..doh
-Karmafx
|
|
|
|
|
Hello ,
I have one doubt in MFC.I create one application.In this application i draw one rectangle in the client area.The rectangle contains the Eight handles (MASK) using GetHandleMask().I draw another rectangle same as the first one.Now i drag the second rectangle and fixed in the part of first rectangle.Now click the first rectangle,the handles not shown in the intersected area.How it will show?I need only handle are shown,not line.
Sunsen
|
|
|
|
|
Hello!
I've a problem, i can't show a CStatic in my Dialog!
this is my code:
On OnInitDialog()
<br />
CBitmap m_bmp;<br />
BOOL res = m_bmp.LoadBitmap(IDR_BMP_NEW2);<br />
if (res) MessageBox("Image ok")
<br />
CStatic myStatic;<br />
<br />
myStatic.Create(_T("my static"), <br />
WS_CHILD|WS_VISIBLE|SS_BITMAP|SS_CENTERIMAGE|WS_BORDER, CRect(10,10,150,50), this);<br />
myStatic.SetBitmap(HBITMAP(m_bmp));<br />
when i launch my app, there is nothing on Dialog
plz, help me! thanks
hzocm
|
|
|
|
|
|
I think the problem is due to the fact that your CStatic is a local variable... so it gets destructed at the end of OnInitDialog... declare as a member of the class and you will have more luck!
|
|
|
|
|
thanks very much!
it's ok, i must declare CBitmap and CStatic like a varible of class.
thanks!
|
|
|
|
|
|
BadJerry wrote:
de rien!
c'est rare des gens polis de nos jours...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Merci!
Moi etre bon petit gars!
Tres impressionne par le nombre de gens que tu peux aider . Tu arrives a travailler aussi ou cp est une occupation a plein temps?
|
|
|
|
|
BadJerry wrote:
Tu arrives a travailler aussi ou cp est une occupation a plein temps?
|
|
|
|
|
disons que je suis en formation (depuis 2 semaines), et que le programme pour le moment est suffisament facile pour que je puisse me permettre d'aider qques codeurs perdus...
BadJerry wrote:
Tres impressionne par le nombre de gens que tu peux aider
merci, je prends ca pour un compliment. Par contre, un peu amer contre la personne qui s'amuse à voter tous mes posts à 1 de temps en temps sans meme lire leur contenu ; mais c'est une autre histoire
ps: sorry for those that didn't understand that conversation...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Definetely a compliment... You and hatsAlok are doing a terrific job!
Yes I hate the voting system as it is... if you vote 1, you should have to justify it (or at least lose your anonymity)...
|
|
|
|
|
should i justify why i vote 5 also ?! :->
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
can we send mail thourgh program or code in vc without the local smtp server on that machine
ddd
|
|
|
|
|
Yes, since SMTP is a *network* protocol. Providing there's an accessible SMTP server that the machine can connect to, there's no real difference (firewall/security measures aside) from communicating with a server on the same machine or a remote one.
Steve S
Developer for hire!
|
|
|
|
|
SMTP has big problems nowadays because of spam!
The AOL SMTP servers for example do not allow receiving from dynamic ip addresses, so it is often better to use SMTP servers in the internet.
But theoretically you can create an own application instead of using a SMTP server, it's even possible to send and receive mails via telnet (connect to SMTP and type commands)!
Don't try it, just do it!
|
|
|
|
|
Hi,
Below is the part code, which used to display the frame from camera, my problem is that, can I create some button instead of by press "1"?
Thanks!
void CetCapConnect(HWND hwnd)
{
//CAPDRIVERCAPS CapDrvCaps; // structure of the capabilities of the capture driver
if (!hWndC)
hWndC = capCreateCaptureWindow ( // Create a child capture window
LPSTR) "My Capture Window", // window name if pop-up
WS_CHILD | WS_VISIBLE, // window style
0, 0, 160, 120, // window position and size
(HWND) hwnd, // handle of parent window
(int) 0 /* child ID */
);
LRESULT CALLBACK WindowFunc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HDC hdc; // handle of device context
switch(message)
{
case WM_CHAR: /* process keystroke */
hdc = GetDC(hwnd); /* get device context */
switch (wParam)
{
case 49: // pressed "1" to get connect
CetCapConnect( hwnd );
break;
|
|
|
|
|