handle text

2410 byte By wheelie at 2007-11-20 8:13:08
in the callback function, which case is used to change the window text?i have an opengl app, and would like to display the framrate in the app top tab, is there some sort of case WM_UPDATE or somthing, i couldn't see anything, but the winapi code is so huge, im lost when i try to find somthing,...

Paint a rect

248 byte By iwtbapd at 2007-11-20 8:13:24
When i paint rect, i have a problem (image)<br/>The last rect cover the previous rect. So,how to solve this problem?<br/>Anyone here can help me ?<br/>Waiting for ur help . Thank so much !<br/> http://www.Photo-Host.org/view/897022untitled.jpg

Edit control problem

313 byte By Rixx at 2007-11-20 8:13:40
How can I make an edit control perform some action when the user presses the Enter key? I tried WM_KEYDOWN but it doesnt seem to process - I'm guessing the WM_KEYDOWN is actually sent to the edit control and not the window the control is in. I'm not sure how to implement it processing EN_U...

Disabling re-sizing of the window

298 byte By chrishowarth at 2007-11-20 8:14:28
Hi ~<br/>I'm just finishing off my application, and as it is very small and compact I want to disable the re-sizing of it. I there a Window Style? I couldn't find one. Or is there a piece of code for the WM_SIZE event? Please help.<br/>Thanks;<br/>~ Christopher Howarth

cannot convert from const char [9] to LPWSTR

706 byte By gongchengshi at 2007-11-20 8:14:58
I grabbed this code from a tutorial that I found here: http://www.codeproject.com/system/windows_nt_service.aspWhen I compile this code in MSVC++ 2005 express I get the following error.SERVICE_TABLE_ENTRY DispatchTable[]={{"Service1",serviceMain},{NULL,NULL}};error C2440: 'initializing' :...

EnumDeviceDrivers issue on x64

406 byte By robertbacs at 2007-11-20 8:14:59
I'm writing an application to enumerate all device drivers, I've used a sample code from MSDN (see attachment), on x86 everything working fine, but on x64 the EnumDeviceDrivers function fails with error code 0x8 (ERROR_NOT_ENOUGH_MEMORY), tried to increase ARRAY_SIZE, same problem. It work...

problem with mousehook

1270 byte By flynny1st at 2007-11-20 8:15:49
hi,i've created a mousehook for a window i've created using the following code ButtonWND = CreateWindowEx(WS_EX_LEFT, className, butText, WS_CHILD, atoi(xVal), atoi(yVal), atoi(width), atoi(height), currentWND, NULL, currentHInstance, NULL);ShowWindow(ButtonWND, SW_SHOWDEFAULT);HHOOK_...

Problem with systray code

3860 byte By martinss at 2007-11-20 8:16:02
Hello, i have this problem:when click with mouse in "X" of window the program not close, program minimize in systraywhy?#include <windows.h>#define WM_NOTIFYICON 11#define WM_EXIT 12#define WM_CLICKHELLO 13NOTIFYICONDATA TrayIcon;HINSTANCE hinst;LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPA...

Automate App in Non-Interactive Desktop ?

1344 byte By quantass10 at 2007-11-20 8:16:17
I'm in a situation where I need to launch a new process then automate it to navigate its single menu and thru a file dialog. The main application to launch the new process and automate it needs to be able to wake up during a specifc web request (web app initiated) or act as an always waiting /...

Check if a Registry Value exist?!?

261 byte By S-I-B at 2007-11-20 8:16:22
hi All..<br/>i was wodering of the way to check if a value in the registry like if this key exist or not:<br/>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion<br/>with the Value "AnyValue"<br/>i searched google but didn't find anything..:(

Reading from registry? (a question)

