|
One solution is LVFINDINFO structure and FindItem().
Kuphryn
|
|
|
|
|
i am have a project to finish but facing difficulty like follows:
i am makes a sound recording program but buffer problems for making more that 30 seconds of recording.
help me please in how doing run time buffer increase and increment.
muchas gracias
Hastaluego
|
|
|
|
|
hi everybody,
i have a question regarding to event handler.. is it ok to bind multple menu command to a same function? i made a new menu for popup/context menu and some of the menu command is going to have the same functionaliy of the mainframe menu command. i was thinking of sharing the functions among the menu commands.
e.g.
on_command(id_a, onmyclick);
on_command(id_b, onmyclick);
thx in advance, have a nice weekend.
|
|
|
|
|
Yes, that will work fine.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Even better: Let the two menuitems share the same id. Then you don't have two WM_COMMAND mappings.
--
This space for rent.
|
|
|
|
|
Hi,
In one of my programs, I am using DDE in order to run my program as the default program for some type of files. In my CWinApp class I added BOOL OnDDECommand(LPTSTR lpszCommand).
When I double click on the file, everthing works fine if another instance of the program is not running. Double clicking runs the program and calls OnDDECommand. After that, if I do not close the program and double click on other files, everthing works fine again. The problem occurs when I run the program individually. After that, if I double click on a file, OnDDECommand method is never executed. Instead of that, my program gets the focus and the following error message comes out:
Windows cannot find 'my_file_name'.
Make sure that you have typed the name correctly and then try again.
To search for a file, click the start button, and then click Search.
This message is show by Windows Explorer. Not by my program. I dont know what the problem is. If no instance of the application is running, everthing works fine. Also, if i start the application by double clicking on an associated file evething works fine again. This happens only when I run the program without any files given as parameter and then double click on a file.
I am looking forward to hearing for your suggestions. Please advise...
Thanks for any helps in advance.
Kind regards
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
<nobr>They say I'm lazy but it takes all my time
|
|
|
|
|
i found a flag that lets me work with numbers in hex:
std::cout.unsetf(std::ios::dec);
std::cout.setf(std::ios::hex);
int x = 45;
cout<
|
|
|
|
|
setf and unsetf are members of std::ios_base and work on all streams.
--Mike--
Friday's GoogleFight results: Britney Spears 2,190,000 - Erica Weichers 23
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Is there any tool for displaying the #include file hierarch? Something like Understand C++, but more stable. I'm going to write such tool this weekend, if there isn't any.
Thanks.
|
|
|
|
|
Doxygen will do something like that although it's probably not what you want.
I wrote a little app years ago to generate makefile depenedencies that you could probably hack to do what you want. Email if you want a copy.
he he he. I like it in the kitchen! - Marc Clifton (on taking the heat when being flamed)
Awasu v0.4a[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
I encounter a warning, when i debug a programe.
The warning message is "User breakpoint called from code at 0x77f97704".I donot know the reason.
When this warning message appears, VC shows a screen of assembly code to me.Please tell me the reason to cause this warning .
I love sea
|
|
|
|
|
Is VC stopped at a line that says "int 3"?
You've probably hit an assertion somewhere i.e. done something wrong. Bring up the call stack (ALT-7) and have a look at what was going on at the time. If you press F11 a few times, you might be able to switch back to your original source code as well.
he he he. I like it in the kitchen! - Marc Clifton (on taking the heat when being flamed)
Awasu v0.4a[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Yes you are right. But i donot know what the assembly codes mean.Have you ever encourted this problem?How can i solve this problem.
I love sea
|
|
|
|
|
You don't need to understand the assembly.
INT 3 is how Visual C++ stops the program if an assertion failure happens. If you don't know what that means, look up what the assert() macro does.
What has happened is that some code somewhere has noticed that something has gone wrong and stopped the program for you, where it happened, so that you can do something about it. For example, if you call strlen() like this:
char* p = NULL ;<br />
size_t n = strlen(p) ;
strlen() might be smart enough to detect that you passed in a NULL pointer and assert.
So bring up the call stack as I suggested and you can see exactly where your program was when it stopped. And pressing F11 a few times *might* get out of the assembly code and back to some C source code.
he he he. I like it in the kitchen! - Marc Clifton (on taking the heat when being flamed)
Awasu v0.4a[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Hi.
How do you read, write, and append data to files using Win32 CreateFile? In core C++, we can use write(). CreateFile returns a handle to a file. I thought about mapping the file and then casting the void * that MapViewOfFile() returns to BYTE *, but that seems overkill since all the process does is write to a file.
Thanks,
Kuphryn
|
|
|
|
|
Why do you need to use CreateFile instead of iostreams ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
One reason is access permission such as share.
Kuphryn
|
|
|
|
|
You don't do any of that with CreateFile() itself, that API only opens/creates the file. ReadFile() and WriteFile() to read and write. To append, call SetFilePointer() to move the pointer to the end, then write.
--Mike--
Friday's GoogleFight results: Britney Spears 2,190,000 - Erica Weichers 23
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
|
I have an SDI Application with a splitter as follows
------------------------------------------------------------------
Property Sheet containing a few tabs
------------------------------------------------------------------
Log View
------------------------------------------------------------------
Most of the application activities happen in the upper pane where i have a property sheet containing few tabs that have bunch of controls
All the data is contained in the document class. Every activity is logged in the lower pane which contains a CListView
In the document template i have attached the document with the view used in the upper pane.
I created the panes in CMainFrame as follows.
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
BOOL flag;
if (!Splitter.CreateStatic(this,2,1))
return FALSE;
flag=Splitter.CreateView(0, 0,pContext->m_pNewViewClass,CSize u(90,90), pContext);
if(!flag)
return FALSE;
pContext->m_pNewViewClass= RUNTIME_CLASS(CLoggingView);
flag=Splitter.CreateView(1,0,pContext->m_pNewViewClass,CSize s(10,10),pContext);
return flag;
}
Now i basically need a pointer to the lower pane Log View in my document as document as all the data which is required while logging. The way i am doing it is basically since i know that this is the second view, i am iterating through the two views and getting the keeping the second view as pointer to log view, as shown below. Have feeling this is not the best way of doing this.
bool anotherfFlag = true;
POSITION posi = GetFirstViewPosition();
while (pos != NULL)
{
CView* pView = GetNextView(posi);
if (!anotherfFlag )
m_PointerToLogView = (CLoggingView*)pView;
anotherfFlag = false;
}
Could you please suggest some better way of doing this?
|
|
|
|
|
My question is the program I am working on was developed awhile ago and it will only execute on a machine the has Visual Studio on it. But I have taken the proper steps so that this should not happen. Yet it still does.
Please help.
Matt
|
|
|
|
|
My guess is that you are attempting to distribute a debug version of your application. The debug version is usually dependent on some VS specific libraries, which only are on a machine which VS is installed. That's my first guess.
|
|
|
|
|
Anonymous wrote:
But I have taken the proper steps so that this should not happen. Yet it still does.
I'm not sure how we can help you. If you've 'taken the proper steps' then it will work. Presumably this is not the case, so you should list the steps you've taken, so we can fill the gaps. How does it fail ? What have you done to make it work ? Does it use the C runtime ? MFC ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
If your program uses MFC check to see if you linked MFC statically or if you linked to use the shared DLL. If you linked to use the shared DLL then you need to have those DLL's in the path.
Another thing to look at...Did you use any ActiveX controls, if so, then you need to have those accessible
Gary Kirkham
A working Program is one that has only unobserved bugs
|
|
|
|
|