Shared pointers

688 byte By kylesBits at 2007-11-20 11:11:15
We need help!!! shared_ptr<vector<Alien>> mine; for(int i = 0 ; i <10 ; i++) { Alien alien (i,i); mine->push_back(alien); } vector <Alien>::iterator iter; int i = 0; for(iter = mine->begin(); iter!=mine->end(); iter++) { if (i == 3) { cout<< mine->at(i)....

Probelm with hooks in Vista

465 byte By nemok at 2007-11-20 11:11:26
Hello,I am using SetWindowHooksEx to record mouse and keyboard in both XP and Vista. the problem is that the function works on XP but return NULL in Vista and set GetLastError to 5 (Access denied). I have tried running As Administrator with no improvment. SetWindowsHookEx (WH_JOURNALRECORD, JournalR...

assembler designing in c

138 byte By bhaskar_goel at 2007-11-20 11:12:01
i have to design an assembler in C . can anybody tell me any good reference site for it?. i have to write a scanner,pass one,pass two code

Where is my WM_ENDSESSION?

485 byte By sockman at 2007-11-20 11:12:10
I have a problem. My program is hanging when a user attempts to end their windows session. This only occurs while my program is actively reading data from a pipe connected to a sound driver. Once the pipe is disconnected then it works properly. After a little bit of tracing, I found that my program...

A little positioning issue -

3144 byte By .pcbrainbuster at 2007-11-20 11:13:07
Sup guys,In the following code the program should simply make a cross over any window clicked, although it does that there is a slight problem; the lines start at the correct corners of the client area but end at the wrong and also the beggining positions are also wrong when the window is not maxim...

Mouse Power -

148 byte By .pcbrainbuster at 2007-11-20 11:13:08
Sup guys,<br/>This time I would like to know how to work with SetCapture and ReleaseCapture and would like a complete example.<br/>Thanks.

Working with bitmaps -

251 byte By .pcbrainbuster at 2007-11-20 11:13:10
Sup guys,<br/>Let me start by saying sorry because I don't get this at all and keep wasting your time :( Anyway the question is can someone please teach me step-by-step how to work with bitmaps from the beggining to the end?<br/>Thanks.

SystemParametersInfo

561 byte By ~Paul~ at 2007-11-20 11:13:44
From what have gathered, through testing and reading is that the use of the SystemParametersInfo API will only allow me to set Bitmap formatted pictures to the desktop. To set JPEG formatted pictures i am currently editing the registry (you'll be surprised how much control you have ;)) but i w...

screen BMP to window

117 byte By kilele at 2007-11-20 11:14:25
Hello,<br/>I want to capture the entire desktop window as a bitmap and paste it into another window. Please help

Win32 Function

253 byte By Donotalo at 2007-11-20 11:15:01
Given a folder path in hard disk, I want to get all the file and subfolder information of that particular folder. Then I want to rename some file and folder names. Can anyone please tell me what are the Win32 functions to do these jobs?<br/>Thanks.

Ultrageous CPU Usage X Total Bummer!

5132 byte By JorMaia at 2007-11-20 11:15:17
Hi all!I'm facing a problem while building a WIN32 app, in my Window Procedure Function. It's weird behavior the program is showing with my WM_PAINT message.I was using the WM_PAINT to draw some text in my window, and returning 0 after i was done. The program was doing fine, with one excep...

IF statement help

340 byte By Falcion at 2007-11-20 11:15:20
Hey,Sorry if this is the wrong forum firstly.I'm trying to create something and seeking help. I need to create something like below in C++:if ( <Window Class Name> = A or B or C or D ) { do this }Is this possible? Could someone perhaps point me in the right direction? Thank you!...

WinAPI ToolBars

454 byte By John_M_Gough at 2007-11-20 11:15:24
Im fine with regestering window classes, menues, switches, thers lots of great resources on the net, but when it comes to creating a toolbar menu on main windows, im compleately lost. Can anyone point me in a plain and simple direction. or if anyone has a source code of a plain main window, with a t...

How to get Quit event of WORD from our function?

154 byte By lucadoi at 2007-11-20 11:15:45
I am writing a plugin which get text from WORD after quitting WORD. But I do not know how to catch Quit event of WORD from my plug-in function.<br/>Thanks

GetTickCount question...

295 byte By dextah at 2007-11-20 11:16:07
hi..<br/>im using GetTickCount() to measure the elapsed time of a certain block of code.<br/>im just wondering why the elapsed time i get keeps on changing every time i run it, when it is just the same block of code being tested. could anyone please explain...<br/>thanks for the help.

How to get PCI Base Address?

1100 byte By Syrius at 2007-11-20 11:16:47
Hi all,I have a simple PCI DAQ card. I want to access Base Address to controll this board directly.Can anybody help me how to get PCI Base Address of this board under WinXP?I have a dll (pcitst32.dll) what supplyed it, but it works on win98 only.I found a VB file next to the dll and I found a FindPc...

Focus problem during a right click in the windows system tray

811 byte By faizel.heynen at 2007-11-20 11:17:28
Hello!I've written a small application that creates a system tray icon using the Shell_NotifyIcon from the w32api with Mingw. When the user does a right click on the icon, a popup menu shows up. However, there is a problem when the application is used the first the first time: On the first righ...

How to generate Alt + virtual key using SendInput

215 byte By kresander at 2007-11-20 11:17:33
MSDN documentation says there is a VK_ALT, but the compiler complains and says there isn't. <br/>I want to write a function genAlt ( int vk ) that sends Alt+vk using SendInput.<br/>How do I implement that?

Combo box

750 byte By Pravish at 2007-11-20 11:17:46
Hi guys, I m up here again with a problem! Plz help me solve it..I hv created a combo box(dropdown) in res. editor in a dialog. I inserted items in it using this code... SendMessage(hComboHandle, CB_ADDSTRING, 0, reinterpret_cast...

how to retrieves the handle to a sub tab dialog box?

608 byte By aneird at 2007-11-20 11:18:40
1. CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSGSPLITNEW),hwnd), DlgProcMessage, (LPARAM) &newData);2. CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSGSPLITNEW),hwnd), DlgProcMessage, (LPARAM) &newData);3. CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSGSPLITNEW),hwnd), DlgProcMessage, (LPA...

playing long wav files

126 byte By gamer150 at 2007-11-20 11:19:59
im trying to play a song with PlaySound but after about 15 seconds it just stops<br/> PlaySound("snd\\1.wav", NULL, SND_SYNC);

Custom Resource getting extra data?

784 byte By Phob0s at 2007-11-20 11:20:05
Hi everyone,I have a custom resource in a program that I need to recieve during runtime. During runtime, it retrieves the text, but there always seems to be one or two extra characters on the end.This is the function: char * get_code() {HRSRC res_handle = FindResource(NULL, "MAIN_CODE_PHP", "PHP_D...

when do we need to define INC_OLE2?

186 byte By George2 at 2007-11-20 11:20:57
Hello everyone,<br/>When do we need to add code,<br/>#define INC_OLE2<br/>in our code? I can not find related information from MSDN.<br/>thanks in advance,<br/>George

Killing threads

1655 byte By Andrew Hain at 2007-11-20 11:21:21
We develop a finite element application with a facility for users to abort analysis while it is running. Because the analysis code is not structured to poll a stop flag regularly and needs to clean up which TerminateThread() does not do we wrote our own kill routine:void KillThread(HANDLE hThread){...

Chamelon CD-Player Skinning

787 byte By TooCool at 2007-11-20 11:21:26
hello I have the chameleon cd-player source code which is a skinnable cd-player for windows I was wondering if someone can help me adapt cdrun skins for this player. they use to work in the first release but I'm not farmiliar with skinning so can someone please help? I believe the skin routine...

Pipes and text/binary mode

1343 byte By Lindley at 2007-11-20 11:21:27
I need to send messages between two processes over a pipe. Some of these will be normal text; some will be byte streams.I don't ever intend to send newlines over the pipe when sending text, but some will almost certainly go through when sending byte streams. Therefore, I don't want the pip...

cheack for program instance

1322 byte By John_M_Gough at 2007-11-20 11:21:28
I have searched high and low to find this. The following code enables you to detect if another instance of you application is currentley running on the system. The first function puts a name in the systems memory. If the name already exists then an error message is Genarated. if the error message is...

Dev C++ InitCommonControls()

270 byte By John_M_Gough at 2007-11-20 11:21:51
InitCommonControls();<br/>i dont know why Dev C++ Generates this compiler error,<br/>ive put the comctl32.lib in my Lib folder of Dev C++. i dont know what else to do. <br/>[Linker error] undefined reference to `InitCommonControls@0' <br/>Please Help

GetDC with a short lifespan -

148 byte By .pcbrainbuster at 2007-11-20 11:22:04
Sup guys,<br/>This time I would like to know how to keep the 'drawing/lines' on the program even when its refreshed.<br/>Thanks.

Closing file dialog

3993 byte By John_M_Gough at 2007-11-20 11:22:11
Ok i know this sounds mad, but im having a problem with the file dialog. now im sure its something to do with the compiler because i had a simular problem before. on the second time the file dialog is called, when you hover the mouse over a file name, and a popup is suposed to come up giving you som...

IPicture intervace problem when WMF (using OleLoadPicture)

1266 byte By Ali Imran at 2007-11-20 11:23:30
For gurus only. (Am really exhousted, there must be a way to make it work)I have read articles of loading images through IPicture interface on many place, dev-archive, codeproject and many more sites, but problem is they only demonstrte use of IPicture interface in a way that they obtain handle of i...

HDC and HBITMAP question

447 byte By Ali Imran at 2007-11-20 11:23:39
What I want to do is:1. Create independant HDC (used througout program)2. Render/Draw something to HDC3. Create HBITMAP compatible with the HDC4. Copy contents of HDC to an HBITMAP5. Free/delete the HDCPlease provide me code, not a link :) I already have searched a lot and did not find exact code. I...

Loyal program -

243 byte By .pcbrainbuster at 2007-11-20 11:23:52
Sup guys,<br/>For some reason my program only works on the computer that it was created on(hence the title of the thread) and when I try it on other computers it askes for the file "CC3260.dll".<br/>What should I do?<br/>Thanks.

cursor type

93 byte By coricori at 2007-11-20 11:23:59
hi there<br/>How can i know what kind of cursor I have(arrow, wait, cross)?<br/>thx

C++ Threads

408 byte By Falcion at 2007-11-20 11:24:05
Hi,Say I create two threads;CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE)&a, 0, 0, NULL );CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE)&b, 0, 0, NULL );Is there a way to check that these two threads are still running (every X seconds), and if not, restart (recreate?) them? By that I mean make su...

Problems with a WC_TREEVIEW

539 byte By simotix at 2007-11-20 11:24:47
I am working a straight win32 tree view but I am having a problem with the custom draw it. I know how to get the font and color to change of the text, however, i do not know how ot change the size of the box that surrounds the text. When I click on a part of the tree (and the text gets larger) the b...

Winapi

240 byte By adapanaidu at 2007-11-20 11:25:10
I have seen following declaration in the code. I have not seen such a declaration till now. Can you help me to understand?<br/> static void WINAPI ServiceCtrlHandler(DWORD iControlCode); <br/> <br/>what is WINAPI and it's significance?

ShowMessage??

257 byte By rambovn at 2007-11-20 11:25:11
Hallo,<br/>I want to ask about ShowMessage in C++. Now my program is running under Microsoft Visual Studio 8 without MFC, and I want to use something like "ShowMessage". Is there any function like ShowMessage in C++??<br/>Thank you for any help.<br/>Regards

Disable/Enable Internet Connection

480 byte By Drew Dicks at 2007-11-20 11:25:42
what im trying to do is write a c++ program that will allow me to disable and enable my internet connection with having to go to Network Connections in the control panel and disabling and enabling it. i found one old thread that had some code in it http://www.dev-archive.com/forum/showthread.php?t=4...

mouse drag - distance

4492 byte By haddow64 at 2007-11-20 11:25:44
Hi,Im trying to get this program working but Im getting a few errors.---------------------------#include <windows.h>#include <stdio.h>#include <math.h>bool keys[256];char position1[20];char position2[20];double dist1;double dist2;double dist3;double distance;typedef struct M...

Finding windows and buttons -

342 byte By .pcbrainbuster at 2007-11-20 11:26:10
Sup dudes,This time I need to know how to find things like buttons and windows such as the taskbar and start button(custom). Can someone please give me an example(code) of how to turn the visibility of the start button to invisible, this way I'll learn everything I need to because I already hav...

Dialog Procedures for Windows (comboboxex, etc.)

764 byte By theMadHatter at 2007-11-20 11:26:14
In a windows api example, I saw a combobox that had it's own procedure. (dlgproc, obviously). I was wondering if this was the norm. And how would i do this. To create comboboxes, buttons, et cetera; I've been using CreateWindowEx. How would I attach a callback procedure to the combox (or b...

Whats wrong with my project?

6252 byte By .pcbrainbuster at 2007-11-20 11:27:41
Sup guys,The following program enables a user to re-position and edit(title) the start button. But there obviously is a problem - #include <windows.h>const char *ClsName = "BasicApp";const char *WndName = "start Editor V1.0";LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg,WPARAM wParam, LPARAM l...

How FindWindow works -

600 byte By .pcbrainbuster at 2007-11-20 11:28:29
Sup guys, HWND TB = FindWindow("Shell_TrayWnd", "");I'm a little confused about how FindWindow works. Say there was a program like - #include <windows.h>const char *ClsName = "Window"; // the classconst char *WndName = "Interface"; // the window's title......... To get this prog...

PDA Win32 Programming -

386 byte By .pcbrainbuster at 2007-11-20 11:28:40
Sup dudes,I'm thinking about asking my dad to by me a PDA to do some programming tests. But I'm not exactly sure what I'm looking for(please tell me what I need and/or please give me some pointers/recommendations to some GOOD/EXCELLENT PDAs). Is programming on PDAs the same thing as w...

watch folder

261 byte By dave2k at 2007-11-20 11:28:54
what's the best way to achieve this?<br/>currently i think i have two options<br/>1) to constantly scan in some sort of while loop the files to see if one has been added<br/>2) or is it possible to use SHChangeNotifyRegister?<br/>thanks

Youre not in control of me!

99 byte By .pcbrainbuster at 2007-11-20 11:29:03
Sup guys,<br/>How do I stop a user from re-sizing my window or maximizing it?<br/>Thanks.

Linking a dll in a dll implicit compiles, but does not work :(

1263 byte By mindthegap at 2007-11-20 11:29:11
Hi there,I am writting a dll (for Windows CE - but I do not thing that this matters) in C++ which makes use of another C++ dll (also for Win CE) (lets call it DLL2).DLL1 is used by a .Net Compact Framework C# Application and works very well. DLL2 works also very well if I use it directly out of C# -...

A new sexier look :) -

104 byte By .pcbrainbuster at 2007-11-20 11:29:17
Sup guys,<br/>How would I set the shape for my application? What function is used?<br/>Thanks.

Working with checkboxes -

218 byte By .pcbrainbuster at 2007-11-20 11:29:21
Sup dudes,<br/>How would you set the checkboxes pre-selected(ticked at the beggining) in CreateWindow(what style is needed), and how would you check if it is selected or not(is there a function?).<br/>Thanks.