700 byte By S-I-B at 2007-11-20 8:16:41
hi all :DI searched google on how reading from registry and i have found this codeint main(){ char buffer[500]; unsigned long size = sizeof(buffer); DWORD type; HKEY hKey; RegCreateKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Visual Basic 5.0",&hKey); RegQueryValueEx(hKey,"Version",NULL,&type,...

Buttons!

2425 byte By X-ed_Out at 2007-11-20 8:17:05
Hi, I'm having a little trouble with buttons... I'm still new to windows prgraming and so on and I think that I'm probably doing something wrong, so what I want to do is the following:1- create a button with a certain text (DONE)2- when the user presses the button, it's text chan...

Handle for WINAPI Dialog

4910 byte By sittingDucks at 2007-11-20 8:17:40
Hello All,Im trying to show a result from a FORTRAN program with a WINAPI dll. This dll is a Dialog Dll. Fortran will send a String, which i want to show on a WINAPI Listbox.The Calling-Convention, Dll-Initiation, and showing String per "printf" is succesfully done. But as im trying to write the Str...

System password

379 byte By Jacko123 at 2007-11-20 8:18:18
Hi guys,How do I access system( windows/ linux ) user's password? After the user has logged in, I want to access user's system password and SET that password to my application's textEdit.I dont want to modify the password but just access it and SET it appropriately.Is there any functi...

System Service to Spawn Client Apps

1486 byte By wildfire99 at 2007-11-20 8:18:30
I have a monitoring app that can be run by any user on the system, and set to monitor the output of an outside server. What I need to do is to ensure that these client 'monitor' apps (with extensive user interface components) are running 24x7, for each user that has installed it.To that en...

Vss_e_no_snapshots_imported

802 byte By fuzi at 2007-11-20 8:20:08
Hello,I am developing Vss hardware provider on Windows Server 2003. It is building by VS 8.0 and running as a service.In GetTargetLuns, the target's VDS_LUN_INFORMATION fields are filled, disk-signature is set to Guid Null as recommended in the MSDN.In LocateLuns, the target is exposed to the s...

Named pipes

531 byte By hansipet at 2007-11-20 8:20:13
Hello,I have a question regarding to named pipes. I want to make a log application which sends the log data over named pipes. Now I have searched in the msdn documentation, but I'm not sure if the WriteFile functions takes care that the whole message is written to the pipe before the next Write...

Distinguishing child windows

811 byte By flynny1st at 2007-11-20 8:20:22
Hi,I've added my own button to a window in an external program. This is working fine. However the problem is because this window contains child windows my button is diffucult to access as it is drawn underneath the child windows.seeing this, i then decided to EnumThreadWindows on the hooked win...

Win32 DialogBox and IP Address Control

571 byte By MAMEman at 2007-11-20 8:20:25
Hi ALL,A big hello to everyone on dev-archive.com. This my first post so please be gentle with me!. OK, my problem is that I'm using a standard Win32 dialog box which contains an IP address control. But the problem is that the IP address control is not showing up in the dialog. I've c...

EnumChildWindows function help

892 byte By flynny1st at 2007-11-20 8:20:44
Hi,I've trie the following code but i cannot hook into the childwindows of a program i have hooked into. Basically I have managed to hook into a window and i want to enumerate the windows. When i find the window i want i will add a new window (BUtton) to that child window.the code is childWND =...

Z ordering in CreateWindowEx

358 byte By flynny1st at 2007-11-20 8:21:55
Hi can anyone help me.I've added a window (button) to an external program. The proble is it is usless at the moment as it appears beneath the other child windows on the hooked window. I'm detecting and ading the button the WM_CREATE mesage. Is there anyway I can specify it to be draw at th...

entering wndprocess

625 byte By wheelie at 2007-11-20 8:22:21
When debugging, and i come cross a line such asUpdateWindow (hwnd) ;which will send a paint message, when debugging, even if i press f11 (step into), debug, does not go into wndprocess. Is there a way of debugging where it also steps through the cases in wndprocess when their called?the only way i c...

How to get the global groups members which are nested groups?

1025 byte By theodorei at 2007-11-20 8:22:26
Hi there,Here the set up: on MS Windows 2003 is running primary domain controller (PDC)in native 2000 mode and with in the domain is created a G_GS domain group. The group is identified by windows like 'Security Group - Global'. G_GS group has a few members: nested groups ( global security...

Getting the GUID of an audio device

222 byte By sockman at 2007-11-20 8:22:46
Hey all,<br/>Is there any function to get the GUID of a wave device? For example using something like:<br/>waveOutMessage (deviceid, [DRV_QUERYDEVICEGUID], dwParam1, dwParam2);<br/>Or any other way...<br/>thanks.

How i can to get HASH of password and user name of window use visual c++

94 byte By trongdu at 2007-11-20 8:23:21
Hi all.<br/>Can you help me?<br/>How i can to get HASH of username and password in visual c++.

Hook Procedure not working when window is minimized

948 byte By jayapalchandran at 2007-11-20 8:23:36
Problem : my hook procedure is not working when the main window losts focus or minimized...description:i have written a global hook procedure to track the keystrokes. the hook procedure resides in a dll and i am calling it from the main window. from the dll i am displaying the keycode using a messag...

Colors for Buttons, Edit controls, dialogs and etc

231 byte By jayapalchandran at 2007-11-20 8:23:40
just want to know how to hangle colors for various controls in win32 api... i am not getting it to the right place... examples or internal and external links may help... how to color the foreround and background of any window ? ...

Advancing process privilege level

356 byte By genossa at 2007-11-20 8:24:05
Hello everyone!My Vista service starts a process in the session of the active console user. Is there a way to give this process all the privileges that the parent service has?Note: The process should run in the active user session with the corresponding session id (in order to interact with the desk...

How to disable command button in a non-MFC application

1095 byte By asantoni at 2007-11-20 8:24:10
Hello all,I am stuck with this problem: I have a simple non-MFC application using a dialog. The dialog is handled by the usual CALLBACK dialog procedure. The dialog contains a button, initially disabled, which I would like to enable based on certain conditions. Now, how do I do that?If it was an MFC...

How to learn MFC

100 byte By walterwong522 at 2007-11-20 8:25:39
How to learn MFC<br/>I want to write GUI software <br/>I should use MFC or other(delphi , vb)

WSAsyncSelect for no-windowed applications

231 byte By danterob at 2007-11-20 8:26:50
My application just runs on backgroud and I don't want to show any windows. how can I use WSAsyncSelect?<br/>Myabe I could create an hidden window (if it is possible), but I would prefer to have a better solution if it exists.

I create a Property Sheet ,but cant close it.

1957 byte By Win32Fan at 2007-11-20 8:27:27
I create a Property Sheet ,with PSH_MODELESS |PSH_NOAPPLYNOW style. It has two pages . Note pfnDlgProc :BOOL CALLBACK PageProc_0 (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) // PageProc_1 is similar { switch (uMsg) { case WM_INITDIALOG: return TRUE; case WM_COMMAND:...

Starting out with WinAPI

836 byte By broof at 2007-11-20 8:28:33
So I'll start with my background:I have a couple years' experience working with c++ console applications. My only experience in doing GUI work was with a little tic tac toe game I made using Qt in Linux. I'd like to be able to make some windows programs with GUI's, but I'm n...

RECT: Unknow identifier

508 byte By chrishowarth at 2007-11-20 8:28:54
Hi ~I'm writing a small program which extends the features of MS Notepad. I am having a little problem trying to get the rich text box to grow with the window when expanded. I am following theForger's WinAPI tutorial. Before WinMain I declared a RECT to hold the client area size, or som...

Detecting WA_ACTIVE

860 byte By flynny1st at 2007-11-20 8:29:03
Hi,I'm having a problem detecting the WA_ACTIVE event.I have an event hook on a program and i want to detect when it is activated and then do my stuff accordingly.i can detect the WM_ACTIVATE message (i've tested this), but can;t filter any of the WA_ACTIVE ro WA_CLICKACTIVE messages. am i...

writre bitmap file

214 byte By iwtbapd at 2007-11-20 8:29:07
I have captured the screen and copy the image to clipboard.<br/>Now, i want to write the image from clipboard to bitmap file.<br/>but i don't know how to write a bit map file, any suggestion for me,.please??

find a window at x, y, z

220 byte By flynny1st at 2007-11-20 8:31:59
Hi,<br/>Is it possible to grab hold of a window at coordinates x, y ( and possible z?). I'm not too bothered about the z values of the window as its going to be the top most window anyway.<br/>Thanks Matt.

Disabling Resize on existing window

1408 byte By flynny1st at 2007-11-20 8:32:31
Hi all,i want to stop users resizing and maximising a particular window i have hooked into using SetWindowLongLONG test = SetWindowLong(pCwp->hwnd, GWL_STYLE, WS_OVERLAPPEDWINDOW & ~(WS_THICKFRAME));however even though i'm getting a return value i can still resize, maximise, etc. am i doing...

Desktop Screen Capture

364 byte By Laxmi Narasimha at 2007-11-20 8:32:33
Hi All,I am writing an application to record the Desktop Screen for certain period of time. It should be stored in format of type multimedia data. On research i came to know that , I should make use of AVI APIie., AVIFIleStream etc., Do i am on right path.Can any one help me to get this done.Thanks...

[RESOLVED] LoadLibrary, FreeLibrary & Threads

191 byte By pupito at 2007-11-20 8:32:54
I must have N worker threads that call LoadLibrary("my.dll") do some stuff with a function exported by this DLL and call FreeLibrary. Is safe to call Load/Free Library in this way & scenario?

regular expression

182 byte By amir_civil at 2007-11-20 8:34:46
hi everybody<br/>i have 2 question<br/>1:how to use regular expression in c++?(are exist class about regular expression?)<br/>2:i have c# dll how to load it in c++ project?

Intercepting i/o calls on a CD

1135 byte By rbasu at 2007-11-20 8:35:17
Hi,Please see if you can help me out on this.I have a CD that contains files (doc, xls, htm etc.) pre-encrypted with a program written by me. If someone simply inserts the CD and reads the files in Word, Excel or IE, he gets encrypted garbage.I want the user to always access the proper content of th...

Window that contains caret

363 byte By visharad at 2007-11-20 8:35:28
I want to find out the handle of the window that contains caret. I first thought that GetFocus gives this value. But in Microsoft Word, if you press Alt key, then GetFocus gives handle of menu bar but caret is in the document area. In this case, I want the handle of the document area.Let me know how...

Converting to Unicode

8485 byte By links at 2007-11-20 8:35:43
I am having trouble converting a sample Win32 app to be Unicode compatible. Here is the original code (which compiles under Multi-byte setting):Header:#if !defined WINNIE_H#define WINNIE_H//-----------// winnie.h// (c) Bartosz Milewski, 1995, 97//-----------#include <windows.h>// Forward dec...

Tracking crashes and asserts

511 byte By KPexEA at 2007-11-20 8:37:10
I'm looking for a code strategy to trap crashes and asserts and either email or post the relevant information to a URL ( or just generate an error file and send it the next time the program is run). This would be generated from a debug build so relevant items like a breakdown of the call-stack...

How to know if we can type in a window

458 byte By visharad at 2007-11-20 8:37:20
There are some windows which are such that if we press a key, then no text appears on screen. Example: menu bar. When focus is on menu bar, then on pressing a key, the key does not appear on screen. Rather, the key may act like a shortcut.On the other hand, there are some windows on which we can typ...

Automation problem

349 byte By EgonVal at 2007-11-20 8:38:05
Hi,I'm creating a program where I use Word as a an editor.My app catches several events from Word (Close,Save,...), but I need to be able to wait my app until the user has closed Word (I'm minimizing my app to the tray,where it has to wait until Word is closed).Does anyone have an idea on...

SliderBar problem

1279 byte By scody at 2007-11-20 8:38:11
Hi,I am new to windows programming. In my code I would require to change the slider bar position (I am actually invoking the sliderbar from UI using win32 API, so I donot have source code of the application), which I have accomplished by sending message.::SendMessage( aControlHWnd, TBM_SETPOS, (WPAR...

changing appearance of button class

253 byte By flynny1st at 2007-11-20 8:38:28
hi, <br/>is it possible to subclass or create a new class for a button and apply this using createwindow? if so how do i go about doing this?<br/>ideally i would like to add the window (of class button) and change the font, etc.<br/>Matt.

DShow Audio Video Capture

254 byte By bidesh at 2007-11-20 8:38:41
hi all,<br/>i have developed an audio video capture application using Dshow and C++. but i can save the captured file as avi format. <br/>i can send the filter graph. can any body tell me how will i save in mpeg format. <br/>thanks, <br/>bidesh