Thanks a lot man
__Cerb
Posts
-
Accelerators in a Dialog application -
Accelerators in a Dialog applicationHmm, can you give me an example please? I'm kinda new... CTestDlg::CTestDlg(CWnd* pParent /*=NULL*/) : CDialog(CTestDlg::IDD, pParent) { //{{AFX_DATA_INIT(CD2HackKitDlg) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); } thanks
-
Accelerators in a Dialog applicationI've added an accelerator, then Ctrl+W then selected my main Dlg class. However, when I run my program and press the keys, the accelerator doesn't work... thanks for help -Mike
-
Accessing distant database from a program?How would that be possible? I would like to access a MySQL database on my site from a program. Thanks. Michael
-
Char* -> DWORD conversionDidn't work :( Actually I have a string like " b7333109 " and I wanna convert it to a dword
-
Char* -> DWORD conversionI'd need help on converting a char* to a dword OR a byte[4] thanks! :-)
-
Problem with parsing a BYTE*I didn't know that Thanks a lot :-)
-
Problem with parsing a BYTE*Here's my code
int ParsePacket(BYTE *aPacket,short int iStartPos); void main() { BYTE aPacket[] = {0x59,0x89,0x59,0x59,0x23,0x59,0x59,0x59,0x89,0x59,0x00,0x54,0x65}; int l = ParsePacket(aPacket,5); printf("%d\n",l system("pause"); } int ParsePacket(BYTE *aPacket,short int iStartPos) { bool bFound = false; int iPos = 0; for (int i = 0;i < (sizeof(aPacket) - 1); i++) { printf("Test: %x\n",aPacket[i]); } return iPos; }
This piece of code should output twelve values ( sizeof(aPacket) = 13 ), but instead it only outputs the first three bytes of aPacket... why? -
Concatenation of two LPSTRWell, I have my string, let's say
LPSTR myString = "up?";
I'd want to add " Whats " in front of it, just likeLPSTR myString = "up?"; myString = "Whats " + myString;
I get an error. Then I tried doing:LPSTR myString = "up?"; sprintf(myString,"Whats %s",myString);
This also doesn't work. Any help please? Thanks ~Mike -
ReadProcessMemoryCan anyone post an example of the ReadProcessMemory function in action, let's say I want it to read at offset 0x6FB74910 Thanks, Michael
-
CImage and atlimage.h?Ok, I read about CImage on MSDN, and I have to include atlimage.h in StdAfx.h I did it, but it says there is no such file. Where can I download it and where must I store the file (which directory)? Thanks, ~Michael
-
Switching between applicationsHWND hwnd = ::FindWindow(NULL,"Program name"); ::PostMessage(hwnd,WM_SETFOCUS,0,0); This should do it. ~Michael
-
Getting a pixel color from a JPG imageok, I have my .jpg image, let's call it "picture.jpg" Now, I want to get a pixel color from picture.jpg at coordinates (50,80) How could I do this? Thanks a lot Michael
-
how do i prevent a property sheet from receiving focus?Can you make it read-only or disabled?
-
Windows MessagesFound it!!! Thanks a lot man, without that keybd_event function I couldn't have guessed it. Thanks!! ~Michael
-
Windows MessagesThanks a lot, just a little more question about it. I want to simulate that printscreen key in a specific window that is minimized... I've tried adding ' :: ' in front of the keybd_event function, however it still does not take any HWND parameter....
-
Windows MessagesHow would it be possible to send a "Print Screen" keydown message or whatever? Which message should I send with which params (if possible) Thanks a lot ~Michael
-
How can I send a certain key to a certain application? (simulate keyboard)For your b) question, here's how:
HWND hwnd = ::FindWindow(NULL,"PCTV Vision");
Then you can call PostMessage usinghwnd
For alt+f4, you could just use::PostQuitMessage(0);
I am not sure at all on how to send (i.e: CTRL+M), but ifPostMessage(hwnd, WM_CHAR, WPARAM('^'), LPARAM(M));
works, thenPostMessage(hwnd, WM_CHAR, WPARAM('!'), LPARAM(R));
would do the job. One more thing. If you are coding an MFC application, you will need to add ' :: ' in front of your PostMessage's and FindWindow's, since you want to play withHWND
values, and notCWnd
Michael -
PrintScreen using Windows Messages?How do I send a PrintScreen key to a window using windows message? I mean, which Windows Message should I send and which lparam/wparam values? Thanks ~Mike
-
GetPixel() help neededWhatever, any serious responses please?