Programming/C Win32 MFC2017. 7. 13. 14:09

아직은 구현해보지 않았음..

조만간 쓸 예정


[링크 : https://linsoo.co.kr/archives/13725]

  [링크 : http://phiru.tistory.com/128]

  [링크 : http://frostguy.tistory.com/39]


'Programming > C Win32 MFC' 카테고리의 다른 글

MFC 다이얼로그 - 탭  (0) 2017.07.21
MFC 다중문서 / 단일문서  (0) 2017.07.21
2차원 배열에 대한 포인터  (0) 2017.06.21
slider control / settic  (0) 2017.06.12
mfc 파일 경로 얻기  (0) 2017.05.30
Posted by 구차니
Programming/C Win32 MFC2017. 6. 21. 16:03

*(var)[width]


식으로 선언하면 될듯


[링크 : https://dojang.io/mod/page/view.php?id=312]

'Programming > C Win32 MFC' 카테고리의 다른 글

MFC 다중문서 / 단일문서  (0) 2017.07.21
MFC 다이얼로그 숨기기  (0) 2017.07.13
slider control / settic  (0) 2017.06.12
mfc 파일 경로 얻기  (0) 2017.05.30
MFC CHttpConnection timetout 설정  (0) 2017.05.29
Posted by 구차니
Programming/android2017. 6. 16. 16:53

가볍게 한번 배워볼일이 생길려나?


[링크 : http://t2t2tt.tistory.com/category/Android]

Posted by 구차니
Programming/C Win32 MFC2017. 6. 12. 15:38

SetTicFreq()는 Tick Marks True / Auto Ticks True로 해야 한다면

SetTic()은 Tick Marks True / Auto Ticks False로 해야 한다


[링크 : https://msdn.microsoft.com/ko-kr/library/5tw28355(v=vs.100).aspx]

'Programming > C Win32 MFC' 카테고리의 다른 글

MFC 다이얼로그 숨기기  (0) 2017.07.13
2차원 배열에 대한 포인터  (0) 2017.06.21
mfc 파일 경로 얻기  (0) 2017.05.30
MFC CHttpConnection timetout 설정  (0) 2017.05.29
win32 외부 프로그램 실행  (0) 2017.05.29
Posted by 구차니
Programming/php2017. 6. 10. 16:48

세션 관련 함수니까

당연히(?) session_start()를 호출해주고 써야 한다.


그걸 모르고 그냥 했으니 당연히 안되었구나 ㅠㅠ


[링크 : http://php.net/manual/kr/function.session-destroy.php]

'Programming > php' 카테고리의 다른 글

php 명령줄 실행에 post / get 인자 넘기기  (0) 2017.07.23
캐시 제어  (0) 2017.07.23
sql injection 방어  (0) 2017.04.26
망할 php define()  (0) 2017.04.25
php hidef?  (0) 2017.04.24
Posted by 구차니

이름없는 함수를 이용해서 자바스크립트를 바로 실행이 가능한데

이걸 이용해서 jquery를 실행하고

jquery에서는 특정 class의 내용을 비워버린다.


<script type="text/javascript">

$(function(){

  $('.hello').empty();

}); 


[링크 : http://www.everdevel.com/kr/jquery/val_empty_remove.php]

[링크 : http://www.nextree.co.kr/p4150/]



+

구현해보는데 깔끔한건지 모르겠으나..

대충 아래같이 구현해봄

<html>

<head>

<script src="./jquery-3.1.1.min.js"></script>

</head>

<?php

        include('./func_db.php');


        if( isset($_POST['id']))

        {

                $db = db_conn();

                $ret = login($db, $_POST['id'], $_POST['pw']);

                if($ret == 1)

                {

                        echo "

<script>

$(function(){

        $('.login_form').empty();

        $('.login_form').append('<input type=submit value=logout>');

})();

</script>";

                }

        }


?>


<body>

<form method="post" action="login_form.php">

        <fieldset style="width: 200px;">

                <legend>login</legend>

                <div class="login_form">

                        <p>

                                id :&nbsp;

                                <input type="text" name="id">

                        </p>

                        <p>

                                pw :&nbsp;

                                <input type="password" name="pw">

                        </p>

                        <p>

                                <input type="submit" value="login">

                        </p>

                </div>

        </fieldset>

</form>

</body>

</html> 


'Programming > javascript & HTML' 카테고리의 다른 글

jquey ajax 테스트  (4) 2018.09.03
jquery 복수 속성 선택하기  (0) 2018.08.30
javascript toString() 진법변환  (0) 2017.05.25
div slide 애니메이션  (0) 2017.01.14
div margin: 0 -200px 0 auto  (0) 2016.01.21
Posted by 구차니
Programming/C Win32 MFC2017. 5. 30. 14:31

GetCurrentDirectory() - 작업 디렉토리

GetModuleFileNameW() - 현재 실행중인 파일의 경로+파일명


[링크 : http://egloos.zum.com/katalog/v/4637907]

[링크 : http://ds3evx.tistory.com/entry/MFC-Tip-실행-파일-폴더-구하기]



망할유니코드랑 썪이면서 혼돈의 카오스 ㄷㄷ

WCHAR pathstr[256];

GetModuleFileNameW(NULL, pathstr, 256);

PathRemoveFileSpec(pathstr); // 실행파일의 경로만 받아옴


// 실행파일과 동일 디렉토리내의 test.exe를 /h 옵션으로 실행

CString exec("test.exe");

Cstring opt("/h");

CString path(pathstr);

path = _T("\"") + path + _T("\"");

cmd.AppendFormat(_T("%s\\%s %s"),path, exec, opt);


m_ret.SetWindowTextW(cmd);

_wsystem(cmd); 


'Programming > C Win32 MFC' 카테고리의 다른 글

2차원 배열에 대한 포인터  (0) 2017.06.21
slider control / settic  (0) 2017.06.12
MFC CHttpConnection timetout 설정  (0) 2017.05.29
win32 외부 프로그램 실행  (0) 2017.05.29
cstring 'null' append 문제?  (0) 2017.05.18
Posted by 구차니
Programming/C Win32 MFC2017. 5. 29. 16:28

이것저것 찾아서 해보는데 영 안되네...


[링크 : http://forums.codeguru.com/...48863-How-to-set-timeout-value-for-CHttpFile-SendReqeust()]

[링크 : https://stackoverflow.com/questions/14986898/how-to-set-connection-timeout]



BOOL InternetSetOption(

  _In_ HINTERNET hInternet,

  _In_ DWORD     dwOption,

  _In_ LPVOID    lpBuffer,

  _In_ DWORD     dwBufferLength

); 

[링크 : https://msdn.microsoft.com/en-us/library/windows/desktop/aa385114(v=vs.85).aspx]


INTERNET_OPTION_CONNECT_TIMEOUT

2

Sets or retrieves an unsigned long integer value that contains the time-out value, in milliseconds, to use for Internet connection requests. Setting this option to infinite (0xFFFFFFFF) will disable this timer.

If a connection request takes longer than this time-out value, the request is canceled. When attempting to connect to multiple IP addresses for a single host (a multihome host), the timeout limit is cumulative for all of the IP addresses. This option can be used on any HINTERNET handle, including a NULL handle. It is used by InternetQueryOption and InternetSetOption.

[링크 : https://msdn.microsoft.com/en-us/library/windows/desktop/aa385328(v=vs.85).aspx]


cIntSession.SetOption(INTERNET_OPTION_CONNECT_TIMEOUT, 3000);

[링크 : https://www.experts-exchange.com/.../How-can-I-change-the-default-timeout-of-the-CHttpConnection.html]


2007년 글이긴 한데, 해당 함수 버그로 인해 정상 작동을 하지 않는다고?

[링크 : http://soonsin.com/80]

[링크 : https://social.msdn.microsoft.com/.../cinternetsession-openurl-timeout-problem?forum=vcmfcatl]


[링크 : https://support.microsoft.com/en-us/help/177190/bug-error-12019-when-calling-internetwritefile]


+

일단 헤더에서 찾은건 아래와 같은 timeout들인데 멀 설정하던 어떤 값을 하던 7초 정도 되어야 타임아웃 된다 ㅠㅠ

  // timetout for HTTP socket

pHttpFile->SetOption(INTERNET_OPTION_CONNECT_TIMEOUT, 100);

pHttpFile->SetOption(INTERNET_OPTION_SEND_TIMEOUT, 100);

pHttpFile->SetOption(INTERNET_OPTION_RECEIVE_TIMEOUT, 100);

pHttpFile->SetOption(INTERNET_OPTION_DATA_SEND_TIMEOUT, 100);

pHttpFile->SetOption(INTERNET_OPTION_DATA_RECEIVE_TIMEOUT, 100);

pHttpFile->SetOption(INTERNET_OPTION_LISTEN_TIMEOUT, 100);


'Programming > C Win32 MFC' 카테고리의 다른 글

slider control / settic  (0) 2017.06.12
mfc 파일 경로 얻기  (0) 2017.05.30
win32 외부 프로그램 실행  (0) 2017.05.29
cstring 'null' append 문제?  (0) 2017.05.18
MFC 시간측정(msec)  (0) 2017.04.18
Posted by 구차니
Programming/C Win32 MFC2017. 5. 29. 09:07



system(""); 

win32에서도 지원 (유닉스 계열 전용이 아니었군)

[링크 : http://rockdrumy.tistory.com/483]


다만, system()에서 실행되는 동안 멈추는 단점이 있다.

[링크 : https://msdn.microsoft.com/en-us/library/277bwbdz.aspx]


그리고 얘.. 공백 문자 경로 해결을 못하겠네?

[링크 : https://stackoverflow.com/.../how-to-overcome-spaces-in-the-path-while-passing-to-system]

[링크 : https://stackoverflow.com/.../c-system-not-working-when-there-are-spaces-in-two-different-parameters]



WinExec(cmd, SW_SHOW); 

독립된 프로세스로 구동함.

공백문자 문제 없음(따옴표 하나로 해결)


ShellExecute(NULL, _T("open"), _T("cmd"), NULL, NULL, SW_SHOW); 

얘도 독립된 프로세스로 구동



STARTUPINFO StartupInfo = {0};

PROCESS_INFORMATION ProcessInformation;

BOOL ret;

ret = CreateProcess(_T("c:\\windows\\system32\\cmd.exe"),NULL,NULL,NULL,FALSE,0,NULL,NULL,&StartupInfo, &ProcessInformation);

if(!ret) return ;

WaitForSingleObject(ProcessInformation.hProcess, INFINITE); 

독립된 프로세스 이나 종료대기

STARTUPINFO 구조체 초기화 안해주면 오류남


+

[링크 : http://mafa.tistory.com/entry/WinExec-프로세서에서-외부-프로세스-실행하기]

[링크 : http://karfn84.tistory.com/entry/MFC-프로그램-안에서-외부-파일을-실행시키기...CreateProcess]

[링크 : http://zodd.tistory.com/322]


얘는 종료시키는 애

[링크 : https://stackoverflow.com/questions/13193719/kill-process-started-with-shellexecuteex]

'Programming > C Win32 MFC' 카테고리의 다른 글

mfc 파일 경로 얻기  (0) 2017.05.30
MFC CHttpConnection timetout 설정  (0) 2017.05.29
cstring 'null' append 문제?  (0) 2017.05.18
MFC 시간측정(msec)  (0) 2017.04.18
MFC 다이얼로그 자세히(접기)  (0) 2017.04.14
Posted by 구차니
Programming/web 관련2017. 5. 26. 13:16

html에서 form을 쓰려니 table이 기본인데 너무 귀찮아서 찾다 보니 이런게 있네?!

대충이라도 이제 만들어 봐야지 ㅠㅠ

그런데.. IE9에서 IE5로 해도 뜨는거 보니.. 원래 있던 기능인듯?

HTML5에서 추가된게 아닌가 보네..(하위 속성만 추가된 듯?)


fieldset은 박스를 쳐주고

legend 는 박스의 제목


<!DOCTYPE html>

<html>

<body>


<form>

 <fieldset>

  <legend>Personalia:</legend>

  Name: <input type="text"><br>

  Email: <input type="text"><br>

  Date of birth: <input type="text">

 </fieldset>

</form>


</body>

</html>


[링크 : https://www.w3schools.com/tags/tag_legend.asp]

[링크 : https://www.w3schools.com/tags/tag_fieldset.asp]

'Programming > web 관련' 카테고리의 다른 글

eclipse php sftp  (0) 2017.10.03
aptana studio 설치  (0) 2017.10.03
웹 페이지용 이미지 DB에 저장하기  (0) 2017.04.21
http digest  (0) 2017.03.03
http header  (0) 2017.03.02
Posted by 구차니