|
that page not found. my problem is i am creating a msi package. when i install this the path where the package installed should be added in registry
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
|
Hi,
I am new to windows programming. In my code I would require to change the slider bar position (I am actually invoking the sliderbar from UI using win32 API, so I donot have source code of the application), which I have accomplished by sending message.
::SendMessage( aControlHWnd, TBM_SETPOS, (WPARAM) (BOOL) TRUE, (LPARAM)(LONG) aPosition );
The problem is with the updation of the window according to the new sliderbar position, I mean, when I change the position of the sliderbar it is changed visually, but the corresponding values in other objects (like textbox showing the value related to this sliderbar) are not updated.
To accomplish this I tried
::NotifyWinEvent( EVENT_OBJECT_VALUECHANGE, theDialogHWnd, OBJID_HSCROLL, CHILDID_SELF );
where theDialogHWnd is the handle for the dialog window containing the sliderbar and the textbox, but it didn't work. I am not sure if the parameters I am using are correct, or the event I am trying to notify, or may be my approach to the problem itself is wrong. I do understand that this can be easily accomplished by sending a keyboard or mouse event, but I am tryin not to use it.
Any help would be greatly appriciated.
Thanks.
|
|
|
|
|
When slider bars are moved they post either a WM_HSCROLL or a WM_VSCROLL to its parent. Try posting these messages to the parent window of the slider bar. To determine which message should be sent check the slider control for the style TBS_VERT.
See if something like this works:
int iPos = m_slider->GetPos();
if (m_slider->GetStyle() & TBS_VERT)
pWnd->PostMessage(WM_VSCROLL, (WPARAM)((iPos << 16) | SB_THUMBPOSITION), (LPARAM)NULL);
else
pWnd->PostMessage(WM_HSCROLL, (WPARAM)((iPos << 16) | SB_THUMBPOSITION), (LPARAM)NULL);
|
|
|
|
|
I want to know how can i make Intelliegnt Connectors,like those in MS Visio that connect 2 or more blocks and when the blocks are moved, the connectors position themselves accordingly without interferring with any other block.
Is it possible to make such connectors using VC++? I need this as i have to do a the same for my project.
Pls help
Regards
Meenu
|
|
|
|
|
Hi, it can be possible, but it will be difficult.
I would make it by setting the points where you can connect the object in an array/structure, then use some regions to know if the mouse is approaching to one of them to make the point visible when necessary and using its coordinates by clicking when it is visible.
Afterwards for the lines... this will be pretty hard (I think), at the beggining you should determine which point of your object is being used to start the line. Make a short line in this direction (if the point is at the top then a short line to north, if the point is at left, then a short line to west, and so on...). Then give priorities in directions (I mean go to the north if the object is in the lower part of the screen, go to the right if the object is on the left...). Once you have the beggining of the line, you should have a register of positions for the lines from left to right, from top to bottom (like a screen grid) and go through checking where is the next free place to draw the connection.
I can not give you any code, but the idea may be like that.
Shortly: Have a matrix to save the position of gridlines of the workspace, check where the connector is starting and go through taking dinamically the first free gridline you find towards the end of the connector. (if end is below, going down, if end is above, going up and so on)
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?
|
|
|
|
|
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
|
|
|
|