|
Can you not use Unicode strings in status bars?? The lParam of the SB_SETTEXT message is a LPSTR (not LPTSTR)...
|
|
|
|
|
See SB_SETUNICODEFORMAT.
Don't try it, just do it!
|
|
|
|
|
Thanks for the reply. I have another question - the SB_SETUNICODEFORMAT message says it needs comctl32.dll version 4.00 or later but the Remarks section says to see the remarks for CCM_GETUNICODEFORMAT which says it needs version 4.71 for WinNT or version 5.80 for Win95/98. Do you know which version it needs?
- thanks
|
|
|
|
|
I installed VS 2005.NET Beta 2 (the VS not an express edition) and I realised when making an MFC Application it has the same menus and buttons strips are equal to the 2003 version... I was expecting the same design of the Office 2003, since that happens when working without MFC...
Is this just my ignorance on MFC, or MS will change that soon?
|
|
|
|
|
When I generated the assembly code for both inline and non-inline function calls, I see no difference in code, they're exactly the same.
But it said to be inline version does not have the function call overhead?
|
|
|
|
|
inline is a suggestion to your compiler, it's not obliged to take your advice. I'm not sure if the compiler is allowed to inline without the keyword, though.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
I'm not sure if the compiler is allowed to inline without the keyword, though
It is, if you specify /Ob2.
Quoting from MSDN:
/Ob2 Expands functions marked as inline or __inline and any other function that the compiler chooses (expansion occurs at the compiler's discretion, often referred to as auto-inlining).
/Ob2 is in effect when /O1, /O2 or /Ox is used.
This option requires that you enable optimizations using /O1, /O2, /Ox, or /Og.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
I thought that was the case in general, but could not remember exactly, hence my comment surrounded by caveats...
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I believe that the inline keyword has no effect when you are compiling for debug.
Also, the compiler treats inline only as a suggestion, not as a requirement. This means that if the function is large enough, is called in a lot of places, or some combination of the two, it may decide to not generate code for it inline.
Software Zen: delete this;
|
|
|
|
|
Hi,
I'm tring to control ICQ from a small external MFC app.
I'm doing it with Spy++ to identify the massages related to the action I want to simulate, and then sending those massages to the ICQ contorls with PostMassage function.
Now, my problem is - how to control the TreeList control (with the pepole names) within ICQ ?
What I want to do, is to open a chat window for each of the members in the list control... In the ICQ it's done by double-clicking on the user-name in the list control. but I didn't succses to understand how to do it manually with Windows-massages....
Actually, that question is related not specifically to controlling ICQ, but in general to remote control a treelist control in WINDOWS.
10X !
|
|
|
|
|
I'm not even sure if the user list control is a tree view. The only way to find out how to remote control it is Spy++ or other monitoring software.
You have to monitor all the messages that are sent to the control, find out what parameters they have, how they work, ..., and so you will be able to get a handle to the list control from your application and send messages yourself.
It could take some time, but that is the way I'd prefer.
Don't try it, just do it!
|
|
|
|
|
Hello,
I try to use the following code in the MS-Sample: "Browse".
SendMessage(hwndHTML, DTM_DOCUMENTDISPATCH, 0, (LPARAM) &pDisp);
pDisp->QueryInterface(IID_IPIEHTMLDocument, (void**)&pHTMLDocument);
but I get the Link error:
LNK2001: unresolved external symbol IID_IPIEHTMLDocument
Requirements
Pocket PC: Windows Mobile 2003 and later
Smartphone: Windows Mobile 2003 and later
OS Versions: Windows CE .NET 4.2 and later
Header: htmlctrl.h
Library: htmlctrl.lib <- This wrong - this file doesn't exist. I think it must be htmlview.lib.
I use the following lib files
aygshell.lib
htmlview.lib
gx.lib
webview.lib
I get the Link-Error with C++ 4.0 and with Visual Studio 2005.
What is wrong ?
Thank you for your help.
Thomas
TJ
|
|
|
|
|
I (and a couple of other people I have found out) have asked how to draw lines in RichEditView/RichEditCtrl. So far, no one has been able to answer the question. Anybody got an idea of how to do it?
|
|
|
|
|
Subclass the control using SubclassWindow, then handle the WM_PAINT message and draw your lines there.However you might need to handle some additional messages as well as scrolling, resizing, etc. could be involved.
Hope this helps.
|
|
|
|
|
I am using the RichEditView/Doc architure. I am using it so I can use formating as well as use the EN_LINK messaging. Will this interfer with the message handling in the RichEditCtrl?
|
|
|
|
|
Not if you are going to call DefWindowProc. Actually you will need to call this function because you will want first the RichEdit to display normally and after that make your changes.
|
|
|
|
|
I haven't work with subclasses in this way. Can you point me to info on how to use it? I tried help in Visual Studios but its as clear as mud. Thanks for the help.
|
|
|
|
|
plzz help.
how a can i write a program to copy function (as a whole) from one c++ file to another c++ file ,(appending to its end)
the inputs of the programe shoid be source file name,function name and destination file name.
|
|
|
|
|
iS CopyFile function of any use
|
|
|
|
|
It should not be. He wants to copy part of one file to a second file.
John
|
|
|
|
|
You will most likely need to write a simple parser that can identify the location of the function in the cpp file. You can use tools like yacc, bison. Or, if you know the signature of the function (return type, type and no. of params) just search for a regular expression that will match.
|
|
|
|
|
i did it in the following way and it worked.
but the problem is how to add the file header attached with the
function .this comes befeore the function
eg.
///////////////////////////////////////////////////////////////////////////////
//
// history=...........etc
///////////////////////////////////////////////////////////////////////////////
#include <afxwin.h>
#include<fstream>
#include<conio.h>
#include<stdio.h>
#include <stdlib.h>
#include <string>
#include <iostream>
using namespace std;
void main()
{
CStdioFile csf("E:\\lastfunc\\ii.cpp",CFile::modeRead);
CStdioFile csg("e:\\cc.cpp",CFile::modeNoTruncate|CFile::modeCreate|CFile::modeWrite);
csg.SeekToEnd();
CString str;
while(csf.ReadString(str))
{
if (str.Find("SetupTls",0)>=0)
{
int i=0;
cout<<str.getbuffer(str.getlength());
csg.writestring(str+"\n");
="" do="" {
="" if(csf.readstring(str))
="" if(str.find("{")="">=0)
{
i++;
}
if(str.Find("}")>=0)
{
i--;
}
cout<<cout<<str.getbuffer(str.getlength())<<'\n';
csg.writestring(str+"\n");
="" }
=""
="" }="" while(i="">0);
}
}
csf.Close();
csg.Close();
}
|
|
|
|
|
i would like to know what is the difference between ftp and internet component download service.Difference
Be FaithFull To Your Work.
|
|
|
|
|
FTP = File Transfer Protocol (RFC959)
MSICD = Microsoft Internet Component Download = "system service for downloading and installing software from Web sites on the Internet and intranets" = SOFTWARE!!
Don't try it, just do it!
|
|
|
|
|
i've hav the code to record voice using vc++ code.i dont knw how to go abt saving the file automatically as a part of the same project.can somone help me out?
Nilegna
|
|
|
|