Search Results

Search found 746 results on 30 pages for 'winapi'.

Page 8/30 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • How to simulate mousemove event from one window to another?

    - by Gohan
    Hello, I am trying to Create an empty window, which process the WM_MOUSEMOVE message in WinProc: case WM_MOUSEMOVE: { HWND otherHwnd = HWND(0x000608FC); POINT pt = {LOWORD(lParam), HIWORD(lParam)}; ClientToScreen(otherHwnd, &pt); PostMessage(otherHwnd, WM_TIMER, WPARAM(4096), 0); PostMessage(otherHwnd, message, wParam, lParam); SendMessage(otherHwnd, WM_NCHITTEST, NULL, (LPARAM)MAKELONG(pt.x, pt.y)); SendMessage(otherHwnd, WM_NCHITTEST, NULL, (LPARAM)MAKELONG(pt.x, pt.y)); SendMessage(otherHwnd, WM_NCHITTEST, NULL, (LPARAM)MAKELONG(pt.x, pt.y)); SendMessage(otherHwnd, WM_SETCURSOR, WPARAM(otherHwnd), (LPARAM)MAKELONG(HTCLIENT, WM_MOUSEMOVE)); break; } I hope I can hover the hyberlink in IE, but result is the hyberlink only be showed as hover style in a very short time, then it turn to normal, and then again hover, then normal. At www.amazon.com, when I simulate to hover the link("Today's Deals ") , the link is blinking. I think there is a better way to do it, even the IE window is covered with some other windows, it can make the IE act with the mouseevent. waiting for the best solution~ orz Above is the spy++ logs when I realy hover the link. and the simulate is as same as the real message <01277> 000608FC S WM_SETCURSOR hwnd:000608FC nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE <01278> 000608FC R WM_SETCURSOR fHaltProcessing:False <01279> 000608FC P WM_MOUSEMOVE fwKeys:0000 xPos:406 yPos:50 <01280> 000608FC P WM_TIMER wTimerID:4096 tmprc:00000000 <01281> 000608FC S WM_NCHITTEST xPos:520 yPos:283 <01282> 000608FC R WM_NCHITTEST nHittest:HTCLIENT <01283> 000608FC S WM_NCHITTEST xPos:520 yPos:283 <01284> 000608FC R WM_NCHITTEST nHittest:HTCLIENT <01285> 000608FC S WM_NCHITTEST xPos:520 yPos:283 <01286> 000608FC R WM_NCHITTEST nHittest:HTCLIENT <01287> 000608FC S WM_NCHITTEST xPos:520 yPos:283 <01288> 000608FC R WM_NCHITTEST nHittest:HTCLIENT <01289> 000608FC S WM_SETCURSOR hwnd:000608FC nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE <01290> 000608FC R WM_SETCURSOR fHaltProcessing:False <01291> 000608FC P WM_MOUSEMOVE fwKeys:0000 xPos:406 yPos:50 <01292> 000608FC P WM_TIMER wTimerID:4096 tmprc:00000000 <01293> 000608FC S WM_NCHITTEST xPos:520 yPos:283 <01294> 000608FC R WM_NCHITTEST nHittest:HTCLIENT <01295> 000608FC S WM_NCHITTEST xPos:520 yPos:283 <01296> 000608FC R WM_NCHITTEST nHittest:HTCLIENT <01297> 000608FC S WM_NCHITTEST xPos:520 yPos:283 <01298> 000608FC R WM_NCHITTEST nHittest:HTCLIENT <01299> 000608FC S WM_NCHITTEST xPos:520 yPos:283 <01300> 000608FC R WM_NCHITTEST nHittest:HTCLIENT <01301> 000608FC S WM_SETCURSOR hwnd:000608FC nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE <01302> 000608FC R WM_SETCURSOR fHaltProcessing:False <01303> 000608FC P WM_MOUSEMOVE fwKeys:0000 xPos:406 yPos:50 <01304> 000608FC S WM_NCHITTEST xPos:520 yPos:283 <01305> 000608FC R WM_NCHITTEST nHittest:HTCLIENT <01306> 000608FC P WM_TIMER wTimerID:4096 tmprc:00000000 <01307> 000608FC S WM_NCHITTEST xPos:520 yPos:283 <01308> 000608FC R WM_NCHITTEST nHittest:HTCLIENT <01309> 000608FC S WM_NCHITTEST xPos:520 yPos:283 <01310> 000608FC R WM_NCHITTEST nHittest:HTCLIENT <01311> 000608FC S WM_NCHITTEST xPos:521 yPos:281 <01312> 000608FC R WM_NCHITTEST nHittest:HTCLIENT

    Read the article

  • Where's the Win32 resource for the mouse cursor for dragging splitters?

    - by Luther Baker
    I am building a custom win32 control/widget and would like to change the cursor to a horizontal "splitter" symbol when hovering over a particular vertical line in the control. IE: I want to drag this vertical line (splitter bar) left and right (WEST and EAST). Of the the system cursors (OCR_*), the only cursor that makes sense is the OCR_SIZEWE. Unfortunately, that is the big, awkward cursor the system uses when resizing a window. Instead, I am looking for the cursor that is about 20 pixels tall and around 3 or 4 pixel wide with two small arrows pointing left and right. I can easily draw this and include it as a resource in my application but the cursor itself is so prevalent that I wanted to be sure it wasn't missing something. For example: when you use the COM drag and drop mechanism (CLSID_DragDropHelper, IDropTarget, etc) you implicitly have access to the "drag" icon (little box under the pointer). I didn't see an explicit OCR_* constant for this guy ... so likewise, if I can't find this splitter cursor outright, I am wondering if it is part of a COM object or something else in the win32 lib.

    Read the article

  • How to start new browser window in cpecified location whith cpecified size

    - by Pritorian
    Hi all! I create a new instance and trying to resize new instance of browser like this: [System.Runtime.InteropServices.DllImport("user32.dll")] private static extern bool GetWindowInfo(IntPtr hwnd, ref tagWINDOWINFO pwi); [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential)] public struct tagRECT { /// LONG->int public int left; /// LONG->int public int top; /// LONG->int public int right; /// LONG->int public int bottom; } [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential)] public struct tagWINDOWINFO { /// DWORD->unsigned int public uint cbSize; /// RECT->tagRECT public tagRECT rcWindow; /// RECT->tagRECT public tagRECT rcClient; /// DWORD->unsigned int public uint dwStyle; /// DWORD->unsigned int public uint dwExStyle; /// DWORD->unsigned int public uint dwWindowStatus; /// UINT->unsigned int public uint cxWindowBorders; /// UINT->unsigned int public uint cyWindowBorders; /// ATOM->WORD->unsigned short public ushort atomWindowType; /// WORD->unsigned short public ushort wCreatorVersion; } [System.Runtime.InteropServices.DllImport("user32.dll")] private static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint); [System.Runtime.InteropServices.DllImport("user32.dll")] private static extern bool UpdateWindow(IntPtr hWnd); private void button2_Click(object sender, EventArgs e) { using (System.Diagnostics.Process browserProc = new System.Diagnostics.Process()) { browserProc.StartInfo.FileName = webBrowser1.Url.ToString(); browserProc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Minimized; int i= browserProc.Id; tagWINDOWINFO info = new tagWINDOWINFO(); info.cbSize = (uint)System.Runtime.InteropServices.Marshal.SizeOf(info); browserProc.Start(); GetWindowInfo(browserProc.MainWindowHandle, ref info); browserProc.WaitForInputIdle(); string str = browserProc.MainWindowTitle; MoveWindow(browserProc.MainWindowHandle, 100, 100, 100, 100, true); UpdateWindow(browserProc.MainWindowHandle); } } But I get an "No process is associated with this object". Could anyone help? Or mb other ideas how to run new browser window whith specified size and location?

    Read the article

  • TreeView Controls - HTREEVIEW

    - by nXqd
    I'm new to win32 API programming and I try to understand source code of treeview from codeproject. But I really don't understand this : BOOL TreeView::DoNotify(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { // blah blah HTREEVIEW Selected = (HTREEITEM)SendDlgItemMessage(hWnd,ID_TREE,TVM_GETNEXTITEM,TVGN_CARET,(LPARAM)Selected); // halb halb } It doesn't work ( Selected is used without initializing) until I declare Selected as global variable. Thanks for reading this and I need your help .

    Read the article

  • SHBrowseForFolder, But With Textbox to Navigate

    - by Emtucifor
    I found all the code I need to make SHBrowseForFolder work in my application. But I hate that it forces you to do everything in the little folder window, without a text box to navigate by typing. In Windows, I know I commonly see a different folder browse dialog that does let me type folder names and use the other regular navigation keys to get around to select the desired folder (backspace, "..", Enter, and so on). Is there a different API call for that?

    Read the article

  • How can I effectively test against the Windows API?

    - by Billy ONeal
    I'm still having issues justifying TDD to myself. As I have mentioned in other questions, 90% of the code I write does absolutely nothing but Call some Windows API functions and Print out the data returned from said functions. The time spent coming up with the fake data that the code needs to process under TDD is incredible -- I literally spend 5 times as much time coming up with the example data as I would spend just writing application code. Part of this problem is that often I'm programming against APIs with which I have little experience, which forces me to write small applications that show me how the real API behaves so that I can write effective fakes/mocks on top of that API. Writing implementation first is the opposite of TDD, but in this case it is unavoidable: I do not know how the real API behaves, so how on earth am I going to be able to create a fake implementation of the API without playing with it? I have read several books on the subject, including Kent Beck's Test Driven Development, By Example, and Michael Feathers' Working Effectively with Legacy Code, which seem to be gospel for TDD fanatics. Feathers' book comes close in the way it describes breaking out dependencies, but even then, the examples provided have one thing in common: The program under test obtains input from other parts of the program under test. My programs do not follow that pattern. Instead, the only input to the program itself is the system upon which it runs. How can one effectively employ TDD on such a project?

    Read the article

  • Disabling redraw in WinForms app

    - by Ryan
    I'm working on a C#.Net application which has a somewhat annoying bug in it. The main window has a number of tabs, each of which has a grid on it. When switching from one tab to another, or selecting a different row in a grid, it does some background processing, and during this the menu flickers as it's redrawn (File, Help, etc menu items as well as window icon and title). I tried disabling the redraw on the window while switching tabs/rows (WM_SETREDRAW message) at first. In one case, it works perfectly. In the other, it solves the immediate bug (title/menu flicker), but between disabling the redraw and enabling it again, the window is "transparent" to mouse clicks - there's a small window (<1 sec) in which I can click and it will, say, highlight an icon on my desktop, as if the app wasn't there at all. If I have something else running in the background (Firefox, say) it will actually get focus when clicked (and draw part of the browser, say the address bar.) Here's code I added. m = new Message(); m.HWnd = System.Windows.Forms.Application.OpenForms[0].Handle; //top level m.WParam = (IntPtr)0; //disable redraw m.LParam = (IntPtr)0; //unused m.Msg = 11; //wm_setredraw WndProc(ref m); <snip - Application ignores clicks while in this section (in one case) m = new Message(); m.HWnd = System.Windows.Forms.Application.OpenForms[0].Handle; //top level m.WParam = (IntPtr)1; //enable m.LParam = (IntPtr)0; //unused m.Msg = 11; //wm_setredraw WndProc(ref m); System.Windows.Forms.Application.OpenForms[0].Refresh(); Does anyone know if a) there's a way to fix the transparent-application problem here, or b) if I'm doing it wrong in the first place and this should be fixed some other way?

    Read the article

  • OpenGL bitmap text fails after drawing polygon

    - by kaykun
    I'm using Win32 and OpenGL to to draw text onto a window. I'm using the bitmap font method, with wglUseFontBitmaps. Here is my main rendering function: glClear(GL_COLOR_BUFFER_BIT); glPushMatrix(); glColor3f(1.0f, 0.0f, 1.0f); glBegin(GL_QUADS); glVertex2f(0.0f, 0.0f); glVertex2f(128.0f, 0.0f); glVertex2f(128.0f, 128.0f); glVertex2f(0.0f, 128.0f); glEnd(); glPopMatrix(); glPushMatrix(); glColor3f(1.0f, 1.0f, 1.0f); glRasterPos2i(200, 200); glListBase(fontList); glCallLists(5, GL_UNSIGNED_BYTE, "Test."); glPopMatrix(); SwapBuffers(hDC); As you can see it's very simple and the only thing that it's supposed to do is draw a quadrilateral and draw the text "Test.". But the problem is that drawing a polygon seems to mess up any text operations I try to do after it. If I place the text drawing functions before the polygon, both the text and the polygon draw fine. Is there something I'm missing here? Edit: This problem only happens when the window is run in Fullscreen, by ChangeDisplaySettings. Any reason why this would be??

    Read the article

  • how to close ie8 tabs

    - by omair iqbal
    this code below is not closing tab in internet explorer 8 if i post wm_close command to Wnd it closes internet explorer but i want to close the current tab not entire 'ieframe' is FindWindowEX(Wnd , 0, 'Frame Tab', nil) supposed to retun handle to ie frame? if yes why is it not closing the current tab in internet explorer thanks in advance var Wnd,WndChild : hwnd; begin Wnd := FindWindow('IEFrame', nil); WndChild := FindWindowEX(Wnd , 0, 'Frame Tab', nil); postmessage(WndChild,wm_close,0,0); end;

    Read the article

  • Create window as child in third party application.

    - by Nathan W
    I'm trying to get my C# form to be parented correctly in a third party app, I have the handle to the control that I would like my form parented to but just can't seem to get it to work. I would like to create my form so that it is part of the MDIClient, handle 005E0ED6. Just like Window 01D7157D. Is this possible? If so can it be done in C#?

    Read the article

  • Create window as child in third party application.

    - by Nathan W
    I'm trying to get my C# form to be parented correctly in a third party app, I have the handle to the control that I would like my form parented to but just can't seem to get it to work. I would like to create my form so that it is part of the MDIClient, handle 005E0ED6. Just like Window 01D7157D. Is this possible? If so can it be done in C#?

    Read the article

  • The Coolest Parts of Windows API

    - by Andreas Rejbrand
    I have noticed that there are quite a few community wikis about "Tips & Tricks" or "Hidden Features" in programming languages and APIs here at Stack Overflow. But I could not find any about my own personal favourites: Win32 API and Delphi. Therefore I start my "own" CW about Win32 API. There are (at least) two kinds of Win API users: those that have been brought up using Windows API in C/C++, and those that have been brought up using some level of abstraction above the Windows API. I belong to the latter category, being brought up using Delphi's VCL. But over the last five years, I have become increasingly interested in the underlaying API of the Windows operating system, and today I work a lot with it. Depending on which category a programmer belongs to, he (or possibly she) will think that different things are "cool" in the Windows API. For instance, whereas a VCL-brought up developer might think it it very cool to var errIcon: HICON; begin errIcon := LoadIcon(0, IDI_ERROR); DrawIcon(Canvas.Handle, 10, 10, errIcon), a programmer brought up using Windows API in C will not be as impressed. But no matter how you are "brought up": what are the coolest "tricks" in Windows API? I start by listing a few of my own favourites, some of which are more "cool" than "useful", though: LoadIcon and MessageBeep can load/play system default icons and sounds. Open the CD tray: mciSendString('Set cdaudio door open wait', nil, 0, 0); Fade out the screen (Windows Vista and later) and turn of the monitor: SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 2); GetWindowDC(GetDesktopWindow) returns the DC of the desktop.

    Read the article

  • Fake Shortcuts in Windows - Is there an API? One for C#?

    - by tyndall
    I'm not sure what they call the fake shortcuts you often see in Windows now. A good example would be the link to any of the Office 2007 programs. You can tell one of these from a regular shortcut because the Target is grayed out and is not a real path. Can you access these through a .NET API? Like ask for the target? or get any of the information stored within it. I think these are somehow related to Windows Installer and Advertised programs.

    Read the article

  • GetVersionEx Not Working on Windows 7?!

    - by Andreas Rejbrand
    On my Windows 7 system, the GetVersionEx Windows API function returns "6.0", indicating Windows Vista, when it should return "6.1". If it matters, I used the following Delphi code: function winver: string; var ver: TOSVersionInfo; begin ver.dwOSVersionInfoSize := SizeOf(ver); if GetVersionEx(ver) then with ver do result := IntToStr(dwMajorVersion) + '.' + IntToStr(dwMinorVersion) + '.' + IntToStr(dwBuildNumber) + ' (' + szCSDVersion + ')'; end; and the string "6.0.6002 (Service Pack 2)" was returned. Isn't this highly odd?

    Read the article

  • RegRestoreKey problem

    - by Xaver
    i want to do part of program which save and load some data from registry. Saving is succefuly working. I have function GrabPrivilage to grant some privilegies to my thread. i grant SE_RESTORE_NAME and SE_BACKUP_NAME to my thread and after that i call RegRestoreKey(HKEY_LOCAL_MACHINE, TEXT("C:\reg.txt"), REG_FORCE_RESTORE ); and it always return ERROR_ACCESS_DENIED.

    Read the article

  • Programatically check whether a drive letter is a shared/network drive

    - by Philip Daubmeier
    Hi SO community! I searched a while but found nothing that helped me. Is there a way to check whether a drive letter stands for a shared drive/network drive or a local disc in python? I guess there is some windows api function that gives me that info, but I cant find it. Perhaps there is even a method already integrated in python? What I am looking for is something with this or similar behaviour: someMagicMethod("C:\") #outputs True 'is a local drive' someMagicMethod("Z:\") #outputs False 'is a shared drive' That would help me as well: someMagicMethod2() #outputs list of shared drive letters Thanks a lot in advance!

    Read the article

  • API to set credentials for wired 802.1X in Windows

    - by crimsonbloat
    Hello, Is there any API to set user credentials programmatically for a wired 802.1X profile in Windows Vista/XP SP3 ? The corresponding API for wireless is WlanSetProfileEapXmlUserData (...) or WlanSetProfileEapUserData (...). Can the same functionality be achieved for a wired 802.1X profile is some way ? Thanks, crimsonbloat.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >