Hey everyone, I'm looking to add a block / function within a C++ application that will search for open windows. For instance, wordpad and notepad. If either are open perform an action. I'm doing this within win32 API but my question is this. If I create something as such, this has to be on a thread. (I come from a VB background) and we had timers. What would be the best way to implement a timer in C++? I was thinking a do loop on a thread that checks for certain things, but would this be too memory / cpu …

Member Avatar
Member Avatar
+0 forum 5

for (UINT wCount = 0; wCount < pMan->aAccounts.wNumItems; wCount++) { CUserAccount *pAccount = (CUserAccount *)pMan->aAccounts.aItems.GetAt(wCount); if (pAccount->csProfileName.Compare(pGroup->csProfileName) == 0 || pAccount->csSingleActive.Compare(pGroup->csName) == 0) { if (pAccount->_csUserGroup.CompareNoCase(_T("GrpAdmin")) != 0 && pAccount->_csUserGroup.CompareNoCase(_T("GrpOffice")) != 0) { pAccount->pFuncRestrictions->SetRestriction(Area1, Activity1); pAccount->pFuncRestrictions->SetRestriction(Area2, Activity2); pAccount->pFuncRestrictions->SetRestriction(Area3, Activity3); pAccount->CreateInDatabase(pConnec); } } } Here, my code is calling CreateInDatabase twice for any user belonging to any group say ABC and DEF. So, if I have profile GHK and both of this groups use same profile then it is creating in database two entries. How to solve this issue. Any suggestions??

Member Avatar
Member Avatar
+0 forum 1

Hi All, Is there any way to read/extract data from sql server backup file without restoring it? Thanks.

Member Avatar
Member Avatar
+0 forum 2

Hi, In Windows 7 (and possibly older, can't remember off the top of my head), you can select which icons appear in your taskbar and which ones are only visible if you click the up arrow. Is there a way to set this default programatically? If it's relevant, my current code is below: memset(&gNotifyIconData, 0, sizeof(NOTIFYICONDATA)); gNotifyIconData.cbSize = sizeof(NOTIFYICONDATA); gNotifyIconData.hWnd = hwnd; gNotifyIconData.uID = ID_TRAY_APP_ICON; gNotifyIconData.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP | NIF_STATE; gNotifyIconData.uCallbackMessage = WM_TRAYICON; gNotifyIconData.hIcon = (HICON)LoadImage(NULL, _T("amber.ico"), IMAGE_ICON, 0, 0, LR_LOADFROMFILE); _tcscpy_s(gNotifyIconData.szTip, APP_NAME); Shell_NotifyIcon(NIM_ADD, &gNotifyIconData); I am not after setting dwState and dwStateMask to NIS_HIDDEN as …

Member Avatar
+0 forum 0

In my project I've 8 edit boxes and i need to set each box with different font. But my code is setting all the boxes single font.. So how can i modify it?? void CTrail3Dlg::OnBnClickedButton1() { UpdateData(TRUE); CFontDialog dlg; // get font for current dialog, just to fill in LOGFONT LOGFONT lf; CFont *pFont = GetFont(); pFont->GetLogFont(&lf); if (dlg.DoModal()== IDOK) { dlg.GetCurrentFont(&lf); m_font.DeleteObject(); m_font.CreateFontIndirect(&lf); GetDlgItem(IDC_EDIT1)->SetFont(&m_font); GetDlgItem(IDC_EDIT2)->SetFont(&m_font); GetDlgItem(IDC_EDIT3)->SetFont(&m_font); GetDlgItem(IDC_EDIT4)->SetFont(&m_font); GetDlgItem(IDC_EDIT5)->SetFont(&m_font); GetDlgItem(IDC_EDIT6)->SetFont(&m_font); GetDlgItem(IDC_EDIT7)->SetFont(&m_font); GetDlgItem(IDC_EDIT8)->SetFont(&m_font); } // TODO: Add your control notification handler code here }

Member Avatar
Member Avatar
+0 forum 1

how to implement active appearance model any tutorial to coding of it. in opencv vc++

Member Avatar
+0 forum 0

hello everyone..i've vs2010 in my system..and i'm trying to build a simple web browser using webkit..could anyone please tell me what do i need to install to be able to work on vs2010?? and a simple demo code about how to use the webkit sdk..i've searched a lot on google..but haven't been able to find something useful so far thanks

Member Avatar
Member Avatar
+0 forum 6

Hi, Can you tell me how can I make my application recognizes when the user presses a button on keyboard? *For example*: presses 'S', application prints "Hello.". I need this information for BorlandC++, but it would be useful even though you provide the same for VC++ :) *(I am not talking about console applications, I need these tips for GUI apps )* Thank you!

Member Avatar
Member Avatar
+0 forum 6

hi guys! today i tried file writing through VC++ 2010. suddenly a point stroke in my mind to create a file which may not be read by notepad or it gives error or some wrong output as it is mostly seen on opening a pdf file in notepad. for this i tried different formats, (for example: pdf) but this format is also very easy for notepad to read. even the acrobat reader is not reading this file. if anyone can help me, please let me know how to create a pdf file through VC++ or any other format, but the …

Member Avatar
Member Avatar
+0 forum 3

i have a combo box control in a INTERNET EXPLORER TOOLBAR. the backspace key of keyboard works fine if this combobox is made dropdown enabled But if i disable the drop down feature of this combo box then backspace doesn't work . Moreover if i add a EDIT CONTROL instead of COMBOBOX control then too the same thing persist i.e. the BACKSPACE doesn't work ! i have search the web a lot for this issue but cuold not find anything which is problem solving ! i am using visual studio 2010 for making an IE toolbar the IE version in …

Member Avatar
+0 forum 0

difference between setdialogitemtext and update data??? in mFC VC++ application; both way we changing item values.. in some app one working another not working.. ex modal dialog update data not working.. any body explain???

Member Avatar
Member Avatar
+0 forum 1

am want to develop a file transfer program in vc++.. normal text file it is possible.. but is it can read for multimedia file.... like java here byte read is possible...

Member Avatar
Member Avatar
+0 forum 2

So, I need to make a program that draws a [URL="http://en.wikipedia.org/wiki/Automata_theory"]finite automata[/URL] from the input data. I had some experience with the [I]graphics.h[/I] header but as far as I know it's a Borland only header and VC++ doesn't support it. So I was wondering, is there a way to draw some simple shapes and lines on VC++, besides using OpenGL?

Member Avatar
Member Avatar
+0 forum 7

i wanna use the Sleep fucntion in a CLR vc++ app, if i include windows.h it gives a huge list of errors, if i use _sleep() then it dowsnot work at many systems since its obslete. what should i do? i am bound to use CLR bcoz my code uses items from the namespace System. P.s i am using visual studio 2010

Member Avatar
Member Avatar
+0 forum 4

hi all guys, I have just started CURL programming in vc++.But I don't have a good place to start reading more about it.I do understand the basics of it,but I want a procedural tutorial to learn more about it. Is there any proper site to learn from basics to higher level? (pls don't give the official curl website.Its not really very informative) Thanks in advance... Prasanna

Member Avatar
Member Avatar
+0 forum 2

[CODE] #include "stdafx.h" #include<iostream> #include<string.h> #include<fstream> #include<stdio.h> #include<cstdio> #include<curl\curl.h> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { return 0; } void main() { int p; CURL* curl; curl=curl_easy_init(); }[/CODE] The above is my code and I am trying to compile it in vc++ 10.But the error is: error LNK2019: unresolved external symbol __imp__curl_easy_init referenced in function _main I have included the header files in additional include directories.I have also added the library folder to file to additional library directories.I have entered the name of library in Linker-> Input ->Dependencies. And yet this error seems to come. Please help....

Member Avatar
Member Avatar
+0 forum 2

I want to learn basic web query vc++.I googled around and found that libcurl was the library needed.I have downloaded the necessary files from curl.haxx.se .I do not know how to use these files and make the actual header file and then actually include it in my project. Any help would be greatly helpful. Thanking you in advance. Prasanna

Member Avatar
Member Avatar
+0 forum 3

Hi, I made a program that lists all possible anagrams of a word.Now I'd like to include anagrams of subsets of letters in the word.I have the code for making the subsets also now.But i do not want merge them as a single code.So I'd like to know if there is a way pipe the output of one to another in VC++.They are in the same project file in VC++,if that matters. Thanks in advance, Prasanna.

Member Avatar
Member Avatar
+0 forum 2

Hello DaniWeb :) For very long I've wanted to develop and venture into the Win32 API and make programs like I find on the internet. Show the world my creativity. I made a simple calculator with a GUI and Menu bar from scratch. I was proud but I was shattered when I found out that, to redistribute it and show my friends, I had to get them to download .NET framework... I have Visual Studio 2010 and I've been struggling to disable the use of .NET. Even when I start from scratch for some wierd reason the program's I create …

Member Avatar
Member Avatar
+0 forum 2

If I write windows API application using vc++ 10,does the .exe file work in any windows computer or is vc++ a necessity in the other computer also?

Member Avatar
Member Avatar
+0 forum 2

Here is the VC++ code [code]SVisFileDescriptor filedescriptor1; ZeroMemory(&filedescriptor1, sizeof(SVisFileDescriptor)); filedescriptor1.has_alpha_channel=CVisImageBase::IsAlphaWritten(); filedescriptor1.jpeg_quality=0; filedescriptor1.filename=currentpath1; pframe->SetTimer(22,5000,NULL); imageS1.WriteFile(filedescriptor1);[/code] This block is basically replicated in 3 different functions which in essence save 1 image EACH from a camera connected. I am not sure why this is happening. But my hunch is there is an overlap in someway which is why it saves 1 image(well partly) and fails to save the other 2 Any help would be greatly appreciated. Thanks, Vivek

Member Avatar
Member Avatar
+0 forum 4

Thanks in advance.. [B]I want to know how to get running process information of remote machine in vc++[/B]

Member Avatar
Member Avatar
+0 forum 1

I am just starting MS Visual Studio 2005. My laptop has a 64 bit Intel microprocessor and the OS installed is 64 bit Windows 7. I created a DLL in VC++ 2005 using a Export Definitions File (.def) and then created an application on VB to test it. The entire procedure was completed as instructed by my teacher and every thing was fine until I tried to run the application. The error returned was a BadImageFormat Exception (0x8007000B) and I have completely no idea what went wrong. I have read the posts in these forums and I think it might …

Member Avatar
Member Avatar
+0 forum 3

i have two projects on visual studio 2005 one in vc++ & other in vb.net now i want to both programs to work cooperatively acc to me i have following ideas but dont know how to implement them 1 - if i create third project and integrate/merge/combine other two in visual basic 2 -if by any both communicates with each other Please suggest (any help appreciated).... most of my queries are solved by daniweb but this time i had to ask a question.. Hoping for good & practical response... also tell other means if any :S as deadline for project …

Member Avatar
+0 forum 0

I m work'n on a project to control the cursor with my finger. I've used openCV in VC++ to track my finger but have no idea how to link the mouse with my finger i.e control the mouse motion with finger. can someone please....!! tell me how do you control the mouse in VC++. I've seen robot class in java......... Thank you

Member Avatar
Member Avatar
+0 forum 2

Hey so my project is an Average Calculator to calculate the average of a set of numbers. Anyways, I must make it in a GUI and I have chosen Win32. My problem now resides while trying to do the following: - When there is a paint request, to paint anything. (e.g text or change in display) there must be a handler that handles it outside of the main file. Im totally new to classes and Win32 itself so sorry for my "nooby" mistakes. Anyways, Here is my code: PaintHandler.cpp [CODE] #include <Windows.h> #include "stdafx.h" #include "PaintHandler.h" class PaintHandler{ }; /**/ …

Member Avatar
Member Avatar
+0 forum 4

Hi, i am working on visual C++ Express Ed and winforms to make a simple Word processor. What can be the basic functionality like spell check etc i have to put in it and algos to follow? is there any help on the Internet that u know can help me.

Member Avatar
Member Avatar
+0 forum 5

Hi, I`m new here and, of course, have a small problem. I need to create a program with VC++ 6 Builder where: Press ENTER once - open picture, Press ENTER Twice - start a music. I can`t figure out how to check if user press ENTER twice, can anybody help me? My Code: [CODE] void __fastcall TForm1::ListBox1KeyPress(TObject *Sender, char &Key) { switch( Key ) { case 'VK_RETURN': { atidarytpav(); } break; } [/CODE] Sry for my bad English

Member Avatar
Member Avatar
+0 forum 12

I have been doing strait-up c++ for a while, now I want to learn VC++. What are some easy commands? like a show form command and some others. Thanx, JT

Member Avatar
Member Avatar
+0 forum 2

Hi guys, I like to design a workplace or form(not decided) in VC++ (MFC) or (C++) where I can select and place different objects like car , bike etc and move them programmatically.Each object has its own properties(which is already designed) I have no problem in moving them by changing x,y position. But my question is how do I place different objects like car , bus on screen and move them to the place I want.I should also able to delete them when needed. As I am new MFC I would like to know how to proceed . Given an …

Member Avatar
Member Avatar
+0 forum 1

The End.