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
G

Gilfrog

@Gilfrog
About
Posts
39
Topics
18
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ItemData in a virtual list control
    G Gilfrog

    I am using a virtual list control, in the message LVN_GETDISPINFO i am setting the text but how can i set the ItemData. ON_NOTIFY(LVN_GETDISPINFO, ID_LIST, GetDispInfo) void CWndEx::GetDispInfo(NMHDR* pNMHDR, LRESULT* pResult) { LV_DISPINFO* pDispInfo = (LV_DISPINFO*)pNMHDR; LV_ITEM* pItem= &(pDispInfo)->item; if (pItem->mask & LVIF_TEXT) { //Comes here } if(pItem->mask & LVIF_PARAM) { //NEVER COMES } } When i call m_ListCtrl.GetItemData(nRow) it allways returns 0 and never comes to the GetDisplayInfo function. Do you set the ItemData some other way or just handle getting the ItemData in your own function? Any Ideas?

    C / C++ / MFC question

  • binary data in XML
    G Gilfrog

    how can i put a binary data chunk in to XML node using MSXML I've seen some suggestions of converting it to a hex representation. Any suggestions or examples

    C / C++ / MFC xml question

  • Convert Screen Rect to Printer Rect
    G Gilfrog

    ok i have the pixals per inch, what do i do with them to convert the rect?

    C / C++ / MFC question

  • Convert Screen Rect to Printer Rect
    G Gilfrog

    I have a Rect say (0, 16, 0, 154) and i want to print it out with that same rect on a printer. on the printer dc i say int nOldMapMode = dc.SetMapMode(MM_HIENGLISH); dc.DPtoLP(rect); it converts it to (0, -27, 0, 257) wich is way to small for the printer. How do i convert this rect to the same rect for a printer? Scott

    C / C++ / MFC question

  • Writing to a file with CInternetSession
    G Gilfrog

    I am currently downloading a file from the web and checking info from it. CStdioFile *remotefile; CInternetSession mysession; remotefile = mysession.OpenURL (csUrl,1,INTERNET_FLAG_TRANSFER_BINARY|INTERNET_FLAG_RELOAD); if(!remotefile) return 0; My question is can i write to the file that i just opened and save it back on the web server. If this doesn't work is there another method if i want to write to a file over the web? Scott

    C / C++ / MFC question sysadmin

  • Printing a custom control
    G Gilfrog

    What should the desiredDPI be? I tried 96 and it seems to work pretty good but it prints everything a little smaller than it should be. I can play around with desiredDPI and get it to print almost exactly like it is on the screen but there's got to be a way to figure what this value should be? Scott

    C / C++ / MFC question graphics

  • Printing a custom control
    G Gilfrog

    I have a custom control that i do all the drawing on. If i want to print the control can i just replace the DC with a DC i get from CPrintDialog? This works but it prints reeeally small. How can i get it to print so it is the same size as on the screen? Scott

    C / C++ / MFC question graphics

  • CButton Killfocus
    G Gilfrog

    that works, thanks Scott

    C / C++ / MFC

  • CButton Killfocus
    G Gilfrog

    How do you get the killfocus for a CButton. There is a ON_BN_KILLFOCUS but that never comes. In the class wizard there is no option for killfocus. scott

    C / C++ / MFC

  • CDataGrid
    G Gilfrog

    Is there any way not to save the data at once. I would like to have a Ok and a Cancel button and not save the data till they hit ok. Is there a way of doing this with a CDataGrid in VC++ 6.0. thanks Scott

    C / C++ / MFC c++

  • Sending Paste Message
    G Gilfrog

    I can send the keydown for v but my main question now is How to set the state of the control key to be pressed when i send the keydown message? Scott

    C / C++ / MFC question csharp visual-studio

  • Sending Paste Message
    G Gilfrog

    I am having trouble sending a paste message to windows in visual studio, word and excel. Sending the wm_paste message seems to work on normal edit controls and rich edit controls but not these others. I get the window with focus and send it a wm_paste message. Are these different type of window's, should i send them a ctrl-v message? If so how do i send that message, Send a wm_keydown for v, but how do i say the ctrl is pressed. Thanks Scott

    C / C++ / MFC question csharp visual-studio

  • reading and writing raw data to an access database from c++
    G Gilfrog

    What is the correct way to read and write raw data to and from an access database from c++. The field is a Ole Object in the database. The table has two fields in it 1) type -- long 2) data -- Ole Variant CDaoDatabase db; CDaoRecordset recset(&db); db.Open("data.mdb"); recset.Open(AFX_DAO_USE_DEFAULT_TYPE, "SELECT * FROM Main" ,NULL); recset.AddNew(); recset.SetFieldValue("Type", (long)1); BYTE* pInfo; pInfo = new BYTE [30]; for(int i = 0; i < 30; i++) pInfo[i] = i; recset.Update(); recset.Close(); db.Close(); How do i get the data from pInfo into the the field "data" in the database? this data could be anything from a bitmap to text. thanks

    C / C++ / MFC question database c++ com graphics

  • having a color show through another color
    G Gilfrog

    COLORREF CList::Transform2SelColor(COLORREF clr) { return RGB( abs( ((DWORD)clr&0xFF) - (255 - ((DWORD)m_clrSelection&0xFF)) ), abs( (((DWORD)clr>>8)&0xFF) - (255 -(((DWORD)m_clrSelection>>8)&0xFF)) ), abs( (((DWORD)clr>>16)&0xFF) - (255 - (((DWORD)m_clrSelection>>16)&0xFF)) )); } where clr is the slection color take the absolute value of (R value of the selection color - the inverse of the background color)

    C / C++ / MFC css graphics

  • having a color show through another color
    G Gilfrog

    I have a grid that you can set a color for each cell. When multiple selection is on and i select cells with a background color in it the selection color over rides the original cell background color. I would like to blend these 2 colors to show that it is selected and show the original cell background color. when drawing i have the 2 COLORREF values. Is there a function to blend these or something along those lines. Similar to how excel handles selection and background colors. thanks

    C / C++ / MFC css graphics

  • Storing 2 longs in a single variable
    G Gilfrog

    thanks, that works for me.

    C / C++ / MFC question

  • Storing 2 longs in a single variable
    G Gilfrog

    How do i get the two longs back out of the unsigned__int64?

    C / C++ / MFC question

  • Storing 2 longs in a single variable
    G Gilfrog

    I don't think that will work because that stores it in a structure. I need it to be in one variable.

    C / C++ / MFC question

  • Storing 2 longs in a single variable
    G Gilfrog

    How can i store 2 longs in a single variable. Similare to storing 2 shorts in a long with the MAKELONG macro. Can i do this with Long64? Thanks

    C / C++ / MFC question

  • Adding a Node to a XML file
    G Gilfrog

    Heres the code String strPathName; strPathName = "C:\\My Documents\\C_Projects\\XML\\books.xml"; CString csString; HRESULT hr; hr = CoInitialize(NULL); if (FAILED(hr)) { return; } hr = CoCreateInstance(MSXML::CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER, MSXML::IID_IXMLDOMDocument, (LPVOID*)&document); if (!document) { return; } BSTR bstr = NULL; document->put_async(VARIANT_FALSE); bstr = strPathName.AllocSysString(); VARIANT_BOOL varOkay = document->load(bstr); SysFreeString(bstr); BSTR nodeName; if (varOkay) { hr = document->get_documentElement(&element); if (FAILED(hr) || element == NULL) { MessageBox(_T("Empty document!"), _T("Error Loading XML"), MB_ICONWARNING); return ; } element->get_nodeName(&nodeName); m_List.AddString(CString(nodeName)); if(element->hasChildNodes()) { MSXML::IXMLDOMNode* firstChild = NULL; HRESULT hr; hr = element->get_firstChild(&firstChild); if (SUCCEEDED(hr) && firstChild != NULL) { ((MSXML::IXMLDOMElement*)firstChild)->get_nodeName(&nodeName); m_List.AddString(CString(nodeName)); } } MSXML::IXMLDOMElementPtr node; node = document->createElement("Test"); document->appendChild(node); } else { long line, linePos; BSTR reason = NULL; document->get_parseError(&parseError); parseError->get_errorCode(&hr); parseError->get_line(&line); parseError->get_linepos(&linePos); parseError->get_reason(&reason); CString strMsg; strMsg.Format(_T("Error 0x%.8X on line %d, position %d\r\nReason: %s"), hr, line, linePos, CString(reason)); MessageBox(strMsg, _T("Error Loading XML"), MB_ICONWARNING); SysFreeString(reason); return; } on the line -- document->appendChild(node); is gives the error Unhandled exception in XML.exe(kernal32.dll); 0xEO6D7363; Microsoft C++ Exception Scott

    C / C++ / MFC question xml help
  • Login

  • Don't have an account? Register

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