Using _CrtSetDbgFlag in DLLs..

740 byte By Dooz at 2007-11-18 1:08:23
Hi!I'm getting reports of memory leaks (using _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ) ), in a project at the moment, but I'm not entirely sure that I'm to blame.I have an .exe file and a DLL (both using the CrtSetDbgFlag), and I'm using the Multi-Threaded D...

Unsolicted radio button WM_COMMAND

1158 byte By Gyannea at 2007-11-18 1:08:36
When I open a modeless dialog box with radio buttons I get a WM_COMMAND message sent to the dialog box from one of the radio buttons even though no user action (except to start the dialog box) has been taken. This message only appears when the checked radio button is not the 'first' in th...

StretchBlt slower than StretchDIBits on shrinking

915 byte By lauti at 2007-11-18 1:09:15
I just encountered a curios phenomen regarding StretchBlt vs StretchDIBits:Blitting a DDB using StretchBlt is dramatically slower than blitting a DIB (of same size) using StretchDiBits. Color depth of my screen was 32Bit as well as 16Bit on testing. Color Depth of the used DIB was 8Bit as well as 24...

Remote Terminate/Run exe

421 byte By penina at 2007-11-18 1:09:39
Hello.I want to start running an exe on a remote PC. I found a way to do that with sa.exe (ITaskScheduler interface). Is there a different way? more direct? (without having a "deamon" server on the remote PC that listens to messages and runs the desired exe).How do I terminate an exe that runs on a...

Programming for terminal server

196 byte By aib at 2007-11-18 1:09:53
Hello<br/>Help me please<br/>I want to get sessions list, IPs and user's names of active users in terminal server (win2000).<br/>What lib and functions can I use for?<br/>belant@aport.ru

How to convert LPITEMIDLIST to CSIDL

398 byte By Robin Shalimov at 2007-11-18 1:10:03
Hi!Could somebody please help...I have an LPITEMIDLIST returned by ::SHBrowserForFolder().If it's not a virtual folder, I use ::SHGetPathFromIDList() to get the path.But if it IS a virtual folder, the above-mentioned func returns an empty string.How can I get a pathname to a virtual folder retu...

read a file

708 byte By filthy_mcnasty at 2007-11-18 1:10:14
does anyone know how to read a file line by line using win32?i know how to read them line by line using regular c++ and stuff like fstream but i'd like to avoid that in my win32 application if possible.i also know how to use the ReadFile() API but the problem there is that it reads in a certain...

Heres how to initialize radiobuttons and avoid polling

3034 byte By Gyannea at 2007-11-18 1:10:34
I am sure there is a more elegant and even correct way to accomplish this task but I wanted to do two things:First, when I enter a dialog box with several groups of radio buttons, I want the radio button to be checked that corresponds to the current value of the program variable that is being contro...

catch system wide mouse click event in DLL

