|
just create and object of that dialog and call DoModal function.
eg:
CMydialog MyDlg;
MyDlg.DoModal();
nave
|
|
|
|
|
But i can't.
because i create the dialog by pointer
CMydialog* MyDlg;
And i use
this->MyDlg->ShowWindow(SW_SHOW);
to show the window...
But it is not modal window...
I want to set it to be model window...
how can i do it?
Thx
|
|
|
|
|
CMydialog* MyDlg = new CMydialog();
MyDlg->DoModal();
What prevent u from calling like this...?
nave
|
|
|
|
|
|
But i can't.
because i create the dialog by pointer
CMydialog* MyDlg;
And i use
this->MyDlg->ShowWindow(SW_SHOW);
to show the window...
But it is not modal window...
I want to set it to be model window...
how can i do it?
Thx
|
|
|
|
|
Did you get your answer with Naveen R answer
|
|
|
|
|
Anybody who is very familiar with WIN CE 4.2 emulator? I 'm using VC++ 6.0, together with embedded VC++ 4 to develope 2 programs, one on the desk top, using VC++6.0, and the other on emulator platform, on the same desktop. These 2 programs are to communicate with each other using sockets. However, there seems to be limitation on the emulator as it prevents such communications.
-- modified at 2:52 Tuesday 15th August, 2006
|
|
|
|
|
Ensure that you have a virtual network adapter enabled. In eVC, go to Tools, Configure Platform Manager, select the emulator from the tree, click Properties, then click Configure next to 'Emulator Startup Server'. From here, select either 'NAT (Outgoing only)' if the emulated CE device has to connect to the PC, or 'VirtualSwitch'. Selecting 'VirtualSwitch' makes the device effectively appear as an additional network card on your machine.
You then may need to configure the network card inside the emulator.
You might need the Virtual Machine Network Driver[^] to make VirtualSwitch work.
|
|
|
|
|
Thank you for the help given!
However, I'd followed your instructions given and my PC program (developed using CSocket, under VC++) still cannot establish connection with my WIN CE program (developed using CSocket, under eVC++) , running within the emulator. Approach taken in the program development is very similar with programs reside on 2 different desktop PC. I've set the port number to be 4000 and host name as the emulator.
|
|
|
|
|
The error I got is WSAEINVAL:10022
|
|
|
|
|
I want to load data from my database in my CListCtrl fast ! How ?
I remind you i want all the data to be loaded like my code if you now how please help me ! I will wait your answer because i don t have any ideea how ( now i wait 3 - > 10 min. to load my data in my CListCtrl )!
this is my code :
void CMyList::FillList()
{
CDataBase22 *pDataBase22 = new CDataBase22();
pDataBase22->Open();
CString sName;
if (pDataBase22->GetRecordCount())
pDataBase22->MoveFirst();
while(!pDataBase22->IsEOF())
{
int nItem = m_list.GetItemCount();
sName.Format("%d",pDataBase22->m_name);
m_list.InsertItem(nItem,sName);
m_list.SetItemText(nItem,0,pDataBase22->m_name);
m_list.SetItemText(nItem,1,pDataBase22->m_city);
pDataBase22->MoveNext();
}
pDataBase22->Close();
}
PLEASE HELP ME !!!!!!!!
Please give me an example !
Bravoone
|
|
|
|
|
I have CDialog base aplication with many CEdit and i want to jump from one CEdit to another with enter key ! You now how ?
And i want when i jump from a particulary CEdit to another to do something lets say : "Hello !" You now How ?
Bravoone
|
|
|
|
|
Flaviu_2006 wrote: i want to jump from one CEdit to another with enter key
overide the PreTranslateMessage message function and put the following code there
eg :
BOOL CMyDlg::PreTranslateMessage(MSG* pMsg) <br />
{<br />
if( WM_KEYDOWN == pMsg->message )<br />
{<br />
if( VK_RETURN == pMsg->wParam )<br />
{<br />
pMsg->wParam = VK_TAB;<br />
}<br />
}<br />
return CDialog::PreTranslateMessage(pMsg);<br />
}
nave
|
|
|
|
|
thanks but i have this problem :
when i jump with enter key and i rich to (lets say : m_edit) i want onchange lets say getwindowtext and setwindowtext to m_edit2 i want to jump forward to m_edit3 when i press enter key ! how ?????
thanks !!!
Bravoone
|
|
|
|
|
when the cursor came into m_edit, u will get the WM_SETFOCUS message. u can do the getwindowtext and setwindowtext from there..
eg:
BOOL CMyDlg::PreTranslateMessage(MSG* pMsg)
{
if( WM_KEYDOWN == pMsg->message )
{
if( VK_RETURN == pMsg->wParam )
{
pMsg->wParam = VK_TAB;
}
}
else if( WM_SETFOCUS == pMsg->message )
{
HWND hWindowHandle = (HWND)pMsg->wParam;
if( hWindowHandle == m_rich.m_hWnd )
{
// do GetWindowText or SetWindowText or what ever u want
}
}
return CDialog::PreTranslateMessage(pMsg);
}
nave
|
|
|
|
|
Is this previous question?
|
|
|
|
|
please someone help me please !
whitesky maybe you now how please tell me !
Bravoone
|
|
|
|
|
if its previous question you get two answers do you check those answers if yes whats happen if no whats question
|
|
|
|
|
yes both questions !!!!!!!!!!!!!!!!!!!!!!!i need answers !!!!!
plese help me with this !!!
Bravoone
|
|
|
|
|
i remember you have a loop but you can use from a thread in your code and you can read your databse in the thread
|
|
|
|
|
no is not work he jump forward to next edit and nothing is hapening !
you no how ?
this is the code :
BOOL CMyList::PreTranslateMessage(MSG* pMsg)
{
if( WM_KEYDOWN == pMsg->message )
{
if( VK_RETURN == pMsg->wParam )
{
pMsg->wParam = VK_TAB;
}
}
else if( WM_SETFOCUS == pMsg->message )
{
HWND hWindowHandle = (HWND)pMsg->wParam;
if( hWindowHandle == m_city.m_hWnd )
{
UpdateData();
CWaitCursor wait; // Display a wait cursor
//---------------------------------HEADER------------------------------------------//
int x = m_list2.GetItemCount();
for (int j = 0; j < x; j++) // For each item in the list
{
CString strWord;
strWord = m_list2.GetItemText(j, 0); // Get the word
strWord.TrimLeft(); // Remove leading spaces
strWord.TrimRight(); // Remove trailing spaces
// Overwrite the old word with the new trimmed word
m_list2.SetItemText(j, 0, strWord);
}
//----------------------------------------------------------------------------------//
CString sName, sCity, sCountry;
m_name.GetWindowText(sName);
m_city.GetWindowText(sCity);
sCountry.Empty();
for(int nItem = 0; nItem < m_list2.GetItemCount(); ++nItem)
{
CString const sFirstColumnText = m_list2.GetItemText( nItem, 0 );
CString const sSecondColumnText = m_list2.GetItemText( nItem, 1 );
if( sName == sFirstColumnText & sCity == sSecondColumnText)
{
sCountry = m_list2.GetItemText( nItem, 2 );
m_rezult.SetWindowText(sCountry);
}
}
}
}
return CDialog::PreTranslateMessage(pMsg);
}
he jump to m_rezult and ...nothig !
Bravoone
|
|
|
|
|
your problem is editbox or read databse?
|
|
|
|
|
i have 2 problems editbox and read database fast (load more fast in my CListCtrl )
Please help !!!!
Bravoone
|
|
|
|
|
remain one problem : (because i get the answer from somewere alse)anyway ... thanks but this is a serious question : how can i load data from my database more fast ? ( i need all the data to be loaded in my CListCtrl at one time...not 10 or 50 data at time when i scroll the list -- >> ALL DATA !!! )
PLEASE HELP ME !!!!!!!!!
Bravoone
|
|
|
|
|
if you want to read all records instead 10 to 10 or 10 to n see WM_TIMER that is a low priority message,see i say again thread AfxBeginThread or CWinThread::CreateThread
|
|
|
|