|
Actually, scratch my other post (except the part about checking the computer's code...the && logic is still incorrect). Just add one line at the specified position as shown:
userChoice -= '0';
if ( userChoice>=4 || userChoice<=-1)
{
cout << "Invalid Input. \n";
return -2;
}
Bob Ciora
|
|
|
|
|
Can not debug from ASP.NET (local) ...
- a usual COM component.
i.e. web-service called, debugged,
but not enters to native code of COM component.
why so?
How to resolve ?
Thanks
I set option Remote Debugging by DCOM,
but studio falls
|
|
|
|
|
I use a CToolBar control in a dialog to load a bitmap as a group buttons.
And if I use the dialog as main dialog (pop up dialog), the toolbar can work normally,
but question is: if a use the dialog as a child window (WS_CHILD), created by a parent dialog.
then the toolbar can't be used.
I find the way to update dialog UI, but it can't work.
So I think some messages to the dialog filtered by its parent window. But I can't find them, and get a solution:confused:.
If you can solve the problem:laugh:, or give me some tips:zzz:! Thannks Very Much!
skybird
|
|
|
|
|
I have big problem:
when I use CToolBarCtrl. I load a bitmap as a toolbar, and set button size as size (16, 15). At the beginning, the program run normally, but sometimes, the toolbar's button change bigger,
I don't know why.
The details link is:
http://www.codeproject.com/miscctrl/PropEditor.asp
Maybe if you are a guru:cool:, or want have a try:^). Help me! Thank you very much!;P
skybird
|
|
|
|
|
hello
i would like to load a bitmap and get pixels values to put in an array. my source code is
int main()<br />
{<br />
Cximage image;
image.load("C:\\monimage.bmp", CXIMAGE_FORMAT_BMP);
if (!image.Isvalid)
{ cout<<"probleme lors du chargement"<<endl;}
return 0;<br />
}
somebody can help me?
what librairies can i use?
thanks
|
|
|
|
|
hello,
i want to add a password to a .exe file,when run the .exe file ,popup a dialog and ask the password first,if password is right then run the true .exe file,how can i do it?
|
|
|
|
|
I think there is a easy way to do that. At the beginning of you code, you can add the code to
show the password dialog, if password true, run continuously, if not exit.
skybird
|
|
|
|
|
Depends on how secure you want it. This method can be bypassed in less than ten five minutes
modified 12-Sep-18 21:01pm.
|
|
|
|
|
hello,
i do not know what is your meaning,do you meaning to insert the code to the PE file of the .exe file?if it,how to add the code to the .exe file?
thanks.
|
|
|
|
|
|
Hello,
Is there a way to "edit" the contents of this list. What I want, is to remove some duplicated items. (read below)
I have set the Visual Studio IDE to remember the 10 last solutions I have opened. (which saves me a lot of time in navigating to them:-> ) <font color green>[Tools->Options, Environment, General: Display [ ] items in most recently used lists]</font>
The problem arises if I open a 'copy' of a solution just to compare some stuff, and I will get a duplicated solution name, and I need to be careful not to open the incorrect one.
Any hint?
-- Ricky Marek (AKA: rbid)
-- "Things are only impossible until they are not" --- Jean-Luc Picard
My articles
|
|
|
|
|
for VS2002 the list is stored in the registry under HKCU\Software\Microsoft\VisualStudio\7.0\ProjectMRUList. I would assume VS2003 would be the same.
"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! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Thanks,
The key for VC 7.1 is HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\ProjectMRUList
Now, the list is organized as follows:
<font color=black><br />
<ul><br />
Key Value<br />
File1 Path to first sln file<br />
File2 Path to second sln file<br />
File3 Path to third sln file.<br />
...<br />
FileN Path to N'th sln file.<br />
</ul><br />
</font>
Is it possible to delete a pair without renaming the following keys?
(delete key "File2" but preserve the rest, is renumbering required?)
-- Ricky Marek (AKA: rbid)
-- "Things are only impossible until they are not" --- Jean-Luc Picard
My articles
|
|
|
|
|
rbid wrote:
Is it possible to delete a pair without renaming the following keys?
I just tried, and the result is that VC will truncate the list at the first
empty place, that is, if you delete item3, (File3 key), the start page will only
show the first two items.
-- Ricky Marek (AKA: rbid)
-- "Things are only impossible until they are not" --- Jean-Luc Picard
My articles
|
|
|
|
|
This is really bugging me... I can remember coming across an API several months ago that is like MessageBox() but it also puts a "don't show me this again" checkbox in the dialog, and automagically maintains a registry entry that holds the checkbox state. Now that I want to use this function, I can't find it. I thought it was a SHXxx or ShellXxx one (maybe one of the settlement APIs) but I've had no luck. Anyone know what I'm talking about here?
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
|
|
Michael Dunn wrote:
No, it was an API, not an article.
Are you sure? Memory can be a tricky thing.
http://www.codeproject.com/dialog/xmessagebox.asp[^]
If you are correct that there is a windows API that does this be sure to let us know what it is when you find it.
"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! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
I would like to know as well, because, like PJ, I am pretty sure there is NOT one available.
|
|
|
|
|
|
Hello everyone.
I use the grid control(DBGrid) in my program and link it to a remote data control(RDC), through which a data source is connected to my program.
I have read two examples on the RDC downloaded from the networks. And I do not understand the useage of the member function SetCursorDriver().
If you can help me please reply my message, thank you.
The sea is so big and my boat is so small.
|
|
|
|
|
We are working on web-narrator(reader) for hindi in that
we have prepared internet browser using Chtmlview class in mfc on which we are having button "PLAY" . problem is when i press it application starts playing the text(using TTS) but overall control of browser do not remains active it hangs up . i thing it is because of following code in play function spetially the loop of status checking
void CDirectSound::Play(DWORD dwStartPosition, BOOL bLoop)
{
if( ! IsValid() || ! IsEnabled() )
return; // no chance to play the sound ...
if( dwStartPosition > m_dwTheSound )
dwStartPosition = m_dwTheSound;
m_pDsb->SetCurrentPosition(dwStartPosition);
/*m_pDsb is member of CDirectSoundBuffer*/
if( DSERR_BUFFERLOST == m_pDsb->Play(0, 0, bLoop ? DSBPLAY_LOOPING : 0) ) {
// another application had stolen our buffer
// Note that a "Restore()" is not enough, because
// the sound data is invalid after Restore().
SetSoundData(m_pTheSound, m_dwTheSound);
// Try playing again
m_pDsb->Play(0, 0, bLoop ? DSBPLAY_LOOPING : 0);
//m_pDsb->GetStatus
}
LPDWORD lpdwStatus;
unsigned long ulStatus;
lpdwStatus=&ulStatus;
m_pDsb->GetStatus(lpdwStatus);
while(ulStatus!=0)
{
m_pDsb->GetStatus(lpdwStatus);
}
}
please if you get solution for the above problem do reply soon
|
|
|
|
|
Are you sure that 0 is the value you're looking for to terminate the loop? It could be that your logic is flawed. Checking the DirectSound documentation, IDirectSoundBuffer::GetStatus returns a combination of one or more of the following values:
DSBSTATUS_BUFFERLOST - The buffer is lost and must be restored before it can
be played or locked.
DSBSTATUS_LOOPING - The buffer is being looped. If this value is not set, the
buffer will stop when it reaches the end of the sound data. This value is
returned only in combination with DSBSTATUS_PLAYING.
DSBSTATUS_PLAYING - The buffer is playing. If this value is not set, the
buffer is stopped.
DSBSTATUS_LOCSOFTWARE - The buffer is playing in software. Set only for
buffers created with the DSBCAPS_LOCDEFER flag.
DSBSTATUS_LOCHARDWARE - The buffer is playing in hardware. Set only for
buffers created with the DSBCAPS_LOCDEFER flag.
DSBSTATUS_TERMINATED - The buffer was prematurely terminated by the voice
manager and is not playing. Set only for buffers created with the
DSBCAPS_LOCDEFER flag.
I'm not sure what values your own version of GetStatus returns,
but you may want to check for errors that may have terminated the playback. If some error occurs, can your own GetStatus *ever* return 0?
Just firing off some ideas...
Bob Ciora
|
|
|
|
|
I have an equation (abs(.223 - .323) / .223) *100 that isn't working - as I've researched the abs function it appears to only accept integer values? How do I get it to accept double or float values?
Thanks!
|
|
|
|
|