bingo thans Pain is a weakness living the body
ravjak
Posts
-
hash_map iterator error -
hash_map iterator errorhi i'm want to use new GNU comipler the problem is with hash_map interator after reading some articles i added some extra macros but the didn't solve the problem compiler seems to do not recognize type template or template and in line hash_map::interator ptr; throws an error: expected `;' before "ptr" here is whole code
#include #include #include #include #if defined(__GNUC__) && (__GNUC__==2) && (__GNUC_MINOR__>=95) /*STL extensions were put in the std namespace ...*/ namespace gnuext = std ; #elif defined(__GNUC__) && (__GNUC__>=3) /* STL extensions have their own namespace */ namespace gnuext = __gnu_cxx ; #else #error "This code relies on non-standard STL extensions as defined by GNU libraries." #endif #if defined(__GNUC__) && (__GNUC__==2) && (__GNUC_MINOR__>=95) /*STL extensions were put in the std namespace ...*/ #define __GNUEXT std #elif defined(__GNUC__) && (__GNUC__>=3) /* STL extensions have their own namespace */ #define __GNUEXT __gnu_cxx #else #error "This code relies on non-standard STL extensions as defined by GNU libraries." #endif template class MyHash { MyHash() {} ~MyHash() {} __GNUEXT::hash_map myhash; void add(Data d) { __GNUEXT::hash_map::iterator ptr; } }; `Pain is a weakness living the body`
-
Problem with ListView API : LVM_ISERTITEMnot working too i think this not valid pointer beacuse its not the same address space I had the similar problem some time ago when i wannted to send some char * as wparam or lparam using SendMessage. I had to use WM_COPYDATA then char * goes thru kernel memory and pointer is valid:confused: Pain is a weakness living the body
-
Problem with ListView API : LVM_ISERTITEMIm hooking into OE and it crashes when OE adds new items to address list. when i use olny iImage eg iImage = 2 it works properly but i want test pszText vaule and according to this set proper valus of iImage :) Pain is a weakness living the body
-
Problem with ListView API : LVM_ISERTITEMBut I thing I know why is it so. According to spy ++ this is a ATL:SysTreeView control. Maybe as a lparam they are sending some other struct than LV_ITEM:confused: Pain is a weakness living the body
-
Problem with ListView API : LVM_ISERTITEMNot working. Plese remind me next time do not take a project for windows. Pain is a weakness living the body
-
Problem with ListView API : LVM_ISERTITEMNot working hmmm hardcore hehe. Im testing changing iImage value according to iItem and it seems to be good if I know sequence of adding apriori, which will require some more coding. Anyway its really strage stuff isn't it :confused: Pain is a weakness living the body
-
Problem with ListView API : LVM_ISERTITEMthis pice of code doesn't work :(
case LVM_INSERTITEM: { LV_ITEM FAR* pitem = (LV_ITEM FAR*) lParam; if(!pitem && !pitem->pszText) break; if( pitem->mask & LVIF_TEXT == LVIF_TEXT && pitem->cchTextMax>0) { MessageBox(okno,pitem->pszText,":-)",MB_OK); } break;
any other ideas :confused: :mad::mad: Pain is a weakness living the body -
Problem with ListView API : LVM_ISERTITEMI'm pretty sure because listview is a HWND of list control and its valid Pain is a weakness living the body
-
Receive messageThis should work
(WNDPROC) gfnMyProc; //in some previous called function gfnMyProc = (WNDPROC)SetWindowLong(listview, GWL_WNDPROC,(LONG)MyProc); LRESULT CALLBACK MyProc(HWND hwnd, UINT uiMsg,WPARAM wParam, LPARAM lParam) { switch (uiMsg) { case WM_LBUTTONDOWN: { //your stuff here break; } } return CallWindowProc(gfnMyProc, hwnd, uiMsg, wParam, lParam); }
Pain is a weakness living the body -
Receive message(WNDPROC) gfnMyProc; //in some previous called function gfnMyProc = (WNDPROC)SetWindowLong(listview, GWL_WNDPROC,(LONG)MyProc); LRESULT CALLBACK MyProc(HWND hwnd, UINT uiMsg,WPARAM wParam, LPARAM lParam) { switch (uiMsg) { case WM_LBUTTONDOWN: { //your stuff here break; } } return CallWindowProc(gfnMyProc, hwnd, uiMsg, wParam, lParam); }}
Pain is a weakness living the body -
Outlook Express plug-inHi. Yes you wil have to use hooking try to read something about subclassing in msdn pages. Its a hard and time consuming job. Wish you luck. Pain is a weakness living the body
-
Disable shift key in pretranslate when shift key is pressedSetFocus(hwnd); keybd_event( VK_SHIFT,0x45,KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,0);
check if SetFocus is nesserly in your problem Pain is a weakness living the body -
Problem with ListView API : LVM_ISERTITEM"Hi I'm developing dll which will do some changing stuff with ListView. I have a funny problem I want to change value of iImage in a LV_ITEM according to pszText value. Problem occurs when I want to test value of pszText, exception ouccrs Access Violation 0xC0000005 :(. But I'm testing if pitem and pitem->pszText are not null even if I tryed to use strdup(pitem->pszText) the same exception occurs. There is no problem when I tryed to change value of iItem. Is is somehow connected witch injection dll into some application ?? and its address space ?? "
(WNDPROC) gfnListProc; //in some previous called function gfnListProc = (WNDPROC)SetWindowLong(listview, GWL_WNDPROC,(LONG)ListProc); __declspec(dllexport) LRESULT CALLBACK ListProc(HWND hwnd, UINT uiMsg,WPARAM wParam, LPARAM lParam) { switch (uiMsg) { case LVM_INSERTITEM: { LV_ITEM FAR* pitem = (LV_ITEM FAR*) lParam; if(pitem && pitem->pszText) MessageBox(0, pitem->pszText,":-)",MB_OK); break; } } return CallWindowProc(gfnListProc, hwnd, uiMsg, wParam, lParam); } //from commctr.h typedef struct tagLVITEMW { UINT mask; int iItem; int iSubItem; UINT state; UINT stateMask; LPWSTR pszText; int cchTextMax; int iImage; LPARAM lParam; #if (_WIN32_IE >= 0x0300) int iIndent; #endif } LVITEMW, FAR* LPLVITEMW; #define ListView_InsertItem(hwnd, pitem) \ (int)SNDMSG((hwnd), LVM_INSERTITEM, 0, (LPARAM)(const LV_ITEM FAR*)(pitem))
Thaks for reading that stuff :-) Pain is a weakness living the body -
Font color in DialogsYes you have to use CPen pen(..) and then pDC->SelectObject(pen); don't forget to free resorces DeleteObject(pen) because after some time our application my behave in funy way :) Pain is a weakness living the body
-
how to get current identityHi! I want to know how to get current Identity. I need to know which of wab or OE identities are currently in use. Strange thing is that i can retrive WAB entries on allready logon client but i don't know who he is. Probably this function will return such string {C9DB85FC-7CA3-4CE7-850B-81F9B94CCD14} which what im looking for :) Pain is a weakness living the body
-
geting font from hdc (GDI) in API wayThanks!!!!! Pain is a weakness living the body
-
geting font from hdc (GDI) in API wayroger's way is what i was looking for thanks anyway Pain is a weakness living the body
-
Format string functionsuppose your string is char str[]="......"
#define MIN(a, b) (((a) < (b)) ? (a) : (b)) int str_len = strlen(str); int LINE_LEN=7; //you will nead here 80 int c=(int)ceil((float)str_len/(float)LINE_LEN); char *str2= new char[str_len+c+1]; int n=0; int m=0; for(int k=0;k Pain is a weakness living the body
-
geting font from hdc (GDI) in API wayHi i want to get HFONT or LOGFONT form HDC object. I have a hdc but i don't wann to do this in this way
HFONT font= (HFONT)SendMessage( hwnd,WM_GETFONT,0,0);
or in this wayHFONT font = ::CreateFontIndirect(....); HFONT hOldFont = (HFONT)::SelectObject(hdc, font);
im looking for something likeHFONT font=GetFont(hdc);
There must be a way to do this:mad: Pain is a weakness living the body