winapi

Problem with omp_set_num_threads called from a WinAPI thread

I've run into a funny problem using OpenMP v2 under MSVC 9 SP1. when calling omp_set_num_threads from the main thread of execution then using omp_get_num_threads to check the amount set, all works well and checks out. However, in an GUI app, I call the same thing, but its own thread(created with CreateThread), to prevent the UI from be...

CopyFileEx in windows 7

Hi to all. I'm trying to use function CopyFileEx from kernel32.dll in Windows 7 using .NET interop. MSDN says: If lpProgressRoutine returns PROGRESS_STOP due to the user stopping the operation, CopyFileEx will return zero and GetLastError will return ERROR_REQUEST_ABORTED. In this case, the partially copied destination file is left inta...

Progressive disclosure control

In the windows API, how do I implement a Progressive disclosure control? ...

Customize Title Bar (Colored,Text,icon etc) in dialogBox foe WinCE 6.0

Hey i am new bie in winCE and working on 6.0 version, is there anyway to change the look and feel of dialog title bar in wince , i have tried with WM_NCPAINT message but it is not there in wince.... So is that any other way to do the same...?? Thanks, Mukesh ...

MIB_IPFORWARDROW metric(s) vs. ROUTE's

In the Windows command line, the 'ROUTE PRINT' command yields a tabular list of entries, with a single column labeled 'Metric'. In the Windows Platform SDK, you can fetch the same values (more or less) via the API, through the structure MIB_IPFORWARDROW. I can correlate most of the fields in MIB_IPFORWARDROW to the one's in ROUTE PRINT'...

Did MS change something about keyboard hooks in Windows Vista or 7?

I've implemented keyboard hooks in several languages (AutoIt, C#) using SetWindowsHookEx and WH_KEYBOARD_LL. I also know of a couple of C++ programs that have the same issue. I didn't post any code because they work perfectly in Windows XP. However, under Windows 7, at some point the hooks become "unloaded" or stop processing any furt...

how to acquire list of notification area icons?

i'm attempting to get code to list of all icons visible in the notification area, to the left of the time. i've been experimenting with EnumDesktopWindows and GetWindowLong, without finding any way to single out the system tray icons. thanks! ...

How can I use Perl to test for Win32 group membership when group contains nested groups?

I'm trying to use Perl to determine if a Windows users is a member of a Windows group, if the the group contains nested groups. I've tried using Win32::NetAdmin::GroupIsMember(), but it only works if the user a direct member of the group. I'm not a AD or LDAP expert, but the examples I googled for exhibit the same behavior. For exampl...

c++ directx muliti textures

How can I set set more than one texture on a cube like the front of the cube has different texture from the back of it.... I tired to use the stages but it didn't work. for example, if i wanna make a dice i would have top would be 1 side be 2.............. D3DXCreateTextureFromFile(d3ddev, //Direct3D Device ...

WinAPI Double-buffering

A default winAPI application does not have double-buffering. Instead, it does a very, very good job of ensuring that only what needs to be drawn is drawn, and that gives it a seamless appearance. However, when you resize the window, the entire thing needs to be redrawn, and this causes flickering between the controls, the background on t...

Strange winAPI behaviour

I have sub classed a tab control to give it a background. I have used the clipping functions to clip the drawing area to the update region. This works, except for when I move the window of the screen and back again. When it does this, it occasionally sets the clipping region to the whole screen. This is fine except that none of the cont...

EMR_EXTTEXTOUTA get text Windows API

HI guys, using EMR_EXTTEXTOUTA record, how can I use this to convert or retrieve and ASCII text string? i'm basically just going over this: ENHMETARECORD * pEmfr ; pEmfr = (ENHMETARECORD *) malloc (pEmfRecord->nSize) ; CopyMemory (pEmfr, pEmfRecord, pEmfRecord->nSize) ; if(pEmfr->iType==108) I'm kinda lost atm on how to get the "...

Subclassing tab control

What is the proper way to subclass a tab control in winAPI, having windows perform both the default drawing and your own. Because BeginPaint() and EndPaint() are calling within the default proc, I don't see a way to do this. I did get it working with GetDC(), but it had a very bugs which annoyed the hell out of me. If what I am asking i...

What will prevent LVN_ITEMACTIVATE from firing?

Hi, I am writing an app with raw windows API (opensource Win32++) where I have a ListView. The problem I have now is that whenever an item in the ListView is clicked, the system/app will generate a warning tone/sound "ding". Furthermore, I noticed I cannot get the LVN_ITEMACTIVATE through item-dbl-click or item-keypress-enter, which wo...

C++ #include <atlbase.h> is not found

When I compile my program it says that it can't find atlbase.h. Am I missing some SDK or something? ...

c++ 'CA2W': identifier not found

why do i get 'CA2W': identifier not found for(DWORD i = 0; i < numMaterials; i++) // for each material... { material[i] = tempMaterials[i].MatD3D; // get the material info material[i].Ambient = material[i].Diffuse; // make ambient the same as diffuse USES_CONVERSION; // allows certain string conve...

Delphi: Is system menu opened?

Hello. I Delphi, I need a function which determinates if the system menu (resp. window menu, the menu that appears when the icon is clicked) is opened. The reason is that I am writing a anti-keylogger functionality which sends garbage to the current active editcontrol (this also prevents keylogger which read WinAPI messages to read the ...

c++ directx 9 mesh texture

ok so i can load a mesh perfectly but loading its texture is not working. im not sure what im doing wrong. here is my code.. //render a single frame void RenderFrame(void) { d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0); d3ddev->Clear(0, NULL, D3DCLEAR_ZBUFFER, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0); d3...

Win32 listbox not updating immideately after LB_ADDSTRING message

OS: Win7 list box is not updating its region after SendMessage(hwndListData, LB_ADDSTRING, 0, (LPARAM) szListMainBuffer); If mouse cursor is hovered over blank line that should contain text from szListMainBuffer, and clicked, text appears. I have tried using UpdateWindow(), InvalidateRect() functions targeted at hwndListData and pare...

How can I tell if the mouse is over a top-level window?

How can I efficiently tell if the mouse is over a top-level window? By "over", I mean that the mouse pointer is within the client rectangle of the top-level window and there is no other top-level window over my window at the location of the mouse pointer. In other words, if the user clicked the event would be sent to my top-level windo...