|
how would that get called? ive never used cmdui and my program is dialog based
|
|
|
|
|
I have a program that resizes all my controls including the status bar but it doesnt resize the panes inside is there a way to do this?
|
|
|
|
|
Hi,
see the following code
<br />
m_wndStatusBar.GetPaneInfo(1, ID, Style, width);<br />
Style = SBPS_NORMAL;<br />
width = 500;<br />
m_wndStatusBar.SetPaneInfo(1, 0, Style, width);<br />
In this example you get the style and width of the second pane, change the attributes and set the new attributes.
If you use the index, you don't need the ID.
Regards
Frank
|
|
|
|
|
yeah i treid that it actualy cuases the program to crash
|
|
|
|
|
crash? .. ok
now we need some more information:
- which function crashes and possible at which position internally
- the exception message
- if possible the error code (e.g. DWORD GetLastError() ), maybe use a try-catch(...)-block.
Regards
|
|
|
|
|
I'm trying to work with the mciSendString, but it's new to me. I've not seen it mentioned in any of the books I have. What's it used for?
Tanks!!!!!
Dave
"The man who reads nothing is better educated than the man who reads nothing but newspapers."- Thomas Jefferson
|
|
|
|
|
Platform SDK: Windows Multimedia
MCI
The Media Control Interface (MCI) provides standard commands for playing multimedia devices and recording multimedia resource files. These commands are a generic interface to nearly every kind of multimedia device.
The mciSendString function sends a command string to an MCI device. The device that the command is sent to is specified in the command string.
Example in Platform SDK Doc:
DWORD PlayFromTo(LPSTR lpstrAlias, DWORD dwFrom, DWORD dwTo)
{
char achCommandBuff[128];
wsprintf(achCommandBuff, "play %s from %u to %u",
lpstrAlias, dwFrom, dwTo);
return mciSendString(achCommandBuff, NULL, 0, NULL);
}
BuggyMax
|
|
|
|
|
Thanks Max
"The man who reads nothing is better educated than the man who reads nothing but newspapers."- Thomas Jefferson
|
|
|
|
|
Hello Prof,
I read you project & injoy it.
I'm Searching V.C project about below topic,If you have one it Please as soon as possible send to me.
1.Design Virus
2.Intrusion Detection System
3.desing User password Detector
4.Simple Firewall
5.Dictionary attack on password files
6.Design password detection in SSL
Thanks
|
|
|
|
|
Hello Prof,
I read you project & injoy it.
I'm Searching V.C project about below topic,If you have one it Please as soon as possible send to me.
1.Design Virus
2.Intrusion Detection System
3.desing User password Detector
4.Simple Firewall
5.Dictionary attack on password files
6.Design password detection in SSL
Thanks
|
|
|
|
|
|
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Michael Dunn wrote:
Try this programming help site
John would be so proud
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
lol, you own
Don't try it, just do it!
|
|
|
|
|
|
DaveE9th wrote:
I'm trying to open a file from a console program. How do I do this?
Are you using the C libraries, STL, MFC or Win32? You need to be more specific in the question.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
i have a couple of bmp images. each image is 24*32 unit and all the images make up a stripe. The stripe image's ID is "IDB_ADDRESS". Now i want to use a
CImagelist to manage these images. i codes like this:
m_ImagList.Create(IDB_ADDRESS,24,1,RGB(0,0,0));
IMAGEINFO m_sImageInfo;
m_ImagList.GetImageInfo(2,&m_sImageInfo); // i want to get the no.3 image
m_BtImage1.SetBitmap(m_sImageInfo.hbmImage); // i want to set the no.3 on the
//button
the m_BtImage1 is a CButton control object which has been set the "BS_BITMAP"
But there is nothing on the button,why?
|
|
|
|
|
I'm trying to use VC++ to connect to MySQL. To do this, I have use MFC to do it. Initially it was easy when i was using the form that they have created for me. But when I insert my own form/dialog, I can't seems to see the database field for me to map it. Any idea why is it so?
Also is it better for me to use ATL MyOLEDB??
Noelle
|
|
|
|
|
More info please... Are you using ODBC, ADO, DAO???
John
|
|
|
|
|
At the moment i'm using MyODBC to connect to my database in MySQL.
|
|
|
|
|
|
My MFC app is using comboboxes with the CBS_DROPDOWN style (i.e. edit control + drop list). The combos are defined in a dialog template. I want to be able to switch these to CBS_DROPDOWNLIST style (i.e. static control + drop list).
My difficulty is that I need to change the style AFTER the comboboxes have been created.
(How) can this be done?
Andrew
|
|
|
|
|
m_pComboBox.ModifyStyle(...)
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Hi Eugene,
I just tried your suggestion, but it doesn't work.
My combobox is derived from CComboBox, I have a member function to do the switch
void CMyComboBox::MakeStatic()<br />
{<br />
VERIFY(ModifyStyle(CBS_DROPDOWN, CBS_DROPDOWNLIST));<br />
}
I call MakeStatic() after the combo has been created, but immediately before I load the combo. The ModifyStyle() call returns TRUE - the VERIFY doesn't generate an error. I also tried ModifyStyleEx(), just in case, but it doesn't work either
|
|
|
|
|
Andrew Allen wrote:
I just tried your suggestion, but it doesn't work.
My combobox is derived from CComboBox, I have a member function to do the switch
void CMyComboBox::MakeStatic()
{
VERIFY(ModifyStyle(CBS_DROPDOWN, CBS_DROPDOWNLIST));
}
I've had this problem myself. What I did was create TWO combobox controls, one a dropdown and the other a dropdown list, and placed them right on top of each other. I used some other control to determine the state I wanted the "combo" in, and showed/hid the appropriate one.
Actually, I had this problem with CListBox. You can't change its selection style at runtime, either.
|
|
|
|