|
hi,
i am working on buttons.
could any one explain the mechanism behind the shortcut key for button and its functionality.
i have to use more than 1 button.
hence shortcut key plays an important role.
thanks,
RNarayan
|
|
|
|
|
If this is on a dialog box, it's simple. Loosely, the dialog box message handler grabs keypresses that have the Alt key down also. (eg, Alt-Q). Then it looks in the tab order for a control with that letter in it's text, preceded by an & character. If the control is (eg) a static control, and can't take the keyboard focus, the next control along gets it.
It is a bit more complex when you start mixing in the WS_GROUP style (for radio boxes etc), and && doesn't work...
Try using the resource editor, make a fake dialog, and play for a while.
Iain.
|
|
|
|
|
How to know if a software is installed in the system.
Other than verifying registry entries HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders and HKEY_CURRENT_USER\Software ,is there any other ideal way to find it.
For ex: I want to check if Visual Studio is installed or not. If installed i want to get it's details such as version etc.
modified on Wednesday, October 22, 2008 4:13 AM
|
|
|
|
|
What kind of software? Your software?
|
|
|
|
|
For ex: I want to check if Visual Studio is installed or not. If installed i want to get it's details such as version etc.
|
|
|
|
|
divilin thiyagaraj wrote: For ex: I want to check if Visual Studio is installed or not.
For VS6, you could look for the presence of HKCR\Interface\{96961260-A819-11CF-AD07-00A0C9034965} in the registry.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
it's not that i want to know onlly about VS6........ i want to get all the list of softwares
|
|
|
|
|
|
divilin thiyagaraj wrote: i want to get all the list of softwares
That's impossible since there is no standard way of installing software. For those that used some sort of installer, look in the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall registry key.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I'm trying to recreate a VB program using C++. the link is a screen shot of what I want the program to look like.
http://img98.imageshack.us/img98/6656/guidesigncopysr7.png
I've created an application using the MFC SDI wizards, so I've got the desired menu, toolbar, status bar etc.
Now I want to create the black boxes with the green lines (001 to 016)(they are meant to indicate periods of high and low status)
I have no clue how to start, been doing lots of research, but so far I've only managed to come up with painting in the docview section, but I think that is the wrong approach as these lines would change when the user edits them. I'm thinking I need not a blank white doc/view to work on but more like a form/dialog thing but still keep the menu and toolbar etc. Sorry if I'm unclear, c++/mfc is still fairly new to me.
could someone point me in the right direction
|
|
|
|
|
I think the best approach would be to use a FormView as you said. You have the option to select that in the creation wizard: in the last step (generated classes) you can specify the base class of your view class, select CFormView there.
You will then be able to put controls on the form. There's a section on CP where you can find several charting controls. You can take a look at my signature, I've developped one myself but I'm not sure it is exactly what you are looking for (there are axis and things like that).
|
|
|
|
|
I got a problem when using ffmpeg library.
Hope anybody could do me this favor!
that is :
pavcodec_register_all();
avc = pavcodec_find_decoder(CODEC_ID_WMV3);
if (avc == NULL)
{
MessageBox(NULL, "CODEC_ID_WMV3 decoder Not Found !", NULL, MB_OK);
FreeLibrary(hMod);
return FALSE;
}
avctx = (AVCodecContext *)pavcodec_alloc_content();
if (avctx == NULL)
{
FreeLibrary(hMod);
return FALSE;
}
avctx->extradata = (uint8_t *)malloc(dataSize);
avctx->extradata_size = dataSize;
iRet = pavcodec_open(avctx, avc)
if (iRet != 0)
{
iRet = (int)GetLastError();
FreeLibrary(hMod);
return FALSE;
}
I can't figure out the reason for that fail...
if anybody know why and the correct way to do with that ,please do me this favor! Thanks!!!
|
|
|
|
|
I dont know what the problem is but you can read the documentation to resolve your problem
FFMPEG[^]. There are forum links provided for
FFMPEG Windows Help[^]. That might be a better place to ask questions related to FFMPEG.
I hope it helps.
Regards,
Sandip.
|
|
|
|
|
It seems that you're trying to decode a file. I think the problem is that you allocate initialize your AVCodecContext* instead of loading the file and then getting a pointer to the stream context.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Is this method is the only way to initialize the AVCodecContext structure for decoder ?
If I am trying to decode a real time data stream, is there any other method to initialize that??
|
|
|
|
|
I have no idea how to decode a real time data stream, but here's how you get the AVCodecContext for a normal video file from the hard disk.
int err, ret;
AVFormatContext* ic;
err = av_open_input_file(&ic, InputFile, NULL, 0, NULL);
ret = av_find_stream_info(ic);
for(int i=0;i<(int)ic->nb_streams;i++)
{
AVCodecContext *enc = ic->streams[i]->codec;
if (enc->codec_type == CODEC_TYPE_VIDEO)
{
}
}
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Thanks for your reply, it shows me some useful information, I need more trying on this, but I think maybe I need some more example for this .
Can you show me some demo projects ? Maybe that will be more helpful for me, cause I am just a beginner.
Thanks a lot for all your help.
|
|
|
|
|
Hi,
I have no demo projects, but may be you should ask your questions in the official mailing list at https://lists.mplayerhq.hu/mailman/listinfo/libav-user/[^], you might get more help there. For demos, you can also see output_example.c and ffmpeg.c from the SVN sources.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
|
Which one is your question? You asked or implied about 10.
If you're really new to C++, then you really need to get some more simple programming under your belt before trying to do all of that.
Break it into individual steps, and solve those steps.
> im trying to create a simple program that verifies username and password
Well, you'll want to make a modal dialog (CDialog::DoModal) with a couple of edit boxes - one of which can have the ES_PASSWORD style. Then when the user presses OK, validate their entry somehow. If your database has a user name / login system, let the database do the validation.
And so on.
Iain.
ps, Please also use capitals and punctuation - it makes your message a LOT easier to read, and we're not a mobile phone.
|
|
|
|
|
I am trying to send a file to the server but the code is giving the following error:
Error on InternetWriteFile 12031
Please help me with this problem
Thanks In Advance
modified on Wednesday, October 22, 2008 2:10 AM
|
|
|
|
|
Hi All
I have a text file "New.txt".which have some data like this
ab
ac
ad
ab
ad
ac
Now i want to remove duplicate string(ab,ac and ad) from file.Can any one give me tips.
Plz help me
|
|
|
|
|
Use linked lists, either from the STL or of your own making.
Open File, read each line into a new list item.
Go through the list, remove any list items that match the current item.
Save the list items one-by-one back into a new file.
Or
Open file, read file line by line - doing nothing other than counting the number of lines.
Create an array with this many pointers to a string
Reset file pointer
For each line in file:
read line,
determine length,
allocate mem and store pointer in lineArray[currentLine],
copy string to this memory.
For each item in the lineArray
do a strcmp on all items that follow
if the strings match, free the memory of the matching line, and set it's pointer to NULL
For each item in the line Array
if the pointer isn't NULL, it contains a unique string.
If the pointer is NULL, the string wasn't unique and has been removed.
either print or save to file all of the valid strings remaining in the array
For each item in the array
free the used memory (free won't fail on a NULL pointer)
|
|
|
|
|
You can use a std::set for that. Read each line and insert it into your set. If the value is already present in the set, it won't be added a second time.
|
|
|
|
|
That sounds good, but could you extract the entries in the order [*] they were put in? He didn't say whether he cares or not, but I would - minimum changes needed to meet the spec, etc.
Iain.
[*] Genuine question. Not an expert on the std::collections.
|
|
|
|