|
HI ALL
in programming under dos i use this
int a=5;
int* p=&a;
then (cout p) to print addres
but how i can display address in EditBox
THANKS
|
|
|
|
|
You could do something similar:
[ccode]
#include <sstream>
using std::ostringstream;
void Func() {
int a;
int* p = &a;
ostringstream stream;
stream << p;
SetDlgItemText(IDC_EDIT1, stream.str().c_str());
}
[/ccode]
Walter Gildersleeve
Freiburg, Germany
walter.gildersleeve@pe-gmbh.de
|
|
|
|
|
Hi, does anybody know what the following output-messages means (VC++ 6.0) :
Compile...
prak3.c
(output german version)
Befehlszeilenfehler D2027 : '.\c1' kann nicht ausgefuehrt werden
(D2027 : '.\c1' could not be started)
Fehler beim Ausführen von cl.exe.
This error does not depend on the source-code - it occurs with every file ...
Greatings Mario ///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
Look up the error code (D2027) in MSDN - there's a list of possible causes in the help.
--Mike--
http://home.inreach.com/mdunn/
Is history an illusion caused by the passage of time, or is time an illusion caused by the passage of history?
|
|
|
|
|
There's a difference in c1.exe (c-one) and cl.exe (c-el).
Maybe you've made a typo while specifying the linker?
--
Alex Marbus
|
|
|
|
|
Would a cool DHTML article be appreciated at codeproject? Tell me real pronto.
Thanks
|
|
|
|
|
where I can find free e-books about VISUAL C++
|
|
|
|
|
i know web site give you free e-book
www.maxcode.com
you can find the e-books in VISUAL C++ tutorial in maxcode
|
|
|
|
|
HI ALL
I use winapi befor winmain
but somtims i see pascal and apientry
what different between three kinds ...
THANKS
|
|
|
|
|
hi,
PASCAL is used in all exported function declarations,
indicating to the compiler that Pascal rather than C ordering is used for all
arguments (values) pushed onto the stack.
While C commonly uses inverted order, placing the least-significant bytes first on the stack
, Windows uses Pascal ordering that, like Unix, places the most-significant bytes first.
There is another small but crucial difference.
Exported functions are functions that will be called from outside the class or
in the case of a DLL
from other applications outside the unit (library).
In a Windows application where subroutines are called from Windows itself or where a
member function in one class is called from outside the class, even if both belong to the same application,
the Pascal calling order is necessary.
On the other hand, all internal function declarations (functions and subprocedures
called directly from other procedures within the application)
will expect arguments to appear in standard C order and should not be declared using the PASCAL specification.
As far as how argument lists are declared in the procedure definitions, it makes absolutely no difference whether
the Pascal or C calling conventions are used.
These conventions affect only how the arguments are handled internally
that is, on the stack
and do not in any way affect how the programmer constructs the argument lists.
However
APIENTRY will end up defined as WINAPI when you include windows.h
in version 6 , WINDOWS.H now supports the WINAPI macro, which translates to the appropriate calling convention for the target. Use WINAPI where you previously used PASCAL or __far __pascal.
for the actual definitions see windef.h -- Basic Windows Type Definitions
cheers
|
|
|
|
|
I have posted before asking some help on this.
thanks for all the people who have replied.
However, I think I forgot to clarify something.
Input: a directory
output: all files in that directory AND its sub-directory into a .txt file.
I know about the DlgDirlist command in VC++ .. however, how do I dump the listing into a .txt file?
Actually it would be better if this is done in VC++ console programming.. so in DOS.
|
|
|
|
|
How about a shell command?
dir C:\the\directory\you\want /b /s > filelist.txt
--Mike--
http://home.inreach.com/mdunn/
Is history an illusion caused by the passage of time, or is time an illusion caused by the passage of history?
|
|
|
|
|
Yeah.. I was thinking about that.
Does this command work on NT / 2000 systems?
The reason I didn't go this way was because I don't think it works with NT.
|
|
|
|
|
It works on 2000. I don't have an NT4 system here, though, so I can't say about NT4.
--Mike--
http://home.inreach.com/mdunn/
Is history an illusion caused by the passage of time, or is time an illusion caused by the passage of history?
|
|
|
|
|
Hallo Leute !!
Ich versuche gerade ein program zu machen in dem ich meine Internetzeiten und kosten eintragen kann.Ich verwende dafür ein Dialogfeld der Klasse (CDialog);
In diesem dialogfeld habe ich drei Listboxen (CListBox) eingefügt damit es gegliederter aussieht.
1 in dem der Provider eingezeigt wird (CListBox m_boxprovider)
2 in dem die Zeit eingezeigt wird (CListBox m_boxtime)
3 in dem die kosten angezeigt werden (CListBox m_boxkosten)
soweit geht das auch !
Wenn ich jetzt aber einen eintrag in einer der Listboxen anklicke wird dieser selectiert.
Aber da es ja drei Boxen sind bleiben die dazugehörigen Einträge in den anderen Boxen
unausgewählt.
Ich habe mich gefragt in wie fern es möglich ist eine Ableitung der Klasse CListBox
zu erreichen da wenn bei einer Listbox ein Eintrag ausgewählt wird dieser gleichzeitg auch
bei den beiden anderen ausgewählt wird. Da sie ja alle drei CListBox-en sind müsste der Wert der angibt welcher Eintrag ausgewählt ist ja eigentlich nur gleichgesetz.
Kann mir irgendjemand helfen????
Ich zerbrech mir noch den Kopf bei dieser Aufgabe, denn da ich die Einträge per Auswahl durch den Benutzer löschbar machen will kommt es sicherlich zu Schwierigkeiten bei der Bedienung da man ja jeweils die drei passenden Einträge nacheinanderlöschen muss.
Vergisst man aber beispielweise den Eintrag der Zeit zum schon gelöschten Eintrag Provider
ebenfalls zu löschen so bleibt ein Ungültiger Zeiteintrag bestehen da es für diesen ja keine Provider mehr gibt.
|
|
|
|
|
Or via BabelFish:
Hello of people!! I try even program to make in which I mean Internet times and cost enter kann.Ich use for it a dialog field of the class (DIALOG); In this dialog field I have three cunning boxes (CUNNING BOX) inserted thereby it more arranged look. 1 is in-shown in that the Provider (CUNNING BOX more m_boxprovider) 2 in that the time is in-shown (CUNNING BOX m_boxtime) 3 in that to cost to be displayed (CUNNING BOX m_boxkosten) so far goes also! If I however an entry in one of the cunning ruse click now these am selectiert. But since there is three boxes remains the pertinent entries in the other boxes unausgewaehlt. There I have myself in demand in like far it possible am a derivative of the class CUNNING BOX to achieve if with a cunning ruse an entry am selected these gleichzeitg also with the two different am selected. There they all three CUNNING BOXES are would have the value indicate which entry selected are actually only alike. Can somebody help me???? I zerbrech me still the heading with this function, because since I want to make the entries erasable by selection by the user come it surely to difficulties during the operation one the three suitable entries successively-delete in each case there must. One forgets to likewise delete however for example the entry of the time to the entry Provider already deleted thus remains an invalid time entry existing it for this no more Provider gives there.
I'm not sure which is harder to understand....
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Just for kicks, I'm going to write myself a CCunningBox class now!;)
Accept that some days you are the pigeon and some days the statue.
|
|
|
|
|
You guys should have won the war, about 50 years ago. We'd all be speaking German then, and everyone could understand the crap you're writing here.
--
Aber Ich werde auch Adolf genammt..
|
|
|
|
|
I think I made the language point in a far more polite manner about 90 minutes before your post. No need to be rude about it.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
C'mon, those f***ing German's think they own the whole f***ing world. Speak English, or don't speak at all!
--
Und jetzt kommen die Kamelen
|
|
|
|
|
Is the OnSetFocus a good place to swap the m_pMainWnd if I
have multiple top level windows?
Thank You
|
|
|
|
|
I've created my browser but how modify or delete the contextmenu in my application. I've tried to override the method OnContextMenu but it doesn't work!!
|
|
|
|
|
Does anyone here have any experience with using either or both the Windows Media Encoder SDK and/or the Windows Media Format SDK? If so I hope you can help me answer the following question. Using these SDKs I am able to create a profile, create an encoding session, and run this session, I only have one drawback. I cannot correctly specify the audio codec in the profile. I set the WM_MEDIA_TYPE.subtype parameter to be equal to the GUID of the codec I want to use and cannot properly create a profile. But, when I compare the .prx file this profile was saved to against another .prx file that a profile created using the profile manager (with the same parameters as the profile I created using the SDKs) I have one difference in the audio setup. There is a field named codecdata in the .prx file that differs, even though I have set the same parameters in both profiles (one created with the SDKs does not match up to the one I created with the profile manager). Can anyone help me with this problem? If so I will very much appreciate it! Thanks in advance.
Roger Printy
Software Engineer
TeraNex
Orlando, FL
|
|
|
|
|
Does anyone here have any experience with using either or both the Windows Media Encoder SDK and/or the Windows Media Format SDK? If so I hope you can help me answer the following question. Using these SDKs I am able to create a profile, create an encoding session, and run this session, I only have one drawback. I cannot correctly specify the audio codec in the profile. I set the WM_MEDIA_TYPE.subtype parameter to be equal to the GUID of the codec I want to use and cannot properly create a profile. But, when I compare the .prx file this profile was saved to against another .prx file that a profile created using the profile manager (with the same parameters as the profile I created using the SDKs) I have one difference in the audio setup. There is a field named codecdata in the .prx file that differs, even though I have set the same parameters in both profiles (one created with the SDKs does not match up to the one I created with the profile manager). Can anyone help me with this problem? If so I will very much appreciate it! Thanks in advance.
Roger Printy
Software Engineer
TeraNex
Orlando, FL
|
|
|
|
|
I have a static control.
In this control I want to draw a bitmap first (a compass) and afterwards I
draw the pointer (the pointer indicates which way the wind goes).
I do this in the OnPaint Function of the Class CWindrose (derived from CStatic).
This function looks like this:
void CWindrose::OnPaint()
{
DrawTransparent(...);
DrawPointer(...);
}
So everything works fine.
My problem is the flicker that appears everytime the OnPaint Function is called.
So:
How to call the bitmap to repaint just the pixels which are changed ???????
P.S.:
This is the Drawing function:
EFErr CWindrose::DrawTransparent(CDC *pDC, int x, int y, COLORREF crColour,CBitmap &Bmp)
{
COLORREF crOldBack = pDC->SetBkColor(RGB(255,255,255));
COLORREF crOldText = pDC->SetTextColor(0);
CDC dcImage, dcTrans;
// Create two memory dcs for the image and the mask
dcImage.CreateCompatibleDC(pDC);
dcTrans.CreateCompatibleDC(pDC);
// Select the image into the appropriate dc
CBitmap* pOldBitmapImage = dcImage.SelectObject(&Bmp);
// Create the mask bitmap
CBitmap bitmapTrans;
BITMAP bm1;
Bmp.GetBitmap(&bm1);
int nHeight= bm1.bmHeight;
BITMAP bm2;
Bmp.GetBitmap(&bm2);
int nWidth = bm2.bmWidth;
bitmapTrans.CreateBitmap(nWidth, nHeight, 1, 1, NULL);
// Select the mask bitmap into the appropriate dc
CBitmap* pOldBitmapTrans = dcTrans.SelectObject(&bitmapTrans);
// Build mask based on transparent colour
dcImage.SetBkColor(crColour);
dcTrans.BitBlt(0, 0, nWidth, nHeight, &dcImage, 0, 0, SRCCOPY);
// Do the work - True Mask method - cool if not actual display
pDC->BitBlt(x, y, nWidth, nHeight, &dcImage, 0, 0, SRCINVERT);
pDC->BitBlt(x, y, nWidth, nHeight, &dcTrans, 0, 0, SRCAND);
pDC->BitBlt(x, y, nWidth, nHeight, &dcImage, 0, 0, SRCINVERT);
// Restore settings
dcImage.SelectObject(pOldBitmapImage);
dcTrans.SelectObject(pOldBitmapTrans);
pDC->SetBkColor(crOldBack);
pDC->SetTextColor(crOldText);
RET_JA
}
|
|
|
|