Be careful later ! dlhson2001@yahoo.com
dlhson
Posts
-
A strange compiler error C2440 -
Networking APICan it help you ? CAsyncSocket::IsAborted Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
-
Right align list column in list view.Wow, it's cool !!!!! Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
-
Can anyone suggest how to execute warm booting using address pointerCan it help you?
_system( "rundll32 shell32.dll,SHExitWindows VALUE"); Here are the different VALUES you can put in: 0 Logoff User 1 Shutdown Windows 2 Restart Windows 4 Force Applications to be killed 8 Poweroff (if supported by your PC) -1 restart the GUI without a shutdown_
Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com -
how to access bad pointers?;)That's your mistake. You should check your code before running Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
-
How to implement a 'please wait' dialog..separate threads. That somehow seems too complicated. No, you should use threads for your problem. Because you just need a worker thread, so you can use
AfxBeginThread
. Ex: Declare: static UINT SaveThread(LPVOID lParam) Implement: UINT SaveThread(LPVOID lParam) Calling: AfxBeginThread(SaveThread,yourParam); Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com -
Scollbox size and position1.You don't need to use SendMessage because this's your program and your thread. Only use SetScrollRange, SetScrollPos... 2.I guess that you forgot to call
RedrawWindow
andUpdateWindow
Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com -
How to load a menu into a project (ATL/MFC)MFC does not support that. You must handle it: -Open YourProject.rc, find the following line
IDR_MAINFRAME TOOLBAR.... BEGIN BUTTON ID_FILE_NEW... BUTTON ID_FILE_SAVE... _add this line_ SEPARATOR SEPARATOR END
-In OnCreate(), use m_wndToolBar.SetButtonInfo(n,IDC_COMBO,TBBS_SEPARATOR, 100) -In CMainFrame, add a variable m_combo; -In OnCreate(), use m_combo.Create(...) Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com -
Visual c++ - Access mdb modification questionIf your program is affected by that changes, you must recode it Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
-
load one field of all the records of a table into a listboxtoo few paramaters expected one.
I'm sure that your SQL command is incorrect;P
Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com -
File I/O inside a text fileEven if it's so large, you can use String tech with FileMapping :rolleyes: Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
-
File I/O inside a text filereplace HIGHSPEED with DIALUP You must handle that. Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
-
Thread and serial portOn this site codeproject.com and on codeguru.com, you can find many articles about your topic
Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com -
Change font of CFileDialog ?1. How can I change font of a CFileDialog in MFC application and OPENFILENAME in Win32 Application ? Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
-
Socket problem ?In MSDN, I found a samples: ChatSvr and Chatter. That is a network application using CSocket. But I don't know how to use CSocket in multithread. In ChatSvr, I want to throw each client connecting to server to a particular thread. It means server will manage each client ( and his socket) in 1 thread. How can I do that ? I imagine the code for solving this problem may be like this: void CServerDoc::ProcessPendingAccept() { CClientSocket* pSocket = new CClientSocket(this); if (m_pSocket->Accept(*pSocket)) { pSocket->Init(); m_connectionList.AddTail(pSocket); //Add this line: m_threadList.Add(....); //or AfxBeginThread(....); } else delete pSocket; } Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
-
Get Window styles and exstyles ?How can I get the style of a window class. Ex: I have a window (handle=0x00000b94, class name=#32770(dialog) ) I want to get the styles and extended styles of it as CS_DBLCLKS, WS_EX_CLIENTEDGE.... How can I do that ? I try this way: LONG lStyles=::GetWindowLong(hwnd,GWL_STYLE); LONG lExStyles=::GetWindowLong(hwnd,GWL_EXSTYLE); CString strStyles; if ((lStyles&BS_OWNERDRAW)==BS_OWNERDRAW) strStyles+="BS_OWNERDRAW"; if ((lStyles&CS_VREDDRAW)==CS_VREDDRAW) strStyles+="CS_VREDDRAW"; ... ... (hundreds of "if" !!!!!!!!!!!!!!!) Help me ! Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
-
Can I use CString in a Win32 application ?I developed a program as a Win 32 application (non-MFC) But I found it very difficult to work with string but without CString (MFC). Ex: I can't find a function to cut string from 1 to m (Left()) , a function to cut string from n to m (Mid())... Can I use this MFC class in my program without rewriting in MFC. Can I include this MFC class (.h, .cpp) like a normal class ? Help me !!! Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
-
How can I use CString in a Win32 application ?I developed a program as a Win 32 application (non-MFC) But I find it very difficult to work with string without CString (MFC). Can I use this MFC class in my program without rewriting my program ? Can I include this MFC class like a normal class ? Help me ! Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
-
Lock file ?How can I know when a file is opened ? Ex: When a user use Notepad to open "a.txt", I can catch a message "WM_?" with lParam storing filename: "a.txt" I want to use this message to write a program to lock any files in my system. Any help ? Thanks ! Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
-
Get column count of listcontrol ?How can I get the column count of a list control ? By functions is good as by message ! Ex: I can get the row count with GetItemCount(), LVM_GETITEMCOUNT, but there is no GetColumnCount, LVM_GETCOLUMNCOUNT ? Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com