that worked thanks man :-D
locoone
Posts
-
Registry REG_BINARY Problem -
Registry REG_BINARY Problemthat gives the same error :(( but why am i only getting the first letter and not the whole value? :confused: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs <--- thats what im tring to get
modified on Sunday, April 12, 2009 11:07 PM
-
Registry REG_BINARY Problemi changed it and i now get this error error C2440: 'initializing' : cannot convert from 'wchar_t *' to 'ATL::CStringT<BaseType,StringTraits>'
-
Registry REG_BINARY Problemyes, its not unicode.
-
Registry REG_BINARY Problemi forgot to add these
TCHAR lpData[MAX_VALUE_NAME];
DWORD dwType = REG_BINARY;
DWORD dwData = MAX_VALUE_NAME;but it is a TCHAR so im still lost as to what to do to fix it :(
-
Registry REG_BINARY Problemim trying to get RecentDocs registry info and put it in a listctrl the name part works fine but the data part i only get the first letter
#define MAX_KEY_LENGTH 255
#define MAX_VALUE_NAME 16383
TCHAR achValue[MAX_VALUE_NAME];
DWORD cchValue = MAX_VALUE_NAME;
HKEY hKey;
dwData = MAX_VALUE_NAME;
cchValue = MAX_VALUE_NAME;
achValue[0] = '\0';
retCode = RegEnumValue(hKey, i,
achValue,
&cchValue,
NULL,
&dwType,
(BYTE*)lpData,
(LPDWORD)&dwData);if (retCode == ERROR\_SUCCESS ) { m\_list.InsertItem(index, achValue); m\_list.SetItemText(index, 1, lpData); index++; }
im using vs 2008 and mfc can anyone tell me where im going wrong? :confused:
-
CString Format Helpi have a function all it does it print a CListCtrl to a text file but it is hard to read with all the data temp.Format("%s %10s %s\r\n", m_list.GetItemText(index, 0), "-", m_list.GetItemText(index, 2)); this works but gives a output like this some name here - text here longer name here - text here even longer name here - text here short name - text here what i want is some name here - text here longer name here - text here even longer name here - text here short name - text here well the "- text here" should be in a line but i cant get it right here either can anyone help me fix it ive see how to do it somewhere but cant find it now
-
RegOpenKey error i cant figure outthat part i know the part i cant figure out is why it cant find it i was in regedit and used the copy key name to get the key path so i know its right out of 24 keys it finds 12 and cant find 12
modified on Saturday, August 9, 2008 11:28 PM
-
RegOpenKey error i cant figure outHKEY hKey;
CString path;hKey = HKEY\_LOCAL\_MACHINE; err = ERROR\_SUCCESS; m\_list.InsertItem(0, "HKEY\_LOCAL\_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Installer\\\\UserData\\\\S-1-5-18\\\\Products\\\\109C30587D582624882DD8B8A2B7808B"); path = "SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Installer\\\\UserData\\\\S-1-5-18\\\\Products\\\\109C30587D582624882DD8B8A2B7808B"; err = RegOpenKeyEx(hKey, path, NULL, KEY\_ALL\_ACCESS, &hKey); if (err == ERROR\_SUCCESS) { m\_list.SetItemText(0, 1, "Found"); ErrorExit("RegOpenKey0"); } else { m\_list.SetItemText(0, 1, "Not Found"); <--- this is the one i keep getting ErrorExit("RegOpenKey1"); } RegCloseKey(hKey);
that is the code and it keeps returning error 2 system cant find file but i know the path is good i copied the key from regedit i am on vista 64 bit if it makes a differance ill take any help i can get
-
Process prioritythat worked thanks :)
-
Process prioritySetPriorityClass(hHandle, HIGH_PRIORITY_CLASS); //high SetPriorityClass(hHandle, NORMAL_PRIORITY_CLASS); //normal SetPriorityClass(hHandle, IDLE_PRIORITY_CLASS); //low its the belownormal and abovenormal i cant figure out
-
Process priorityi am stuck like chuck..... i can change from low to normal and high but how do i get priority belownormal and abovenormal?
-
visual styles in vistai have tryed adding a manifest but in vs2008 something isnt the same because nothing happens.
-
visual styles in vistacan someone please show me what i need to add to my program to get visual styles to work in vista and using vs2008.
-
video card speed infoi need core speed shader speed and memory speed only. the rest dont matter
-
video card speed infois there anywhere in the registry or using one of the wmi classes that i can get the gpu core, memory, shader speed? if no. does anyone know how to get this info?
-
control size [modified]in visual studio 6 is there a way to change the default size of the controls when added to a dialog? ex.. the static control is 19x8 default i want it to be 20x10 default. :confused:
modified on Sunday, December 30, 2007 4:31:36 PM
-
setting text on dialog from a subclassive tryed SetWindowtext()but nothing happens ive tryed ::SetWindowText() to but for some reason i cant get a HWND to my control till after its to late
-
setting text on dialog from a subclassi subclassed CButton class and have a onmousemove in it and i need to set text on my dialog i know it can be done ive done it before but i cant remember now to save my life
void CMyButton::OnMouseMove(UINT nFlags, CPoint point) { if (!m_bOverControl) { TRACE0("Entering control\n"); m_bOverControl = TRUE; Invalidate(); if (GetDlgCtrlID() == IDC_STATUS_BUTTON) { //IDC_DISPLAY_TEXT is the control i need to set text to } if (GetDlgCtrlID() == IDC_SEARCH_BUTTON) { MessageBox("hi"); } if (GetDlgCtrlID() == IDC_OPTIONS_BUTTON) { MessageBox("low"); } SetTimer(m_nTimerID, 100, NULL); } CButton::OnMouseMove(nFlags, point); }
the messagebox works. -
multi threadingthank you very much mark you helped and didnt even know it and you missed where i was messing up UNIT <--- mine UINT <--- yours btw i go it working first try after learning to spell lol