|
AFAIK you can only create PE's with link.exe. F.ex. how would you know where the different sections were using a "raw binary"?
|
|
|
|
|
Hi
Is it possible to execute a command in a unix server from VC++? I heard it can be done with telnet, but is there class or some library to do?
Regards,
Ravi
|
|
|
|
|
NT ships with rexec.exe - maybe that would do it...
|
|
|
|
|
I am trying to put messages out to the scren such that each line is under the next, causing a scrolling action in the window. I get the messages, but they are to the right of each other, even though I have CR/LF included, as well as WORDBREAK. In reading the function description, I thought the WORDBREAK and the \r\n would cause the output I desire. Can anyone please tell me where I am going wrong?
void CChildView::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
// Do not call CWnd::OnPaint() for painting messages
CRect rect;
char* data = " Dialing xxxxxx\r\n";
CWnd *wnd = dc.GetWindow();
::GetClientRect(wnd->m_hWnd, &rect);
dc.DrawText(data, strlen(data), &rect, DT_WORDBREAK);
dc.SetTextAlign(TA_RIGHT);
// Dialing the Host
pcAny.awConnect("xxxxxx");
rc = pcAny.GetError();
data = " \r\nConnection = ";
dc.DrawText(data, strlen(data), &rect, DT_RIGHT|DT_WORDBREAK);
dc.SetTextAlign(TA_UPDATECP);
dc.DrawText(rc, rc.GetLength(), &rect, DT_RIGHT|DT_WORDBREAK);
dc.SetTextAlign(TA_UPDATECP);
// Getting Status of Connection
rc2 = pcAny.ConnectionStatus();
data = " \r\nConnection Status = ";
dc.DrawText(data, strlen(data), &rect, DT_RIGHT|DT_WORDBREAK);
dc.SetTextAlign(TA_UPDATECP);
itoa(rc2, data, 10);
dc.DrawText(data, strlen(data), &rect, DT_RIGHT|DT_WORDBREAK);
dc.SetTextAlign(TA_UPDATECP);
// Sending the Order(s)
data = " \r\nSending Orders\r\n";
dc.DrawText(data, strlen(data), &rect, DT_RIGHT|DT_WORDBREAK);
dc.SetTextAlign(TA_UPDATECP);
pcAny.FileXferToHost("TESTFILE.TXT","TESTFILE.TXT");
rc = pcAny.GetError();
data = " \r\nSending = ";
dc.DrawText(data, strlen(data), &rect, DT_RIGHT|DT_WORDBREAK);
dc.SetTextAlign(TA_UPDATECP);
dc.DrawText(rc, rc.GetLength(), &rect, DT_RIGHT|DT_WORDBREAK);
dc.SetTextAlign(TA_UPDATECP);
// Getting the New Catalog
data = " \r\nUpdating Catalog\r\n";
dc.DrawText(data, strlen(data), &rect, DT_RIGHT|DT_WORDBREAK);
dc.SetTextAlign(TA_UPDATECP);
pcAny.FileXferFromHost("CATALOG.TXT","CATALOG.TXT");
rc = pcAny.GetError();
data = " \r\nUpdating = ";
dc.DrawText(data, strlen(data), &rect, DT_RIGHT|DT_WORDBREAK);
dc.SetTextAlign(TA_UPDATECP);
dc.DrawText(rc, rc.GetLength(), &rect, DT_RIGHT|DT_WORDBREAK);
dc.SetTextAlign(TA_UPDATECP);
// Host Disconnect
data = " \r\nDisconnecting from Host\r\n";
dc.DrawText(data, strlen(data), &rect, DT_RIGHT|DT_WORDBREAK);
dc.SetTextAlign(TA_UPDATECP);
pcAny.awDisconnect();
delete pcAny;
}
|
|
|
|
|
Only your current x pos will be updated when UPDATECP is set. The y-part will be returned from DrawText() (as a delta value) My guess is you have to do a manual MoveTo() to adjust the height. Not that I know for sure. What I do know for sure is that you only have to call SetTextAlign() once
|
|
|
|
|
Read that the WORDBREAK will only work when the UPDATECP is not set. Took them all out, but no change. Looks like the fucntion is fail to see the \r\n. Any other ideas?
|
|
|
|
|
If you just want to get the job done, use the CEditView derived from CView to display text. If that's not good enough (i.e. you want to do other drawing aswell), keep with your original ideas, but print just one line at a time, and keep track of the y-value yourself (just increase it with the height of your current font + some additional line spacing.
|
|
|
|
|
Hi, can any of you tell me how to disable property pages from displaying. Thank you!
|
|
|
|
|
Hello!
I need to know how to, when I maximize or minimize the size of the window of my program, make all that is inside the client area "maximize(or minimize)" together.
My problem is that I have a program which draws a picture in the client area, but when I maximize the window, the drawing disappears and I have to click a button or something like that in order to make the picture appears again.
I know that what I have to do is something related to the function "BitBlt" (if not or if there is another way, please tell me) and the procedure I must implement is to "take a photograph" of the drawing on the moment the user maximizes the window and then put this photograph onto the screen(which I believe is what "BitBlt" does), but I do not know how to make the code of this whole procedure (I've already tried, but it didn't work very well).
Thanks for any help!!!
|
|
|
|
|
Do your drawing in a handler for WM_PAINT (or WM_ERASEBKGND if you prefer). This handler will be called when your window needs a redraw. If you already have code for drawing your picture, move it there.
|
|
|
|
|
Something else that you may want to do besides making your window update the photograph in the WM_PAINT handler, is setting the CS_VREDRAW and CS_HREDRAW flags for your main window, this wil force all of the children to fully repaint whenever the main window is resized.
Checkout my Guide to Win32 Paint for Intermediates
|
|
|
|
|
Hi guys
I had a dialogue box app in VC++6 and then built it in VC++7
it asked me if i wanted to reformat the project and i pressed yes and built it in VC7, all was ok until i tried to run the app on a win98 machine, the CFileDialog would not work on a 98 machine it works on a 2000 machine
I then got a new app in VC7 and put CFileDialog in it but it worked on a 98 machine
im at a loss
Wudan Master
|
|
|
|
|
Hello!
I want to read the private key from a
certificate, but I don't know whici API
function do this. Also, as a derived
questions: where are stored private keys
in windows? Which is the location?
Can I read them, and in which conditions?
Are there special API's? (I just vaguely heard
about CryptoAPI.)
Anyone experienced here?
Thanks,
Don Miguel
|
|
|
|
|
I do not think that the private key is stored in the certificate, the private key is a secret that only the owner knows about. Do you mean the public key?
Checkout my Guide to Win32 Paint for Intermediates
|
|
|
|
|
Hi,
Im building a single document application and i want to bring up a new dialog box that is a new window, ie. has its own little bar at the bottom of the screen. Can anybody help?
Cheers
Dor
|
|
|
|
|
I haven't notebook on head but:
If you use VisualC++, you can develop this application imedialitly with
i)File->New...
ii) MFC Application
at this point you follow step to step...
this's your simgle document application...
For viewing a dialog you must write:
CDialog dialog;
dialog.domodal();
Gianfranco Lanzetta.
|
|
|
|
|
You will want to use CreateDialog to create your dialog and make it appear modelessly, if you are using MFC, you can create an instance of your dialog object, then call the Create member, then the ShowWindow member. In order to make sure that it is in the task bar you will need to set the WS_EX_APPWINDOW style for your dialog.
Checkout my Guide to Win32 Paint for Intermediates
|
|
|
|
|
Hello all!
I'm writing an app which uses many mfc controls. I am using subclasses of ScrollBars and DialogBars, TreeCtrls and some raw CWnds each of which require a common set of properties and methods. It would appear that subclassing CWnd at the object (as opposed to HWND) level would be the ideal solution.
There's a couple of ways I can think of to achieve this, but I was wondering if anyone has solved this more elegantly than I could.
One way I thought of would be to have all of my controls bolted onto a common placeholder class. Another would be to have an HWND->CWnd map and associate a class with each window which could be used to hold all my data. The final one would be to hook CWnd somehow and store a pointer to my data in one of the window data slots.
Any takers?!!
Thanks,
(C:=
Charlie.
|
|
|
|
|
You may use the macro procedures in this way.
//this's link to param1=parent (container)
//and param2=child
inline macro_name(param1,param2){
//implementation
}
where parent contains a std::vector of child pointers;
this's is a solution.
gianfranco lanzetta.
|
|
|
|
|
Hi ,
I know this might sound incredibly dumb , but what is c++? what is is used for? is this the best thing to build programs? what programs ?
Thanks for you time
|
|
|
|
|
It is a programming language. It is used for developing software of all types.
------------------------- wrote:
is this the best thing to build programs
It depends on the type of application that you are going to build. If you are going to do a large scale application, or something that requires a lot of speed or low-level access to memory, then C++ is an excellent choice.
If you are going to develop small simple programs, and I emphasize simple you could use Visual Basic, this is if your are developing for windows of course.
There are plenty of languages to choose from, mainly you should look at what the purpose of your program, where it will be used, which operating system and other factors like that before you decide on a language.
Checkout my Guide to Win32 Paint for Intermediates
|
|
|
|
|
Hi everybody,
Can we invoke local applications from IE ? And, can IE direclty invoke activeX components based on certain event....
Please reply...
Yours
Wolverine
visit me at:
http://www.futurecomputing.homestead.com/
http://www.futurecomputing.0catch.com/
|
|
|
|
|
this code don't work too good.
this is the question:
template<class type="">
int size(type x){return sizeof(x);};
or
template<class type="">
int size(type x){int _size=sizeof(x);return _size;};
Why this?
thanks a lot.
|
|
|
|
|
Well, it should work, assuming <class type> was stripped by the html parser here.
template <class type>
int size(type x){return sizeof(x);};
has to be called like int sz = size<int>(8); , which is a bit strange.
You might want to write the function like:
template <class type>
int size(){return sizeof(type);};
instead. This way you will call it like int sz = size<int>(); , which looks a bit better IMHO.
|
|
|
|
|
Hehe, more stripping there. It should have read:
int sz = size<int>(8); and int sz = sizeX<int>();
|
|
|
|
|