463 byte By oob2 at 2007-11-18 1:10:47
Hi, How to catch system wide mouse click event in a win32 dll (non-MFC dll)? I want to have a win32 dll, and in this dll, I'll have one function exported (let say "WaitForClick()", so, my EXE will call this function. In this WaitForClick() function, I'll start waiting for a mouse click (sy...

SetFileSecurity() API error

182 byte By zama at 2007-11-18 1:10:57
When i call SetFileSecurity() API in my application,<br/>there's a error of 'ERROR_NO_SYSTEM_RESOURCES'<br/>(error code is 1450)<br/>How do i manage it?<br/>Thank you!

Window handle from Parent and ID

279 byte By teleplayr at 2007-11-18 1:12:45
I have a window that has a few different child windows. I have the HWND of the parent window, and the control ID of the child I'd like to get the HWND of. Is there a function that allows me to do this? The parent window is not a dialog box.<br/>Thanks,<br/>-Joe

DLL Injection and hooks

808 byte By teleplayr at 2007-11-18 1:13:14
Hello all. I have a dll which gets injected into a process and subclasses it's window procedure. Great! Now, I'm trying to make the same thing work for any windows with a caption in the system. g_hHook = SetWindowsHookEx(WH_GETMESSAGE, GetMsgProc, g_hInst, 0);In DLL Main, I'm doin...

MS Excel as OLE object

341 byte By Gnum at 2007-11-18 1:13:34
My OLE Container create an MS Excel Worksheet object inside and load the sheet from the file. It is working good (editing, formatting... as by user, so by my client program), but what about the &File menu of MS Excel... and general MS Excel threading? Don't you know why to say to Excel working...

List Control SetImageList fails

232 byte By jorgeri at 2007-11-18 1:15:11
I am writing a list control with an image list.<br/>Image List creation is fine, but when I send the LVM_SETIMAGELIST message to the control, the result is 0, (fails)<br/>Does anyone have any idea on why this is happening?

Error C0X32.OBJ

365 byte By wahyupamungkas at 2007-11-18 1:16:22
dear all,I want to ask about my first windows programmming. I face an error that always show up when the programing calls windows.hThe message of the error "Error : Unresolved external "_main" referenced from C:\BC5\LIB\C0X32OBJ"waht should I do to handling this error?I use Borland C++ 5.5.Thanks fo...

Ownerdrawn menu

119 byte By Stefan D at 2007-11-18 1:16:34
How do I do this without MFC? I've found lots of examples, but all these uses CMenu.. <br/>Thanks in advance!

Array

831 byte By Taggi at 2007-11-18 1:17:01
Hello.I have a problem with arrays... well surprising isn't it? *g*I have declared a struct with 5 member variables.Now I created an Array of this sruct with 5 Objects of this struct.Later I want in my programm to copy this 5 objects into another array, which is an array of this struct too.Now...

showing bitmaps on full screen

263 byte By Zegrin at 2007-11-18 1:17:08
I want to show bitmaps in fullscreen mode not in a window and i have no idea how to do it . I tried to do it in many ways but nothig seems to work fine . I'm not using DirectX. The program is dialog-based so dialog boxes must apear on this bitmap :confused:

SOCKET: WSAAsyncSelect()

516 byte By RockNix at 2007-11-18 1:19:05
WSAAsnycSelect() requires a handle to a window which will receive incoming network-events.i wonder how to handle this if there is no valid window handle and no window-proc ... for example in console applications.in that case i tried to create a "dummy" window to handle the events returning from sock...

Changing Display Configuration

637 byte By Gervais at 2007-11-18 1:19:08
Hi,I am mot a C developer, but I try to write little program that change display configuration settings. I use Win32 API Function: ChangeDisplaySettings . The return code is SUCCESSFULL but nothing changes on my computer! Someone have an idea?DEVMODE DevM;int RetCode;DevM.dmSize = sizeof(DEVMODE);D...

Wm_windowposchanged

114 byte By Sharoon at 2007-11-18 1:19:49
Is there a way of blocking WM_WINDOWPOSCHANGED/WM_WINDOWPOSCHANGING to be posted to the window?<br/>- Sharoon

VB made dll in win32api code

105 byte By sreejithps at 2007-11-18 1:20:04
hi <br/>is it possible, or how can i call a vb made activex dll in a win32api made program.<br/>thank you

Remote file transfer

207 byte By cabasm at 2007-11-18 1:20:31
I have a DCOM server running on a machine and a client that uses the server services running on another machine. How can I transfer a file from the server machine on the client machine using the DCOM server?

Error C2065

632 byte By hinksj at 2007-11-18 1:20:32
I'm try to use SendInput();Defined in Winuser.h and windows.hThe Visual Studio NET (text editor) finds the related defines and function definitions but the compiler can't.Help states that this error may be caused by using SDK headers.I have included the INCLUDE path:C:\Program Files\Micros...

Hiperlink inside a Dialog

241 byte By DorianS at 2007-11-18 1:20:37
Hi,<br/>I use SDK, not MFC, and I'd like to write a text in a dialog resource. I need that text to be of hiperlink type, so<br/>that I can open to a link when I select it .<br/>Have anyone a hint?<br/>Regards,<br/>DS

Screen coordinates as the tool tip

167 byte By sreejithps at 2007-11-18 1:21:17
hi <br/>could any body give me a piece of code which shows the screen cordinates of a window as the tool tip at the mouse position where the mouse is on.<br/>thank you

plz do melp in vc++ without MFC

297 byte By arpit jain at 2007-11-18 1:22:07
plz do help in vc++ without using MFC <br/>hello to all,<br/>i'm making a simple program to demoonstrate a menu. but i'm unable to make a resource file and also to compile it,as described in "Windows 98 programming 'From the ground up' By-Herbert schilt".<br/>thanks,<br/>arpit

resource file in menus(vc++/without MFC)

304 byte By arpit jain at 2007-11-18 1:22:12
plz do help in(menus) vc++ without using MFC hello to all,i'm making a simple program to demoonstrate a menu. but i'm unable to make a resource file and also to compile it,as described in "Windows 98 programming 'From the ground up' By-Herbert schilt".thanks,arpit...

TreeView Control - Save all items and subitems??

204 byte By TheChrisK at 2007-11-18 1:22:49
Hello, i habe a problem with my program. I use a treeview control and have some items AND subitems. Now i want to write a function, which saves all my items and the subitems! Any ideas, how i can do that?

Listbox with icons

225 byte By tilli at 2007-11-18 1:23:16
Hey everyone!<br/>How is a win32 api listbox with icons done? I know it's something about owner drawn listboxes, but I need to know the steps to consider! Has anyone a link to a tutorial or something?<br/>tilli

system error messages

567 byte By stober at 2007-11-18 1:23:18
Anyone know where system error messages are stored? When you call FormatMessage with an error number returned by GetLastError() where is the text of the error message stored on the computer? The reason I'm asking is because my MFC program is producing an error message which I cannot locate in...

WebBrowser control

395 byte By Michalek at 2007-11-18 1:23:22
I have to place IWebBrowser control in my SDK app. i havent any clue how to do it without MFC. Do you knowy any resources about creating step-by-step your own COM container?I tried with MFC by creating Web View on top of my app, but there were some problems.I have searched the web, but there were on...

Messages

623 byte By Taggi at 2007-11-18 1:23:37
Hello.I am trying to catch a mousewheelmessage, but unfortunatally my debuger says WM_MOUSEWHEEL is unknown.In another thread it was proposed to use WM_VSCROLL message, but when I use the wheel it does not respond on it.In MSDN-Online it is declared in Winuser.h and included with Windows.h, but all...

NetMeeting

1190 byte By Caprice at 2007-11-18 1:24:52
Hi,1. Using one of the known examples (I think avphone3) I created a window for the NetMeeting and the life looks perfect :) - the video picture takes full size of the created window. And that doesn't depend on the window size - the video takes the whole window. But on another computer with ano...

