|
Hi Nelek,
Thnx for the suggestion..
I guess something like screen grid and maintaining which gridline is free or occupied should work but i feel it will be a lot of work..!!
There may be so many blocks on the screen and no connection line should pass through any of them...
Also i want to select a connector line and delete it...I was making lines using GDI but how to handle mouse events on these lines..? Do i have to maintain the coordinates of each line also and then check if clicked point is on any line...??
i really wonder how it works in Visio...
I would try to start with this approach meanwhile if some other solution comes to your mind , pls do share..
Regards
Meenu
|
|
|
|
|
I think it will be easier if you create 2 matrix of points (one for each direction: Vert and Horz) with the index of the points (I mean: 00, 01, 02.. 10, 11, 12.. m0, m1..mn).
Afterwards you can correct the position of the click with a round to your grid unit/separation between lines (5 pixels for example). And determine the indexes of the line ends.
But yes, it will be a lot of work and considerations. The lines can be saved in a CList (take a look to my article "An addition to the Smart List" and the previous one I based mine), this will allow you to save structures or another lists to sae the corners of the lines. But you will need to check all to determine which line are you chosing to delete or modify.
I don't know how visio makes it, but I guess should be something like that.
I would make a class for the lines with methodes like IsPointInLine (CPoint point) to pass the position of the click or the mouse movement, variables like CPoint cpStart, cpEnd a list of corners... and so on.
I'm sorry not being more concret, but I will try to help you as long as I can (at least with the ideas or algorithms).
If I have another idea I will say it.
EDIT: To improve methodes I would make the list with objects but all the methodes with pointers.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Thnx Nelek..
i will work over this and will let u know how far i m successful..
Regards
Meenu
|
|
|
|
|
hello to all of u
i have made a table in mysql which have a field doc of blob type
now i take a edit button and a button when i click on button system drive opens
and i select a document
now when i press another button names submit i want that this document is
stored in mysql but it will not stored please help me
i use this to submit:
GetDlgItemText(IDC_EDIT1,f);//doc is stored in f as i supposed
sn.Empty();
sn="insert into files values(\'" + f + "\')";
thanks
hi
|
|
|
|
|
Hi there,
My problem is that an exe file I build with VS 2005 (Professional
Edition) simply refuses to run on other computers. In fact it runs only
on machines with VS 2005 (Professional Edition) installed; on other
machines it simply says
I've checked for DLLs the program loads but it seems that they exsist on
these computers too.
If I try to start this program from from VS 2005 Express Edition, a
console window appears with this message:
Unable to start program 'E:\project\Kamicopy\Sconverter.exe'. This application has failed to start because the application configuration is incorrect.
Review the manifest file for possible errors. Reinstalling the
application may fix this problem. For more details, please see the
application event log.
---------------------------
OK
---------------------------
How can I fix this?
tuongnd
|
|
|
|
|
Tuongnd wrote: Unable to start program 'E:\project\Kamicopy\Sconverter.exe'. This application has failed to start because the application configuration is incorrect.
Rather sounds like the target computers are missing the updated C run time
Microsoft Visual C++ 2005 Redistributable Package (x86)[^]
|
|
|
|
|
I dowloaded & run setup vcredist_x86.exe but still same error?
tuongnd
|
|
|
|
|
Can you more explain about your program?
|
|
|
|
|
My program 's running on a computer. At that computer 's well run but when I copy it to other computer then rebuild has result
"========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped =========="
But I press button F5 "to run program" then appear messagebox
"Unable to start program "\..sconverter.exe this application has fail to start because the application configatution is incorrect. Review the manifest file for possible errors.Reinstalling the application may fix this prolem.For more detail see the application log".
How to fix ?
Thanks
tuongnd
|
|
|
|
|
Three step fix this error:
Step 1. Update window xp2
Step 2. Download vcredist_x86.exe and vc2005sp1_redist_x86.exe and run it.
Step 3. Press Alt+F7 click configuration change "debug" -> "Release"
Thanks all for support.
tuongnd
|
|
|
|
|
I glad you found answer.
|
|
|
|
|
Please refer here[^].
Regards,
Paresh.
|
|
|
|
|
Hello all,
I'm using VC++ 2005 Express and I'm trying to compile Detours (a win32 hooking library by Microsoft Research).
I was able to compile the library using Visual Studio 6 , but VC++ Express seems to be a mystery.
I have installed the Platform SDK and applied the required configurations.
The error I get is:
<br />
C:\Program Files\Microsoft SDK\Include\strsafe.h(5595) : error C2220: warning treated as error - no 'object' file genera<br />
ted<br />
C:\Program Files\Microsoft SDK\Include\strsafe.h(5595) : warning C4996: '_vsnprintf' was declared deprecated<br />
C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\stdio.h(339) : see declaration of '_vsnprintf'<br />
Message: 'This function or variable may be unsafe. Consider using _vsnprintf_s instead. To disable deprecation,<br />
use _CRT_SECURE_NO_DEPRECATE. See online help for details.'<br />
C:\Program Files\Microsoft SDK\Include\strsafe.h(5635) : warning C4996: '_vsnwprintf' was declared deprecated<br />
C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\stdio.h(450) : see declaration of '_vsnwprintf'<br />
Message: 'This function or variable may be unsafe. Consider using _vsnwprintf_s instead. To disable deprecation,<br />
use _CRT_SECURE_NO_DEPRECATE. See online help for details.'<br />
C:\Program Files\Microsoft SDK\Include\strsafe.h(5719) : warning C4996: '_vsnprintf' was declared deprecated<br />
C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\stdio.h(339) : see declaration of '_vsnprintf'<br />
Message: 'This function or variable may be unsafe. Consider using _vsnprintf_s instead. To disable deprecation,<br />
use _CRT_SECURE_NO_DEPRECATE. See online help for details.'<br />
C:\Program Files\Microsoft SDK\Include\strsafe.h(5871) : warning C4996: '_vsnwprintf' was declared deprecated<br />
C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\stdio.h(450) : see declaration of '_vsnwprintf'<br />
Message: 'This function or variable may be unsafe. Consider using _vsnwprintf_s instead. To disable deprecation,<br />
use _CRT_SECURE_NO_DEPRECATE. See online help for details.'<br />
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\cl.EXE"' : return code '0x2'<br />
Stop.<br />
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe"' : return code '0x2'<br />
Stop.<br />
I spent two days struggling with this, and the authors of the library do not offer a forum or a way of communication.
Thanks in advance,
Naimi
|
|
|
|
|
The warnings mention ways you can fix it...
You could go through and change all the source code to use the new, "safe" functions.
or
You can define _CRT_SECURE_NO_DEPRECATE to suppress the warnings:
If you're using a makefile, add
/D "_CRT_SECURE_NO_DEPRECATE"
to the compiler command line.
or
If there's a pre-compiled header file (or maybe at the top of every header file) you can add
#pragma warning(disable : 4996)
or
#define _CRT_SECURE_NO_DEPRECATE 1
to suppress the warnings.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
This does not fix the errors (first and last two lines).
|
|
|
|
|
tmp0 wrote: This does not fix the errors (first and last two lines).
Do you mean the first and last two of the errors you listed?
I don't have the makefile or the code so I can't imagine what the errors are.
If you have no support from the author then you pretty much have to dig in there and fix them
to make it compatible with the newer compiler/CRT/etc.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I have a simple graph : 1st VideoCapture Source -> A simple class derived from ISampleGrabber ->
When i add ISampleGrabberFilter , ActiveMovie Windows appers automatically , i cannot give its ownership to my
main windows in MFC. I have a method called SetupVideoWindow :
void SetupVideoWindow(HWND owner)
{
this->OwnerWindow = owner;
this->VideoWindow->put_Owner((OAHWND)this->OwnerWindow);
this->VideoWindow->put_WindowStyle(WS_CHILD | WS_CLIPCHILDREN);
this->VideoWindow->put_MessageDrain((OAHWND)owner);
this->VideoWindow->put_Visible(OATRUE);
this->VideoWindow->put_AutoShow(OAFALSE);
}
If i build and render graph then play it without adding ISampleGrabber , ActiveMovieWindow doesnt appear.
How can i solve this problem , or may i use a transform filter instead of it ?
THANK YOU VERY MUCH
|
|
|
|
|
I have a program that will connect to an FTP site with InternetConnect() if I use my Windows dialer.
If I try to connect to the FTP site using another dialer there is no connection to FTP site.
My Windows dialer has my user name and password for my ISP, but the other dialer does not, it just dials and connects.
I am confused, how can the other dialer connect without my ISP username and password? This is probably why I cannot connect to FTP site.
I can make a connection with the other dialer using HTTP settings and using a www.myspace.net address, but if I switch over to FTP settings and use ftp.myspace.net, no connection.
Please excuse me if I sound confused, I am, and I can't seem to get my brain wrapped around these concepts.
Thanks for any help.
|
|
|
|
|
frqftgbdafr wrote: I can make a connection with the other dialer using HTTP settings and using a www.myspace.net address, but if I switch over to FTP settings and use ftp.myspace.net, no connection.
Are you sure there's an FTP server available at the target site that is listening on the specified
port? It sounds like there isn't HTTP servers and FTP servers are not the same.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi all,
I have created the button in my project like this:
<br />
CBitmapButton m_mainSettings;<br />
<br />
DDX_Control(pDX, IDC_MAIN_SETTINGS, m_mainSettings);<br />
m_mainSettings.LoadBitmaps(IDB_BITMAP1);<br />
m_mainSettings.SizeToContent();<br />
All works good, except greyed frame arround bitmap.
So I need to add a transparent color for the bitmap.
Please help me to resolve the problem.
-- modified at 14:38 Sunday 17th June, 2007
|
|
|
|
|
AFAIK, CBitmapButton doesn't support transparent colors.
You could derive a class from CBitmapButton, override the DrawItem() method, and draw the bitmaps
yourself using transparency, perhaps with GDI+ or masked bitmaps. CBitmapButton uses BitBlt()
to draw the bitmaps.
An easier (IMO) approach would be to use a toolbar control. There you can use image list(s)
which will handle transparency and true-color bitmaps easily.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
How can i do features below on a video stream, with sample grabber ?
Are there any sample for this in directshow samples of MS ?
4:3
16:9
Crop
Stretch
BEST REGARDS
|
|
|
|
|
Hi,
I have created a project in MFC and had choosen Windows Explorer style during wizrd.
I was able to add new command handlers for most of the toolbar buttons. But I
cannot add/edit command handlers for Open, Save and Save As... toolbar buttons
and menu items in the project. I think they are handled autmatically by MFC somehow,
but i want to use my code insted of the default.
Can anyone please help me out?
|
|
|
|
|
Hi,
In my project,I have to draw icon over a bitmap every 250msec.
My problem is that sometimes the drawing over the bitmap is flickering
in a very annoying way.
I know that I need to draw over the bitmap using double buffering,
and looked over some articles about it,but failed to understand
how to do it.
I can't use the classes of those articles (Safety issues... ).
Can anyone help me understand how to improve my drawing technique???
I use the following piece of code:
void Frm_WkAtol::OnTimer(UINT_PTR nIDEvent)
{
m_AtolCorridorBitmap.Invalidate();
CDialog::OnTimer(nIDEvent);
}
void AtolCorridorBitmapClass::OnPaint()
{
CStatic::OnPaint();
CRect CorridorRect;
CDC *pDC = GetDC();
static int x = 0;
pDC->SetTextColor(RED_COLOR);
pDC->SetBkMode(TRANSPARENT);
GetClientRect(&CorridorRect);
szCaption.Format(_T("Test %d") , x++);
pDC->ExtTextOut(CorridorRect.left, CorridorRect.top + 30 , ETO_OPAQUE , NULL , szCaption , NULL);
DrawIcon(pDC->m_hDC, CorridorRect.left , CorridorRect.top , m_hUavInsideAtolCorridorIcon);
ReleaseDC(pDC);
}
With best regards,
Eli;P
|
|
|
|
|
How about only invalidating only the rectangle that changes, then the only bit that needs redrawing is the icon, rather than the whole bitmap. I'd consider a separate overlaid windowless control if that doesn't work. Otherwise you need to incorporate the icon directly into the bitmap data so each change only redraws that area of the screen once. Remember to catch the erase background message and tell windows not to erase or you'll get really bad flicker whatever you do.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|