|
Hi,
The following is the code for invoking modeless dialog but the icon is not loaded (picture control)in visual studio 2005.Please help me out.
classdlg dlg1;
dlg1.create(NULL);
dgl1.showwindow(TRUE);
static HICON hIcon (LoadIcon(_Module.get_m_hInst(), MAKEINTRESOURCE(IDR_RESTOREDB)));
SetIcon(hIcon, TRUE); // Set big icon
SetIcon(hIcon, FALSE); // Set small icon
LPCTSTR lpszCaption = _T("Upgrading Database...");
SetWindowText(lpszCaption);*/
CenterWindow(GetParent());
// Set the window as the topmost and always on top.
lpszCall = _T("m_Params.wndMsgCtrl.Attach(GetDlgItemIDC_STATIC_MSG));");
m_Params.wndMsgCtrl.Attach(GetDlgItem(IDC_STATIC_MSG10));
lpszCall = _T("m_Params.wndOKCtrl.Attach(GetDlgItem(IDOK));");
m_Params.wndOKCtrl.Attach(GetDlgItem(IDOK));
lpszCall = _T("m_Params.hWnd = m_hWnd;");
m_Params.hWnd = m_hWnd;
SetWindowPos ( HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE );
|
|
|
|
|
I don't see any code that relates to a picture control.
Does the icon show on the picture control in the resource editor?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
HI ,
During design time itself the dialog is associated with the icon image type.
The dialog is invoked as modeless dialog from different class and the code logic is written in ONinitdialog.How do i handle it.?
Regards,
Anitha
|
|
|
|
|
There's two ways to initially set the control's icon:
1) At design time - set the control's resource text to an icon resource ID
2) At runtime - load an icon and set it to the control, something lke:
BOOL CMyDDialog::OnInitDialog()
{
CDialog::OnInitDialog();
m_PictureStatic.SetIcon(AfxGetApp()->LoadIcon(IDI_MYPICTUREICON));
}
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
But where's code that relates to picture on your code? do you want to load an icon and set it to a control?
|
|
|
|
|
I have a Clistctrl in my dialog with LVS_EX_CHECKBOXES style.While i check/uncheck the check box inside listcrtl i need to handle that event.
Please help me out.
Thanks in Advance
|
|
|
|
|
|
On NM_CLICK i am trapping the selection of checkbock boxes as well as if i select ny item in the list control
Is there any possible way to handle only the check/uncheck event of the checkbox which is inside list control.
i have to uncheck all the items in the check box if more than one is selected and retain the currently selected value.Is there any solution ?
Regards,
Anitha.v
|
|
|
|
|
Whether you select an item, or check its checkbox, that item has been changed. This is the notification that you are receiving. When handling that notification, getting the status of the checkbox is trivial.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
How do I get the X and Y coordinates using VC++ 2005
Thanks
samuel
|
|
|
|
|
handle the WM_MOUSEMOVE message
|
|
|
|
|
Does GetCursorPos helpful?
|
|
|
|
|
hi`
is there any way to get notification from windows when connecting to internet ?
|
|
|
|
|
nitinmx wrote: Subject: help
what a perfect description for describing your problem !
with this, i'm sure people will rush on to help you
|
|
|
|
|
Yep, there is a McAfee API which you could use.
Look for the following function.
bool RegisterForFirstIncomingVirus(LPCALLBAK lpCallFunction);
codito ergo sum
|
|
|
|
|
If you want to retrieves the connected state of connection see InternetGetConnectedStateEx else more explain will be helpful for get answer.;)
|
|
|
|
|
i mean any function like RegisterNotifyConnectIntenet( HWND , DWORD ) `?
pls dont make fun at me readin gthe sample api
|
|
|
|
|
I am trying to put information in an access database file (mdb) with an oledb connection. Everything seems fine but no new information is added to the database at the end.
This is the code I have now:
double Tabel_Panelinfo(String^ item_id, String^ use, String^ type)
{
int dblID = 10;
OleDbConnection^ myOleDbConnection = nullptr;
try
{
OleDbConnectionStringBuilder^ connectionBuilder = gcnew OleDbConnectionStringBuilder();
connectionBuilder->Provider = "Microsoft.Jet.OLEDB.4.0";
connectionBuilder->DataSource = "D:\\Data\\Visual Studio 2005\\Projects\\VertexBDXML-RandekSPL728\\VertexBDXML-RandekSPL728\\Tabel-XML.mdb";
myOleDbConnection = gcnew OleDbConnection(connectionBuilder->ToString());
myOleDbConnection->Open();
OleDbDataAdapter^ DataAdapter = gcnew OleDbDataAdapter("SELECT * FROM tblPanel", myOleDbConnection);
DataAdapter->FillError += gcnew FillErrorEventHandler(MyEventHandler::FillError);
DataAdapter->RowUpdated += gcnew OleDbRowUpdatedEventHandler(MyEventHandler::RowUpdated);
DataSet^ myDataSet = gcnew DataSet();
DataAdapter->MissingSchemaAction = MissingSchemaAction::Add;
DataAdapter->Fill(myDataSet, "tblPanel");
DataRow^ row = myDataSet->Tables["tblPanel"]->NewRow();
if (row != nullptr)
{
row["item_id"] = item_id;
row["use"] = use;
row["type"] = Convert::ToInt16(type);
DataAdapter->Update(myDataSet, "tblPanel");
}
}
catch(Exception^ e)
{
Console::WriteLine(e->Message);
}
finally
{
if ( myOleDbConnection != nullptr )
myOleDbConnection->Close();
}
return dblID;
}
-- modified at 5:47 Friday 24th August, 2007
-- modified at 5:47 Friday 24th August, 2007
Stefan
-- modified at 5:48 Friday 24th August, 2007
|
|
|
|
|
|
I have an application written by Visual C++ 6.0. In this application, I want to get the CPU ID, but I don't know how to do? Please help me!!! I'm in dark!
Thank you very much!
|
|
|
|
|
click here [^]
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
nps_ltv wrote: ...I want to get the CPU ID...
Why? It's not guaranteed to be available.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I have a customized tooltip, derived from CToolTipCtrl. I have to show some contents in it than actual tooltip. So I need different width and height than the default. I could change the size in OnWindowPosChanging.
Everything is going fine except one issue.
Suppose the actual width of the tooltip is 200 pixels by its tooltip text. But my content needs only 100 pixels, so the width is reduced to 100. When the tooltip is happened to be shown near the right side of the screen, it will be shifted to left by the default behaviour. But since the actual size is 200 it will be shifted too much to left.
So do anybody know how to solve this issue?
Thanks in advance...
- NS -
|
|
|
|
|
Hi,
i am working on a project which contains hundreds of files.
as it's a big project, lots of memory is occupied by it and also it leaks much memory.
and some times this creates problem if it's working on a pc where available memory is low.
so i want to find memory leaks in the project.
as its a big project i can't go through all files checking for new and delete.
Is there any solution which can go through the project and give me the exact location where memory is leaked.
|
|
|
|
|
use static analysis tool like pclint, coverity, these are license tool but
and runtime analysis tool like devpartner.
search on google you may get diff tools also.
sdadas
|
|
|
|