reading boot sector of CD-ROM

169 byte By spatnaik at 2007-11-18 1:25:05
hi<br/>How to read the boot sector of a CD-ROM.<br/>And how write back the modified boot sector to the CD.<br/>Is there any sample. <br/>thanks<br/>-Espee

UpdateResource sample for string table

569 byte By zebbedi at 2007-11-18 1:25:40
Please could someone provide me with a working sample of using UpdateResource on the string table of an external exe app. Ive read several articles from MSDN in regards to string table blocks containing 16 strings etc, and allocation of the string, however no matter what i try i always seem to eithe...

ShellExecuteEx

297 byte By r-22 at 2007-11-18 1:26:01
I want to ShellExecuteEx the program cmd.exe on my system with my own program and have it redirect all input and output form cmd.exe to my application instead for processing and displaying. Is this possible with ShellExecuteEx and if so, what do I need to do or read about to learn how to do this?

winapi closing a window without quitting

338 byte By graphicsMan at 2007-11-18 1:26:05
Hi All -Question: How do I close a window without quitting the application?For instance, I would like to handle the WM_CLOSE message, but then have everything continue as normal.Right now, I handle the WM_CLOSE message, but then the WM_QUIT message is generated automatically :(Thanks, Brian...

Dialog BKGnd!

494 byte By leoleo at 2007-11-18 1:26:47
Hi All, I am changing the dialog bkgnd color using CreateSolidBrush(...) and returning the brush from WM_CTLCOLRDLG message handler. The program is in Win SDK. My problem is I cant change the bkgnd color of the controls in the dialog window; for eg static, slider etc. In MFC overriding the WM_CT...

Commtimeouts

510 byte By gadi at 2007-11-18 1:26:55
I m tryng to write a protocol for RF Rx&Tx i got this timeouts: _COMMTIMEOUTS timeouts; // set its elements to required values timeouts.ReadIntervalTimeout = 0xFFFFFFFF ; timeouts.ReadTotalTimeoutMultiplier = 0xFFFFFFFF ; timeouts.ReadTotalTimeoutConstant = 1000 ; // with above values gives ef...

Menu

811 byte By Bengi at 2007-11-18 1:27:27
heya,doesnanyone knows/have an source-code for inserting bitmaps into an menu item ?my menu has been created via the resource and i use :HMENU hMenu = LoadMenu (NULL, MAKEINTRESOURCE (IDR_SECTION));HMENU hPopupMenu = GetSubMenu (hMenu, 0);POINT pt;HBITMAP hMenuItemBitmap;hMenuItemBitmap = LoadBitmap...

serial comm using ClearCommError

134 byte By gadi at 2007-11-18 1:28:25
Doed anyone have any example of serial comm using ClearCommError -without any use of COMMTIMEOUTS ?<br/>or any other way ?<br/>Thanks,

How to auto-close inactive Internet Explorer Window

533 byte By guojinwen at 2007-11-18 1:28:28
I am writing a program to auto-close Internet Explorer (IE) session if there are no activities for a certain period.I got 2 problems.1. Can not close the IE Window.I am using EnumWindows to loop through all the windows and get the handle to a IE, then I use "DestroyWindow(hWnd);" to close the IE. NO...

How to implement copying files with limitation speed transfer in kb/s?

561 byte By Luna at 2007-11-18 1:30:39
Hello. I need to implement copying files with limitation speed transfer in kb/s. Every task should be runing on single thread. I think that I should copy every file spliting them on a little parts and when speed is too fast suspend thread. I want to use CopyFileEx function, but I don't know...

detect C++ modem connections

283 byte By paolo75 at 2007-11-18 1:30:44
i am writing a program that will use a modem to send information over the net. how can set the program to detect any kind of connection and let the user choose one of them or if is there is no connection to create a new one ??<br/>the program i am using is Borland C++.<br/>Thanks

File sharing

215 byte By alek_rclub at 2007-11-18 1:30:49
Can't understand:<br/>CreateFile/RW,SHARE_READ,OPEN_ALWAYS<br/>all ok, then:<br/>CreateFile/R,SHARE_READ,OPEN_EXISTING<br/>with the same file<br/>result: ERROR_SHARING_VIOLATION<br/>???

SetJob Printer API not working

3933 byte By pradip_mondal at 2007-11-18 1:31:51
Hi,My objective is to send across ASCII text(data picked up from a file) to the Printer in Landscape Mode.For that i an using the Printing and Print Spooler Functions.OpenPrinter()StartDocPrinter()StartPagePrinter()GetJob()SetJob()WritePrinter()EndPagePrinter() EndDocPrinter()ClosePrinter()I need to...

Auto-update for Applications

1617 byte By mparadise at 2007-11-18 1:31:55
All - We have an application which has many (couple dozen) binary dependencies which are frequently updated, as well as the main application.Currently, the application shortcut actually launches an update script, which basically looks at local timestamp vs. timestamp for the same file on the file se...

Screen Dimmer

686 byte By Gyannea at 2007-11-18 1:32:13
Does anyone know the best way to dim the screen? What I have done now is to take all 24 system color values, save them, make a copy, and then decrease the color values for each of these system colors and call SetSysColors().It works, but it is very slow, as messages are sent to all the myriad of win...

how to catch VK_RETURN(Enter key) msg

432 byte By robinluobin at 2007-11-18 1:32:18
Hi I created a document based application use window programmingI mean not VC++. On the document view i created a edit boxand try to catch the VK_RETURN(Enter key) message.I don't know How? I used WM_CHAR in CALLBACK function, but it doesn't catch the Enter key message when I focused on t...