|
b-rad311 wrote: No error messages or anything. You briefly get the hour glass and then nothing.
make sure they have a matching run-time release for VS2008. A run-time that is older than yours will offer no error message, only exit. get the latest runtime for your other machines and hopefully all will be well.
_________________________
John Andrew Holmes "It is well to remember that the entire universe, with one trifling exception, is composed of others."
Shhhhh.... I am not really here. I am a figment of your imagination.... I am still in my cave so this must be an illusion....
|
|
|
|
|
Hi, I have an application that I am skinning. The trouble is that it has toolbars that are docked side by side (the side by side article helped with that). The trouble is that there is a divider placed between them. That divider is unfortunately a system color, and I want to either remove it or change that color (cant change system color).
I can't seem to figure out who is drawing that divider to intercept and cause my own cusomtized behavior. Custom drawing of a toolbar doesnt via notifications doesnt seem to cover that divider.
Any help appreciated, thanks in advance.
|
|
|
|
|
Are you talking about the "grippers" to let user drag toolbars around ?
The style CBRS_GRIPPER can be enable/disabled when creating the toolbars.
Watched code never compiles.
|
|
|
|
|
No. I have already removed the grippers. There is a vertical line drawn on either side of a toolbar. It unfortunately is the same as button face color, so most would not notice it except in my skinning, I don't use that color. I wish i could attach a picture...
|
|
|
|
|
struct foo
{
int i;
};
foo f = {0};
|
|
|
|
|
what about initialize the struct ?
Watched code never compiles.
|
|
|
|
|
ant-damage wrote: foo f = {0}; // <- What does this mean?
creating an instance of structure foo(in the name of "f") with i's value zero.
--
"Programming is an art that fights back!"
|
|
|
|
|
And if we have
struct point
{
float x;
float y;
float z;
};
struct face
{
point a;
point b;
point c;
};
face f = {0};
|
|
|
|
|
ant-damage wrote: struct face{ point a; point b; point c;};face f = {0}; // <- This will initialize to zero the struct, and its elements?
Yes, (I guess point is of type similar to CPoint containing x & y), above code will initialize x & y values of a, b & c to zeroes.
--
"Programming is an art that fights back!"
|
|
|
|
|
That is exactly what I wanted to know. Thanks.
|
|
|
|
|
You are welcome!!
BTW: You can have constructors for initializing structures.
--
"Programming is an art that fights back!"
|
|
|
|
|
In Visual Studio this will initialize the structure to all zeros similar to ZeroMemory(&f, sizof(struct foo));
|
|
|
|
|
... the code of ... = {0}; may be much faster
(than the code of ZeroMemory(..) )
virtual void BeHappy() = 0;
|
|
|
|
|
My project uses statically linked MFC (using VS 2005), and whenever MFC displays a message box (usually due to a DDV_* call), it is empty. Is there a way to fix this (except for not linking MFC statically, which is right now not an option)?
|
|
|
|
|
I want to create combobox having my own bitmap button arrow image and draw color on every item and also want to draw the border for combobox.
I am thinking to do with OWNERDRAW but I am not getting, can you please suggest any idea to do so.
Thanks
|
|
|
|
|
Did you set the style of ComboBox as CBS_OWNERDRAWVARIABLE?
|
|
|
|
|
Try To create a clase Derived from the BAse CComboBox Class and define ur own objects into ur new Class
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
|
I have a CTreeCtrl variable in CMainFrame class of a MDI application.
I have a sizing side bar for the mainframe.The side bar contains a TreeCtrl.
whenever user double clicks on that tree control I want to handle a task.
Now I want to add NM_DBLCLK message to CMainframe class.
How to do this?
If it is a dialog variable we can add this message from class wizard.
How to add NM_DBLCLK message from the class variable?
|
|
|
|
|
The classwizard is useful, but very limited.
You're going to have to add it by hand.
If you like, look at the code that classwizard adds to a dialog class - then do the same thing to your CMainFrame class. I'm deliberately not showing you the code - just spend two minutes making a plain dialog application with AppWizard.
That said, if you're struggling to work without classwizard, I'm a little surprised you have a tree control directly as a MainFrame child. I'd double check that things are where you expect them to be.
Good luck,
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
ON_NOTIFY(NM_DBLCLK, IDC_YOUR_TREE, OnNMDblclkYourTree)
|
|
|
|
|
Ok thank you.
Any have i have solved this problem long back.
|
|
|
|
|
hi Experts,
I m developing an Application which handles a Database with Unicode values.
I have Done all the Settings to run the Unicode Program
1. Added "_UNICODE" in Preprocessor Directives and removes "_MBCS"
2. Entrypoint in Link tab as "wWinMainCRTStartup"
I have write following code to search Records of given Unicode value.
It runs fine but could not give any Records/Result back.
It just out of While loop.
Please Help me out..My code is as follows. :-
<code>
CDatabase cn;
CString FieldValue1,FieldValue2,FieldValue3;
CDBVariant varvalue;
CString csPwd,csUser,csServer,csDBName;
csPwd = "SQLServer2005";
csUser = "sa";
csDBName = "DeccanCollege";
csServer = "DECCANSERVER";
cn.OpenEx(_T("DRIVER={SQL Server};Pwd="+csPwd+";Uid="+csUser +";Database="+csDBName+";Server="+csServer),CDatabase::noOdbcDialog);
TCHAR *m_Voc = (TCHAR*) malloc(50);
m_VocEdit.GetWindowText(m_Voc,50);
CString sqlStr = _T("Select * from Vocablemaster where slvid in(Select slvid from slipvocmaster where binno between 165 and 169) and (VocDescSan like N'%"+CString(m_Voc)+"%')");
CRecordset rec(&cn);
rec.Open(CRecordset::forwardOnly,sqlStr,CRecordset::none);
while(!rec.IsEOF())
{
rec.GetFieldValue((short)0,FieldValue1);
rec.GetFieldValue((short)1,FieldValue2);
rec.GetFieldValue((short)2,FieldValue3);
rec.MoveNext();
}
</code>
I have tried it by another way also by ADODB..
Its code is as follows :-
<code>
HRESULT hr;
CoInitialize(NULL);
try
{
ADODB::_ConnectionPtr connection;
hr = connection.CreateInstance(__uuidof(ADODB::Connection));
if (FAILED(hr))
{
throw _com_error(hr);
}
ADODB::_RecordsetPtr recordset;
hr = recordset.CreateInstance(__uuidof(ADODB::Recordset));
if (FAILED(hr))
{
throw _com_error(hr);
}
connection->CursorLocation = ADODB::adUseClient;
connection->Open(L"Provider=sqloledb;Data Source=DECCANSERVER;"
L"Initial Catalog=DeccanCollege;User Id=sa;Password=SQLServer2005;", L"",
L"", ADODB::adConnectUnspecified);
TCHAR *m_Voc = (TCHAR*) malloc(50);
m_VocEdit.GetWindowText(m_Voc,50);
_variant_t varVoc = m_Voc;
recordset->Open(L"SELECT * from VocableMaster where VocNo like N'%"+_bstr_t(varVoc.bstrVal)+"%'", connection.GetInterfacePtr(),
ADODB::adOpenForwardOnly, ADODB::adLockReadOnly, ADODB::adCmdText);
while(!recordset->ADOEOF)
{
_variant_t var;
var = recordset->Fields->GetItem(L"VocDescSan")->GetValue();
std::cout << static_cast<char *>(_bstr_t(var.bstrVal))
<< std::endl;
recordset->MoveNext();
};
recordset->Close();
}
catch(_com_error &e)
{
std::cerr << static_cast<char *>(e.Description());
}
catch(...)
{
std::cerr << "Unhandled Exception";
};
</code>
Please help me out....
Thnks in advance...
Its urgent for Me..
How can I send Unicode Values through SQL Query and Get the Records..
Is there any another way or any Settings I have to do???
I have never failed,I just found 1000 ways that never works.
Regards,
Victory.
|
|
|
|
|
Dear Friends,
Actually i want to retrieve value of a Input attribute 'id' from the source page [Right click on a Webpage->Select 'View Source'].For example - 'id' of PasswordBox . Right now i able to retieve the values of attributes like- 'type','name','image' by using IID_IHTMLInputElement ->get_type/get_name..... But i unable to retieve value of 'id'.
I'm using VC++ .Please any one help me out in this regard soon
Thankx
|
|
|
|
|
You can use IHTMLElement::getAttribute .
|
|
|
|