|
--------------------------------------------------------------------------------
Can anybody upload or send me (fayegolf@hotmail.com) full working example,
which will create shortcut of DUN entry(.lnk) to it on the desktop.
Thank you!
|
|
|
|
|
|
Does anybody know how to eather insert a button into a RichEditCtrl or get the curser position on the RichEditCtrl?
cheers
Dor
|
|
|
|
|
Hi all,
I added a custom button to Outlook Express toolbar using Windows Hook.
However, my new button keeps showing up 'grayed' eventhough I set it's
state to 'TBSTATE_ENABLED'
before I inseted it to the toolbar. If you know how to set this button to
"enabled" state, please
enlight me with your knowledge. Following are the pieces of code that show
how I added a button to the toolbar.
Thanks.
LRESULT CALLBACK CBTProc(int nCode, WPARAM wParam, LPARAM lParam)
{
HWND hWnd;
TCHAR szClass[BUFSIZE];
if(nCode < 0)
return CallNextHookEx(g_hhHook, nCode, wParam, lParam);
hWnd = (HWND)wParam;
switch(nCode)
{
case HCBT_CREATEWND:
GetClassName(hWnd, szClass, sizeof(szClass) - 1);
if(!strcmp(szClass, "ATH_Note"))
{
g_bHookInit = FALSE;
g_pfnOutlookExProc =
(WNDPROC) SetWindowLong(hWnd, GWL_WNDPROC, (LONG)OutlookExpressProc);
}
break;
}
return CallNextHookEx(g_hhHook, nCode, wParam, lParam);
}
LRESULT CALLBACK OutlookExpressProc(HWND hwnd, UINT uiMsg, WPARAM wParam,
LPARAM lParam)
{
static int iTimerID = 0;
if (iTimerID == 0)
iTimerID = SetTimer(hwnd, 1, 100, NULL);
switch (uiMsg)
{
case WM_CREATE:
iTimerID = 0;
break;
case WM_TIMER:
KillTimer(hwnd, iTimerID);
if(!g_bHookInit)
{
HWND hwndSizableRebar;
HWND hwndReBarWindow32;
REBARBANDINFO rbBand;
hwndSizableRebar = FindWindowEx(hwnd, NULL, "SizableRebar", NULL);
hwndReBarWindow32 = FindWindowEx(hwndSizableRebar, NULL, "ReBarWindow32",
NULL);
rbBand.cbSize = sizeof(REBARBANDINFO);
rbBand.fMask = RBBIM_CHILD;
SendMessage(hwndReBarWindow32, RB_GETBANDINFO, 2, (LPARAM)&rbBand);
if(rbBand.hwndChild != NULL)
{
TBBUTTON tbButton;
SendMessage(rbBand.hwndChild, TB_GETBUTTON, 0, (LPARAM)&tbButton);
char szBuf[256];
LoadString(g_hInst, IDS_CUSTOMBTN, (LPSTR) &szBuf, strlen(szBuf) - 1);
int iBtnStringID = SendMessage(rbBand.hwndChild, TB_ADDSTRING, (WPARAM)
0, (LPARAM) (LPSTR) szBuf);
tbButton.idCommand = ID_OE_CUSTOMBTN;
tbButton.dwData = 100;
tbButton.iString = iBtnStringID;
tbButton.fsState = TBSTATE_ENABLED;
tbButton.fsStyle = TBSTYLE_AUTOSIZE | TBSTYLE_BUTTON;
SendMessage(rbBand.hwndChild, TB_INSERTBUTTON, 1, (LPARAM)&tbButton);
g_hwndToolbar = rbBand.hwndChild;
g_bHookInit = TRUE;
}
}
break;
}
switch (LOWORD(wParam))
{
case ID_OE_CUSTOMBTN:
MessageBox(NULL, "CUSTOMBTN", "Outlook Express", IDOK);
break;
case ID_OE_SEND:
MessageBox(NULL, "Send", "Outlook Express", IDOK);
break;
default:
break;
}
return CallWindowProc(g_pfnOutlookExProc, hwnd, uiMsg, wParam, lParam);
}
|
|
|
|
|
Firstly, sorry for the subject
We have written a generic data-access layer which we use to execute stored procedures on a MS SQL Server database and return various data-types depending on the method called (recordset, array, integer etc.). This data-access layer is a COM+ object (because we need to call it from ASP) written with Visual Basic.
We are currently looking at doing a re-write to support some new functionality (XML, multiple output parameters and the like), what I would like to know is would there be a significant performance benefit in porting the code to Visual C++ as an ATL COM+ object?
I have made a number of ATL objects before and I am comfortable writing C++ but if the performance benefit isn't going to be measurable then I might as well leave the code in it's current Visual Basic form... Any input would be greatly appreciated.
William D. Bartholomew
|
|
|
|
|
Last time I checked, IDispatch calling (e.g. VB) was about 10.000 times slower (thats four orders of magnitude) than using the vftable. Depending on your app it will help, but in your case I think the SQL server is the bottleneck.
Of course that's no reason to not make it faster.
/Mike
|
|
|
|
|
Your opinion is appreciated. (Global storage, memory files???)
We want to build objects that are loose coupled and fairly easy to test independently. (Object = DLL, OCX, EXE, whatever). The typical amount of data passed between objects is 2 or 3k, but can be as high as 7 or 8 meg. Lastly, all objects are located on the same machine. Currently all objects are built in VC++ but other languages (VB maybe JAVA) will be used in the future.
In our prototype, object_A uses Cfile and Cachive to create a file on disk, then we use PostMessage to inform Object_B of the files name and location. This has worked great for keeping objects loosely coupled and performing independent testing and development.
Speed is not our overriding consideration, but in our release environment it would be desirable to avoid the writing to disk, furthermore the VB people tell me they cann’t read a Carchive format.
Assuming the VB people are correct then we can change our data format that is not a problem. (But not desirable either given the friendly nature of Carchinve.)
My question to you is about globally allocated memory and memory mapped files. First and foremost, if you are aware of a good book on the subject? Secondly, if you are aware of the pros and cons of either choice?
Thank you
LynnPhil@Qwest.net
|
|
|
|
|
My opinion would be to use the memory mapped file. It would required less change to your existing code, you could possibly just replace CFile with CMemFile.
|
|
|
|
|
Hi,
I haven been using GDI plus to convert a series of tifs to JPEG. Does anyone know how I can access the multiple pages that are suported by the TIF format.
Cheers
Richard
|
|
|
|
|
Sorry Fellas, just realised it's straight forward GetFrameCount and selectActiveFrame in the Image object.
|
|
|
|
|
MSVC has started to report this error when I try to save source files. It occurs maybe one time out of three, even if I have only one instance of VC running. Very annoying.
Has anyone else had this problem with VC6/Win2000? Is it a known bug in VC? I found nothing on MSDN. It might be a Win2000 problem, I've never seen it under Win98.
|
|
|
|
|
I see this a few times every day. Yes, i think it is a Win2k issue. It is really annoying. Even worse than source files, it can sometimes happen in the Class Wizard - and i've actually lost entire source files because of this one. I think CW does its work with temp files. When you make a change, CW creates and modifies a temp file, blows away the original file and tries to copy the temp to the original's name. Sometimes, CW will fail to copy the temp file back, after it has killed the original. The only chance of recovery is to find that temp file. Great fun.
-c
Smaller Animals Software, Inc.
|
|
|
|
|
I had a weird problem recently. I was closing VC when it asked me to save a file [this puzzled me no end as I thought I hadnt made any source changes], I clicked yes and forgot abt it till I reopened the project and found that one of my cpp files was now a zero byte file. I doono how or why it happnd. Luckily I had a 2-day oldbackup, so not much damage done.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
I've had the one happen too. Never did figure out how it happened.
Michael
|
|
|
|
|
Are you sure that no other VC is running ?
It happens to me sometimes when VC crash, I need to kill it with the Task Manager.
Stephane
"It is ridiculous to claim that video games influence children.
For instance, if PacMan affected kids born in the eighties, we
should by now have a bunch of teenagers who run around in darkened
rooms eating pills while listening to monotonous electronic music."
|
|
|
|
|
Stephane Routelous wrote:
Are you sure that no other VC is running ?
Yes.
It happens to me sometimes when VC crash, I need to kill it with the Task Manager.
I've had that problem too, but I don't think they are related. I get the error even without a crash.
|
|
|
|
|
Yeah, check task manger and see if you see some orphan vc instances running [they are called vcspawn instances]. This happens some times when your program crashes in debug-run mode and takes vc down with it.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Sometimes I have open Visual Studio three times at one time,..never had this problem although I have Win2k
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Considering MSVC is the app that gave me a dialog
An unnamed file has an invalid path
I'd say it's a problem with MSVC. There are also known issues with MSVC heap management and W2k (read: bugs in MSVC6). The way to fix it was apparently to tweak some key under HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options (I'm still waiting for "Previous Version", "Obsolete Version" and "Next Version").
You might get lucky searching MSDN.
/Mike
|
|
|
|
|
I've had the same problem also. I can have two instances of MSVC with two different projects, one gives me the error, the other does not.
The good news is its fixed in the next version.
|
|
|
|
|
Do you have Norton Antivirus installed? Since I installed Norton 2003 on my XPPro machine, I started getting this error, too.
|
|
|
|
|
Hi guys,
how can i change the font of a specific row in a CListCtrl. If i use the SetFont() Function it changes the font for the whole Ctrl and i just want to change a specific row. Is that possible ???
Best Regards
Sonu
|
|
|
|
|
I think it's not a straightforward step.
You need to use the LVS_OWNERDRAWFIXED flag.
And do your own painting or drawing or whatever!
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Hi,
I've seen that in the MSDN :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_cobject_class.3a_.accessing_run.2d.time_class_information.asp
void SomeFunction(void)
{
CObject* pMyObject = new CPerson;
if(pMyObject->IsKindOf( RUNTIME_CLASS( CPerson ) ) )
{
//if IsKindOf is true, then cast is all right
CPerson* pmyPerson = (CPerson*) pMyObject ;
...
delete pmyPerson;
}
...
delete [MyObject];
}
What are they doing here ?
I'm confused !
why delete pmyPerson here ?
What is this delete [MyObject] ?
Is that pseudo-code or what ?
Stephane
"It is ridiculous to claim that video games influence children.
For instance, if PacMan affected kids born in the eighties, we
should by now have a bunch of teenagers who run around in darkened
rooms eating pills while listening to monotonous electronic music."
|
|
|
|
|
Well.
This is my guess.
If you don't delete pmyPerson in that if() block, then maybe you should delete pMyObject. Perhaps that's what they meant.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|