|
oh, that's right! I didn't notice that, probaly after a busy day . Thanks alot for your help Alex and Joan.
Best Regard
|
|
|
|
|
I have Create a Flat tab control Lets say CFTabCtrl , Basically a Class derived from CWnd. I have also implemented Drag drop of these tabs now here is the problem,
When My MFC app has got the complete source of this CFTabCtrl, that is this class is compiled with the project, it works fine.( i m refering to COleDataSource::DoDragDrop())
On the second hand I have created another project And Created a Lib file for this CFTabCtrl, and now in my MFC app I am using this CFTabCtrl by including the lib file and ofcourse the header file of the class. Now the whole code is working fine except for that this COleDataSource::DoDragDrop() returns DROPEFFECT_NONE immdiately ..
does any one have any clue what must have went wrong ?
Abhishek Narula
"Learn to appreciate others ... World would appreciate you"
|
|
|
|
|
Hey everyone,
I am working on an application that I would like to show up on the Windows Explorer context menu. I would like it to be like WinZip, where I add a menu item, then when you click on it, it sends the files to my application file list. I assume that I have to use the Shell API, but I didn't see any articles about this. I did see some on how to add Explorer's context menu to your own file list, but nothing to go the other way. Has anyone done this before and, if so, can you point me in the right direction?
Thanks...
Brigg Thorp
Software Engineer
Timex Corporation
|
|
|
|
|
check this:
http://www.codeproject.com/shell/shellextguide1.asp
Best Regards
Sonu
|
|
|
|
|
I have a list control in adialog box and I want to fill one column of it with a CStringList.This is the function that I use to fill list control.
int CSHowFileDlg::FillListCtrl(CStringList * filelist)
{
LV_COLUMN listColumn;
LV_ITEM listItem;
listColumn.mask = LVCF_FMT|LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM;
listColumn.fmt = LVCFMT_LEFT;
listColumn.cx = 120;
listColumn.iSubItem = 1;
listColumn.pszText = "File Name";
m_listCtrl.InsertColumn( 1, &listColumn );
listItem.mask = LVIF_TEXT ;
listItem.iSubItem = 1;
POSITION pos = filelist->GetHeadPosition();
for(short i = 0 ; i < filelist->GetCount() ; i++ )
{
listItem.iItem = i;
listItem.pszText = (LPSTR)(filelist->GetAt((pos++))).GetString();
m_listCtrl.InsertItem( &listItem );
}
return 0;
}
There is no error but it show some of items correctly.Does anybody see anything wrong in this function?
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Simple...I have to change GetAt(pos++) to GetNext(pos)
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
How can I create a Toolbar that docks in Internet Explorer from an activex control that runs in Internet Explorer ?
|
|
|
|
|
Hi,
A simple MessageBox("Some errors") like this one works well.
But when i use the MessageBox(NULL, str, szMsg, MB_OK), there
is complier error. Where is my mistake?
Thanks in advance!
chen
|
|
|
|
|
Your mistake is you're not providing the right argumtns. Check the docs for CWnd::MessageBox .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I guess that the first arg cannot be NULL.
This will work:
MessageBox(strErrorText,strErrorTitle,MB_ICONSTOP|MB_OK);
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
No, the compiler error is due to the four parameters
used in MessageBox. It seems that i must include some
hearder files or Lib?
chen
|
|
|
|
|
Maybe "afxwin.h".
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
If you are calling the message box from inside a CWnd dervied class then you don't need the NULL. It uses the current CWnd object for the parent window.
However you can use the same call by using ::MessageBox(NULL, str, szMsg, MB_OK) which calls the default API version.
Michael
|
|
|
|
|
Hi,
is there an easy solution to add music playback to a demo? I think about playing an OGG (or MP3). It would be great if I can name a file and say start, stop or control volume.... DLL or source code.
|
|
|
|
|
|
For playing MP3 check this:
http://www.codeproject.com/audio/mp3player.asp
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
thx, will have a look on both
|
|
|
|
|
hey guys/gals ,
Actually i am animating the window .when thw window is shown there is some text displayed in it which is not underlined and when the mouse (leave) moves the window i want the text to be underlined.
Actually i am getting the mouse leave event but dont understand why the text is not able to remove the underline part. If any body possibly can help me .
|
|
|
|
|
How are you handling the painting. Does the paint function get called in the mouse leave event?
Posting the portion of the code that is giving you problems would be a great help.
Michael
|
|
|
|
|
What is the delete-function for memory allocated by GlobalAllocPtr?
tnx.
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
Could it be GlobalFreePtr? I don't find any docs about these macros on the msdn (tell something new ).
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
GlobalFreePtr
Note that if you use Win32 there is really no need to use this. The Win32 memory archetecture does not keep a separate global heap. LocalAlloc and GlobalAlloc are the same, and both malloc and new eventually calls a similar function called HeapAlloc.
/moliate
Two o'clock and walking through familiar London - Or what was familiar London before the cursor deleted certain certainties -
I watch a suit and tie man giving suck to the Psion Organizer lodged in his breast pocket
its serial interface like a cool mouth hunting his chest for sustenance, familiar feeling, and I'm watching my breath steam in the air.
Neil Gaiman - Cold Colours
|
|
|
|
|
But is it harmless if you do use it?
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
Yes, but it is only included for Win16 compability. It is a macro for allocating memory and locking the handle, which is not nessicary in Win32. Unlike Win16 memory allocation methods, Win32 methods have very few efficiency differences.
MSDN says that if you decide to use GlobalAllocPtr, GlobalFreePtr should be used to release the memory. This is probably just for backward compability, but better safe than sorry...
Cheers
/moliate
Two o'clock and walking through familiar London - Or what was familiar London before the cursor deleted certain certainties -
I watch a suit and tie man giving suck to the Psion Organizer lodged in his breast pocket
its serial interface like a cool mouth hunting his chest for sustenance, familiar feeling, and I'm watching my breath steam in the air.
Neil Gaiman - Cold Colours
|
|
|
|
|
It's really strange when your application works perfect under debug version, and later when you switch to Release it crashes. Here is how it happens.
1) I use CreateProcess to start a program and wait untill it ends.
CreateProcess of course crashes under Win2k/XP.
2) Then I switch to ShellExecute. Same thing happens.
3) I don't want to use WinExec!
So what's the difference between WinExec/ShellExecute/CreateProcess, and if you can provide some working code with theese functions
Regards,
Deian
|
|
|
|