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

Wormhole5230

@Wormhole5230
About
Posts
14
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to modify a class name?
    W Wormhole5230

    The question is nothing but a question. If there are open ways, it is no more weird.

    C / C++ / MFC tutorial question

  • How to modify a class name?
    W Wormhole5230

    Using a Microsoft Spy++, I can identify a "Class Name" of any application. For example, the class name of Notepad.exe is "Notepad". At this moment, I want to modify a "Class Name" of some applications. Is it possible or not? If possible, how can I modify a class name? Thanks!

    C / C++ / MFC tutorial question

  • problem in adding records after deleting some records
    W Wormhole5230

    Hi, I have a problem in listing all records in my mdb file. steps. 1. I made a mymdb.mdb file. 2. added some records. 3. deleted some records. 4. added new records. 5. repeat 2,3,4 steps several times. Finally, when I list all the records in mdb file - I used MoveFirst(), read record and MoveNext() until all the records were populated. - the added records in 4th step were inserted somewhere near the deleted records in 2nd step. I don't know exactly this behavior is caused my code or it is a nature of mdb. I want to place the new records always in the last of the mdb. How can I do that? Thanks.

    Database question help

  • Is GetItemText limited to 256 bytes for CString ?
    W Wormhole5230

    OK, it looks like it definitely related to data-type mapping. I will check it later because of the lack of time. Thank you for your consideration. :)

    C / C++ / MFC help question

  • Is GetItemText limited to 256 bytes for CString ?
    W Wormhole5230

    You are right. I found it worked well in alphanumeric text. I'm a Korean. When the string is Korean, it fails. Thanks.

    C / C++ / MFC help question

  • Is GetItemText limited to 256 bytes for CString ?
    W Wormhole5230

    With your advice, I looked at the MFC code. The function was defined as follows. CString CListCtrl::GetItemText(int nItem, int nSubItem) const { ASSERT(::IsWindow(m_hWnd)); LVITEM lvi; memset(&lvi, 0, sizeof(LVITEM)); lvi.iSubItem = nSubItem; CString str; int nLen = 128; int nRes; do { nLen *= 2; lvi.cchTextMax = nLen; lvi.pszText = str.GetBufferSetLength(nLen); nRes = (int)::SendMessage(m_hWnd, LVM_GETITEMTEXT, (WPARAM)nItem, (LPARAM)&lvi); } while (nRes == nLen-1); str.ReleaseBuffer(); return str; } At first look at, it looks like to extract whole text using do-while statement. But in my code, nRes is 256, so do-while is applied only one time.

    C / C++ / MFC help question

  • Is GetItemText limited to 256 bytes for CString ?
    W Wormhole5230

    I just used GetLength() to check the length of the returned CString object. The return value is 256. The length of the text in the CListCtrl is surely over 256 bytes. The second function can extract whole text when the last parameter nLen is large enought to hold whole text. Thanks.

    C / C++ / MFC help question

  • Is GetItemText limited to 256 bytes for CString ?
    W Wormhole5230

    OK, that's no problem but what happened to CString, is it bug or not? Thanks.

    C / C++ / MFC help question

  • Is GetItemText limited to 256 bytes for CString ?
    W Wormhole5230

    There are two types of function to extract a text in the list item in CListCtrl. One is CString GetItemText( int nItem, int nSubItem ), and the other is int GetItemText( int nItem, int nSubItem, LPTSTR lpszText, int nLen ). In case of using the first function, it looks like it can only extract 256 bytes, even the text is over 256 bytes. It is OK for second function. I don't know why the length is limited for CString. Any idea to resolve this problem with CString? Should I use second function? Thanks.

    C / C++ / MFC help question

  • how to change field order in *.mdb
    W Wormhole5230

    I created a database using CDaoDatabase and the fields were originally arranged using m_nOrdinalPosition parameter in CDaoFieldInfo. Now, I want to change a order whenever I want. Is it possible? How about the records? Is it also possible to change the order of records?

    C / C++ / MFC database tutorial question

  • How to get notification of drag-drop of headers in CListCtrl
    W Wormhole5230

    I used extended style LVS_EX_HEADERDRAGDROP. So, I can drag-drop a header. How to get notification of drag-drop of headers in CListCtrl whenever it was changed? Thanks.

    C / C++ / MFC tutorial question

  • How to make a dynamic modal dialog.
    W Wormhole5230

    Actually, I had found an article exactly matched to this topic before I post my first question. In that article, one can use similar method like dynamic modaless dialog to make a dynamic modal dialog by including supplied codes. Spending many times, I was finding other method to do that without the code. I decided to use that code and now it works well. If you have interests in this article, please refer this. http://www.codeproject.com/dialog/dynamicdialog.asp?target=dynamic|dialog|modal

    C / C++ / MFC tutorial question

  • How to make a dynamic modal dialog.
    W Wormhole5230

    That's exactly what I want. But the question is how to implement it? I tried many ways, but I failed because of lack of knowledge about creating controls in blank dialog. Could you show me an example which is really working? The important thing is that it should be a modal dialog. Thanks.

    C / C++ / MFC tutorial question

  • How to make a dynamic modal dialog.
    W Wormhole5230

    Dynamic dialog is a dialog of which controls can be created or removed manually depends on the situation. It is easy to make a dynamic modaless dialog as follows. //////////////// CDialog *menu; menu = new CDialog; menu->Create(IDD_MY_BLANK_DIALOG, this); // add a edit control if IsEdit is true if(IsEdit) { CEdit* pEdit = new CEdit(); RECT rctEdit = {5, 5, 100, 30}; pEdit->Create(WS_VISIBLE | WS_CHILD | WS_TABSTOP, rctEdit, FromHandle(menu->m_hWnd), 1100); } // add a button control if IsBtn is true if(IsBtn) { CButton* pButton = new CButton(); RECT rctButton = {5, 35, 100, 60}; pButton->Create(_T("Button"), WS_VISIBLE | WS_CHILD | WS_TABSTOP, rctButton, FromHandle(menu->m_hWnd), 1101); } menu->ShowWindow(SW_SHOW); /////////////// But I want to make a dynamic modal dialog. I heard about the InitModalIndirect function but it is somewhat complex to use. I want a compact code. Is there any simple method like an above code? Thanks.

    C / C++ / MFC tutorial 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