Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

aangerma

@aangerma
About
Posts
40
Topics
15
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Sending message between objects
    A aangerma

    Thanks for your replay , I didnt understand where is the calling to the method of object 2, if you can mark this section it will be helpfull for me. by the way I forgot to specify that I am using MFC but as I realized it doesnt matter. thanks

    C / C++ / MFC question

  • Sending message between objects
    A aangerma

    Object of a non dialog class

    C / C++ / MFC question

  • Sending message between objects
    A aangerma

    Hello, I have a dialog that contains some radio buttons and a list box I wondered how can I pass a message to another object that the user chaghed his selection by press one of the redio buttons, I need to call to a method of the second object accordeing the user selction . thanks

    C / C++ / MFC question

  • Problem with owner drawn listbox and double buffering
    A aangerma

    Hello, I created owner drawn listbox and I used double buffering for preventing flickering because I have a lot of data , the problem is that its don't present all the items and , whan I scroll it down and up its erases part of the items, the code is:

    void HistDlg::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct)
    {
    if(IDC_LIST1 ==nIDCtl)
    {
    int width=lpDrawItemStruct->rcItem.right-lpDrawItemStruct->rcItem.left;
    int height=lpDrawItemStruct->rcItem.bottom-lpDrawItemStruct->rcItem.top;
    HDC memDC1 = CreateCompatibleDC(lpDrawItemStruct->hDC);
    HBITMAP hMemBmp = CreateCompatibleBitmap(lpDrawItemStruct->hDC,width , height);
    HBITMAP hOldBmp = (HBITMAP)SelectObject(memDC1, hMemBmp);
    CDC *memDC=CDC::FromHandle(memDC1);
    memDC->FillSolidRect(0,0, width, height,RGB(255,255,255));

    	int	 ODI\_length =  
    	1 + SendDlgItemMessage(IDC\_LIST1,
    							   LB\_GETTEXTLEN,
    							   lpDrawItemStruct->itemID,
    							   0);
    
    	if (ODI\_length)
    	{
    		wchar\_t \*ODI\_wstr = NULL;
    		ODI\_wstr = new wchar\_t\[ODI\_length\];
    		if (ODI\_wstr)
    		{
    			COLORREF ODI\_old\_text\_color;
    			//get the string
    			SendDlgItemMessage(IDC\_LIST1,
    							   LB\_GETTEXT,
    							   lpDrawItemStruct->itemID,
    							   (LPARAM)ODI\_wstr);
    				
    				
    			memDC->DrawText(ODI\_wstr,
    						  ODI\_length - 1,
    						  &lpDrawItemStruct->rcItem,
    						  DT\_RIGHT);
    			
    		}
    
    	}
    
    	BitBlt(lpDrawItemStruct->hDC, 0, 0, width,height, memDC1, 0, 0, SRCCOPY);
    	SelectObject(memDC1, hOldBmp);
    	DeleteObject(hMemBmp);
    	DeleteDC(memDC1);
    }
    

    }

    What doe's I'm doing wrong? thanks

    C / C++ / MFC help question

  • CreateFile after CloseHandle
    A aangerma

    Thank you its solved my problem

    C / C++ / MFC help question

  • CreateFile after CloseHandle
    A aangerma

    its return ERROR_ACCESS_DENIED

    C / C++ / MFC help question

  • CreateFile after CloseHandle
    A aangerma

    Hello, I have a problem , Whan I open a port by CreateFile(..) after closing it by CloseHandle(..) the CreateFile fails , I tried to do a Sleep(2000) before reopening its didnt help, on the first time that I am opening it, its succeed it fails just if I open it after closing it. And its happend only in my laptop that have windows 7, on the other computer that have windows XP its work fine. What can be the problem with reopening port after closing it? Thanks!!

    C / C++ / MFC help question

  • Using Timer with non-dialog class
    A aangerma

    Can you give me exmple how to write a messsage handler , I did it only with the class wizard of mfc, and this is the first time I need to add a timer to a class that don't connected to any window, even if I creat a fictive window like dialog box the SetTimer(...) works only if the dialog is opened by DoModal. thanks

    C / C++ / MFC question

  • Using Timer with non-dialog class
    A aangerma

    Thanks for the reply, can you give me more details how to use it? How can I know which message I Received by msg?

    C / C++ / MFC question

  • Using Timer with non-dialog class
    A aangerma

    Thanks a lot, As I understand I need to use SetTimer() and to give it an handle to window but the class is not connected to a dialog so what the hWnd that I need to pass?

    C / C++ / MFC question

  • Using Timer with non-dialog class
    A aangerma

    Thanks for the answer, But the operations that I need to perform on the timer shuld have an approach to the data members and member Functions of the class , can I do it with threads?

    C / C++ / MFC question

  • Using Timer with non-dialog class
    A aangerma

    Hello, I have a class that doesn't connect to a dialog or window and I need to do some operations on timer but the timers works only with dialogs , does anyone know another way I do it? thank

    C / C++ / MFC question

  • Dialog box focus
    A aangerma

    can you explain me what does it mean 'modeless dialog', and how can I change it? thanks

    C / C++ / MFC c++ question

  • Dialog box focus
    A aangerma

    thanks for the replay, I have a dialog that has a menu and clicking on the menu items causes to open other dialogs by DoModal(); The problem is that, while one dialog is opened the user can click other menu items and open more dialogs and its causes me a mess. How can I declare that the main dialog will be a parents of the other dialogs? thanks again

    C / C++ / MFC c++ question

  • Dialog box focus
    A aangerma

    Hello, I am writing a program using VC++ with MFC, I added some dialog boxes and I want that once one of the dialog is opened by DoModal() all the buttons on the parent dialog will be disabled, How can I do it? thanks Avishag

    C / C++ / MFC c++ question

  • Disable turning the screen off
    A aangerma

    The purpose of the system is that the nurse will be able to see the calls from distance, on screen that places on central place, if some one will change the settings of the computer the screen might turn off . thanks again.

    C / C++ / MFC

  • Disable turning the screen off
    A aangerma

    thank you for the reply, I need to desply on the monitor the calls from ills to nurse, I also uses sounds but I would prefere that the screen will be always on. thanks

    C / C++ / MFC

  • Disable turning the screen off
    A aangerma

    Hello I would like to disable the outomatic turning off the screen, i.e. I want that the screen will always be on. I need that the project will be suitable also to windows xp accordingly, I can't use the function "RegisterPowerSettingNotification " . If anyone know another way to do it I would be glad if he can write it to me. thanks

    C / C++ / MFC

  • Problem with RegisterPowerSettingNotification and USER32.dll.
    A aangerma

    Thanks now its obvious why it didnt work.

    C / C++ / MFC help question

  • Problem with RegisterPowerSettingNotification and USER32.dll.
    A aangerma

    How can I know the version ? I only know that this is Windows xp professional. thanks

    C / C++ / MFC help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups