Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
W

wangyiming

@wangyiming
About
Posts
54
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how set Cursor spot Position?
    W wangyiming

    Thank you

    C / C++ / MFC question

  • how set Cursor spot Position?
    W wangyiming

    how set Cursor spot posotion at Center of the Cursor, not at (0,0)? SetCursor( AfxGetApp()->LoadCursor(IDC_CURSOR1)); .... Thank you!

    C / C++ / MFC question

  • Pointer in a .txt file?
    W wangyiming

    1. whether the length of bufLine1 is more than 22, if not, the pointer(pNext1) maybe is out of control 2. you can use substr function

    C / C++ / MFC database performance help tutorial question

  • How can I get the net adapter address?
    W wangyiming

    Just want to get the adapter unique id! Thank you

    C / C++ / MFC question performance

  • How can I get the net adapter address?
    W wangyiming

    How can I get the net adapter address? all the adapter is validate, but at some machine, I can get the adapter address, at some machine, I cann't (address is all Zero). The codes: ----------------------------------------------------------- #include typedef struct _ASTAT_ { ADAPTER_STATUS adapt; NAME_BUFFER NameBuff[30]; } ASTAT; void getNetID() { NCB ncb; UCHAR ch; memset(&ncb,0,sizeof(ncb)); ncb.ncb_command = NCBRESET; ch = Netbios(&ncb); // at some machine, ch = NRC_BRIDGE 0x23 // ncb_lana_num field invalid memset(ncb.ncb_callname,' ',sizeof(ncb.ncb_callname)); ncb.ncb_callname[0] = '*'; //lstrcpy(ncb.ncb_callname,"* "); ncb.ncb_command = NCBASTAT; ASTAT AST; ncb.ncb_lana_num = 0; ncb.ncb_length = sizeof(AST); long *pASTAT; pASTAT = (long *)HeapAlloc(GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS | HEAP_ZERO_MEMORY, ncb.ncb_length); if ( pASTAT == 0 ) { AfxMessageBox("memory allocation failed!"); return; } ncb.ncb_buffer = (unsigned char *)pASTAT; ch = Netbios(&ncb); CopyMemory(&AST, ncb.ncb_buffer, sizeof(ASTAT)); CString str( _T("") ); for(int i=0; i<6; i++) { if( i > 0 ) str += ' '; unsigned char c = (unsigned char)AST.adapt.adapter_address[i]; unsigned char m = (c>>4)&0xf; unsigned char n = c&0xf; str += (m>=10) ? (char)('A'+(m-10)) : (char)('0'+m); str += (n>=10) ? (char)('A'+(n-10)) : (char)('0'+n); } HeapFree(GetProcessHeap(), 0, pASTAT); AfxMessageBox( str ); } --------------------------------------- What's wrong? Thanks

    C / C++ / MFC question performance

  • Modifying CDocument Member Objects :: MFC
    W wangyiming

    CString cStr = "testing"; string temp = ""; char p[80]; strcpy(p,"testing"); temp = p; memset(p,0,sizeof(p)); // or temp = cStr; AfxMessageBox( temp.c_str() ); char szBuffer[80]; strcpy(szBuffer, temp.c_str() ); AfxMessageBox( szBuffer ); ------------------------------- both show messageBox "testing"

    C / C++ / MFC c++ algorithms data-structures testing beta-testing

  • Tabs and List Control Box??
    W wangyiming

    I try it. no problems! maybe you should look: 1. use IsBOF before while ( oracle happen error when the recordset is empty) 2. sure Close Database at any condition

    C / C++ / MFC database help c++ question

  • Multi subitem selection Tree control
    W wangyiming

    please see: http://www.codeguru.com/mfc/comments/26400.shtml

    C / C++ / MFC data-structures

  • Modifying CDocument Member Objects :: MFC
    W wangyiming

    Did you run the program in Debug mode? please try run in Release mode! or in Debug mode: ----------------------------- if( array.GetSize() > 0 ) array.RemoveAll();

    C / C++ / MFC c++ algorithms data-structures testing beta-testing

  • Inhibe the ENTER and ESC KEYS ?
    W wangyiming

    void CMyDialog::OnOk() { } void CMyDialog::OnCancel() { }

    C / C++ / MFC question

  • CRecordset and Oracle 8
    W wangyiming

    Maybe oracle only support open with: CRecordset::forwardOnly

    C / C++ / MFC database oracle help

  • Formatting rebars
    W wangyiming

    Do you want to embed word control into a Dialog? If: I can send a app to you!

    C / C++ / MFC question

  • Formatting rebars
    W wangyiming

    Do you want to embed word control into a Dialog? If: you can send a app to you!

    C / C++ / MFC question

  • calling CDatabase in a worker thread
    W wangyiming

    *.h -------------------------------------- class CAutoObList : public CObject { public: CAutoObList() { size = 10; p = new int[size]; for(int i=0; iSuspendThread(); delete pThread; pThread = NULL; } } void testThread(); }; *.cpp -------------------------------------------------------- CAutoObList autoList; UINT CAutoObListThread(LPVOID object) { // A *pA = ((A*) object); for(;;) { autoList.Output(); Sleep( 2000 ); } return 0; } void A::testThread() { if( pThread == NULL ) pThread = AfxBeginThread(CAutoObListThread, this,THREAD_PRIORITY_HIGHEST); } output: ----------------- 0: 0 1: 1 ... 9: 9 hope can help!

    C / C++ / MFC database question

  • How can get the CPU unique ID?
    W wangyiming

    Thank you very much

    C / C++ / MFC question

  • How can get the CPU unique ID?
    W wangyiming

    Thanks

    C / C++ / MFC question

  • How to save DC's content as bitmap!
    W wangyiming

    CBitmap m_pGenBitmap = new CBitmap(); CClientDC dc(NULL); int nWidth = 128; int nHeight = 128; HDC hDCScreen = dc.GetSafeHdc(); HBITMAP hbm = ::CreateCompatibleBitmap(hDCScreen,nWidth,nHeight); if (hbm != NULL) { HDC hDCGlyphs = ::CreateCompatibleDC(hDCScreen); HBITMAP hbmOld = (HBITMAP)::SelectObject(hDCGlyphs, hbm); CDC *pDC2 = CDC::FromHandle(hDCGlyphs); CRect r(0,0,nWidth,nWidth); // your owner draw pDC2->FillRect(&r,&CBrush(RGB(0xff,0xff,0xff))); m_pFillUnit->Draw(pDC2,&r,0); // end SelectObject(hDCGlyphs, hbmOld); m_pGenBitmap->m_hObject = hbm; ::DeleteDC(hDCGlyphs); } return m_pGenBitmap;

    C / C++ / MFC question graphics help tutorial

  • how can get the CPU info!
    W wangyiming

    Thank you

    C / C++ / MFC question

  • how can get the CPU info!
    W wangyiming

    how can get the CPU unique id? Thanks

    C / C++ / MFC question

  • how draw Region border with pen style?
    W wangyiming

    I get region by: CombineRgn or CreateRectRgn ... or Create a standard region, then rotate it Thanks

    C / C++ / MFC question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups