|
Thanks, but... that was what I said. There are no "Extensibility Projects" and thus no Add-in wizard
|
|
|
|
|
i use VS pro and i never see this either sorry
TOXCCT >>> GEII power [VisualCalc]
|
|
|
|
|
Hi!
I need to draw some information on screen, without having to create a window. Here my code:
<br />
CWnd* pDesktop=GetDesktopWindow();<br />
CDC* pDC=pDesktop->GetDC();<br />
CBrush* pOldBrush=(CBrush*) pDC->SelectStockObject(BLACK_BRUSH);<br />
CPen* pOldPen=(CPen*) pDC->SelectStockObject(NULL_PEN);<br />
pDC->Rectangle(0,0,100,100);<br />
pDC->SelectObject(pOldBrush);<br />
pDC->SelectObject(pOldPen);<br />
pDesktop->ReleaseDC(pDC);<br />
This code is not working, nothing appears on screen!
What's wrong? Do I need to create a transparent window and draw on this window?
Thks in advance!
Appstmd
http://www.atlence.com
|
|
|
|
|
Hi. I’m a VC++ programmer that have plans to use some functionalities from MSN Messenger into my programs.
I need some kind of tutorial on how to start… I’ve earlier coded against MS Outlook and MS PowerPoint so think I could get most things quite fast.
Really need some tips on where to start!
_____________________________
...and justice for all
APe
|
|
|
|
|
How can i copy a system file that is already in use
CopyFile fails with error GetLastError -> 32
i am tring to copy SAM,SOFTWARE...(Registry) files in XP
i have an application that backs up registry and it is copying all files to a folder
do i need some security tokens to copy these files
please help
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Any good suggestion or links for taking MCSD Exams for VC++ ?
|
|
|
|
|
Hello Friends,
I am having CListView in which I am displaying some image and underneath them I having some text. The Main problem is that whenever the text is not having sufficient space then its displaying ... and when I select the text gets wrapped to the next line.
Please give me a solution for not displaying the three dots(...) and the text should be displayed on the next line.
Thank you in advance.
Neelesh K J Jain.
|
|
|
|
|
Hi,
While I've never done anything with images and text in a ListView I have an idea that might help you. This is the same thing that happens if you look in any folder and the name is too long. The obvious reason you get the "..." is because displaying the full name could overlap with an image below the text. Each row has a certain height to it and if the text goes beyond the height it gets truncated. At least that's how I see it. So my idea is for you to manually override the row height and change it to make the text fit. I don't know if this definitely will work, but its worth a shot.
Edit: After messing around inside a folder, it seems that there usually is enough space to display most names without doing that. Maybe there is a property you can check to allow it to display?
|
|
|
|
|
HI ,
I wanna help on a simple application.
I have 2 applications in c language.
First application 'A' has some data being written in a text file 'T'.
Second Application 'B' simultaneously is reading that data from the same file 'T'(if any) and producing the desired output.
Can it b done n how.
amit mishra
|
|
|
|
|
set a flag in the registry (or in a temporary text file).
this way, by testing the flag before writing or reading, you could know if you are allowed to (or not)...
prog1 :
if (!flag) {
<font color=#0000FF>int</font> fd = fopen(<font color=#808080>"T"</font>);
fprintf(<font color=#808080>"some datas to write"</font>);
fclose(fd);
flag = <font color=#0000FF>true</font>;
}
prog2 :
if (flag) {
<font color=#0000FF>int</font> fd = fopen(<font color=#808080>"T"</font>);
<font color=#0000FF>char</font> strTab[100];
fscanf(<font color=#808080>"%s"</font>, strTab[0]);
fclose(fd);
flag = <font color=#0000FF>false</font>;
}
TOXCCT >>> GEII power [VisualCalc]
|
|
|
|
|
What you should do is lookup "Named Pipes". This is in essence exactly what you want to do. Do a search on SS_Log on Codeproject and you'll find the SS_Log_Server article that does exactly that.
|
|
|
|
|
a language question. i have the following:
-------------------
class BUFFER{
public:
char* string;
int size;
~BUFFER()
{
delete[size] string;
}
};
-------------------
void func1(BUFFER buf)
{
...
// on exit, the original "buf.string" will be deleted, because the
// destructor is called once
}
-------------------
void main()
{
BUFFER mf;
mf.string = new char[20];
lstrcpy(mf.string, "test");
func1(mf); // <-- after this returns, the mf.string
// was deleted once, and will be deleted the second
// time when "main" returns in the second call to the
// destructor, which will lead to an error
}
-------------------
The question is:
how can i override this behavior? i want the buffer in "string" pointer to be a copy of the original too - just like the "size" attribute, so there won't be a second delete called in destructor for the same pointer.
Thanks.
|
|
|
|
|
The easist way to fix this is to pass the BUFFER to func1 by reference.
void func1(BUFFER &buf)
{
...
} What is happening in your code is that when func1() is called, a local copy of BUFFER is made that is destroyed when the function exits. By using a reference, you access the original BUFFER, not a new copy, so it does not go out of scope at the end of the function, and it's destructor is not called.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
i know that by reference does that, but i don't wan't to use this method. i want the original to be completley seperated from the one inside the function.
does overriding the "=" operator affects an object transferred by value?
|
|
|
|
|
What you need then is a copy constructor in your BUFFER class. Have the copy c'tor make a copy of the string. The default copy c'tor just copies the pointer.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
but how would i know if the object was created locally by the function because it was passed as a parameter, or a user created it for his own use?
i want that if a user creates an instance of this class - the string will be set to "NULL" in the constructor, but if it is passed as a parameter - all its content will be replicated and not point to the original information.
|
|
|
|
|
do this in your class definition :
<font color=#0000FF>class</font> CBuffer {
<font color=#0000FF>char</font>* m_pcString;
<font color=#0000FF>int</font> m_iSize;
<font color=#0000FF>public</font>:
CBuffer() {
<font color=#008000>
m_pcString = 0x00000000;
m_iSize = 0;
}
CBuffer(<font color=#0000FF>const</font> CBuffer& refBuf) {
<font color=#008000>
m_pcString = <font color=#0000FF>new</font> <font color=#0000FF>char</font>[refBuf.m_iSize];
<font color=#0000FF>if</font> (m_pcString != NULL) {
<font color=#0000FF>this</font>->m_iSize = refBuf.m_iSize;
}
}
~CBuffer() {
<font color=#008000>
<font color=#0000FF>delete</font>[m_iSize] m_pcString;
m_iSize = 0;
}
}; then, when you call your function with a CBuffer as parameter, this one is copied by the copy constructor in local when the function is called, and destroyed when the function exits. in any case the global object is affected by the construction/destuction of the local object.
TOXCCT >>> GEII power [VisualCalc]
|
|
|
|
|
I know I can use GetDeviceCaps(desktopDC,BITSPIXEL) to get the bit depth, but what if the desktop is 16 bpp. How do I find out if its RGB555 or RGB565?
Thanks in advance.
|
|
|
|
|
I was wondering how to make my program (.exe) have an icon... I would rather do command line compilation (Vc++ is too big without the optiimiser) so could someone help me out?
|
|
|
|
|
Hi All,
Does anyone knows the algorithm to convert from long to byte?
Thanks...
|
|
|
|
|
There's no algo - long have 4 bytes and it is signed, byte is 1 byte and it's unsigned (I think).
If you do just:
<code>BYTE</code> bRes = (<code>BYTE</code>)lSomeLong;
you strip off the 3bytes including the sign. Thus it will work until you'll keep the numbers inside the long to the size of the BYTE - if it will be higher, then the information will be lost - you'll get the compiler warning.
|
|
|
|
|
Hi geo_m,
I actually need to convert from long to BYTE array of 4 (BYTE[4]) since long is 32bit (32bit = 4 bytes).
That's okay... I have found the solution.
Cheers...
Samin Thomas
|
|
|
|
|
hello all
what code do i need to write in MFC in order to check if the user has clicked alt key on the key board and how can i implement Alt+F4 fuction when the user clickes alt button on the key board and button(with caption F4) which is on my dialog box which is created in an SDI application
my alt and F4 button on the dialogbox has the following code in the fuction
void MyDialog::OnButtonalt1()
{
flag=1;
if( ( (WM_KEYDOWN||WM_SYSKEYDOWN) && (0x8000 ==(0x8000 & GetKeyState(18)) ) ) )
{
MessageBox("in Alt");
}
/*if( (WM_KEYDOWN && !GetKeyState(18)) && caps)
{
Invalidate();
}
BYTE keyState[256];
GetKeyboardState((LPBYTE)&keyState);
if( (TRUE && !(keyState[115] & 1))||(!FALSE && (keyState[115] & 1)) )
{
// Simulate a key press
keybd_event( 38,0x45,KEYEVENTF_EXTENDEDKEY|0,0);
// Simulate a key release
keybd_event(38,0x45,KEYEVENTF_EXTENDEDKEY|KEYEVENTF_KEYUP,0);
}
*/
}
void MyDialog::OnButtonF4()
{
int i = GetKeyState(115);
if(i)
{
MessageBox("In F4");
}
}
Request to all to continue this
|
|
|
|
|
Dear u have done it, but you can't call WM_KEYDOWN ||WM_SYSKEYDOWN from inside a command, i do believe that you have to overload it as a seperate function inside that dialog, try it and it will work... Enjoy. Rabih
|
|
|
|
|
override virtual BOOL PreTranslateMessage( MSG* pMsg )
BOOL CMyDialog::PreTranslateMessage( MSG* pMsg )
{
if(pMsg->message == WM_SYSKEYDOWN)
{
//Check for F4 && Do Something
}
return CDialog:: PreTranslateMessage(pMsg);
}
|
|
|
|